Skip to content

3.18.0 isn't compatible with Python 2 despite being installable #8984

Closed
@convoliution

Description

@convoliution

What version of protobuf and what language are you using?
Version: v3.18.0
Language: Python

What operating system (Linux, Windows, ...) and version?
macOS Mojave 10.14.6

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

Python 2.7.18 (default, Mar 30 2021, 14:20:09) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)] on darwin

What did you do?
Steps to reproduce the behavior:

  1. Activate a Python 2 environment
  2. pip install protobuf==3.18.0
  3. python -c "from google.protobuf import descriptor"

What did you expect to see
Either:

  • ERROR: Could not find a version that satisfies the requirement protobuf==3.18.0
    in (2)
  • no errors in (3)

What did you see instead?

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/convoliution/.pyenv/versions/dev2/lib/python2.7/site-packages/google/protobuf/descriptor.py", line 113
    class DescriptorBase(metaclass=DescriptorMetaclass):
                                  ^
SyntaxError: invalid syntax

in (3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions