protocolbuffers / protocolbuffers/protobuf

Message methods not defined as positional arg only

Open
#24,446 8 comments 0 reactions 1 assignee View on GitHub

@PilgrimMemoirs is already working on this.

Since Feb 25, 2026.

enhancement keep open python upb
Dominant language
C++
Stars
72k
Forks
16.3k
Avg merge
1d 17h
Merged PRs (30d)
140

Description

What version of protobuf and what language are you using?
Version: 33.1
Language: Python

What operating system (Linux, Windows, ...) and version?
OSX

What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.14

What did you do?
Python base message class defined here has certain methods HasField, ClearField etc, defined as functions with keyword arguments. But in reality they are positional args only.

What did you expect to see

Function stubs defined as HasField(self, field_name, /) indicating that they are positional only arguments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.