Package Details: python-axisregistry 0.4.11-1

Git Clone URL: https://aur.archlinux.org/python-axisregistry.git (read-only, click to copy)
Package Base: python-axisregistry
Description: easy access to the GF Axis Registry
Upstream URL: https://github.com/googlefonts/axisregistry
Licenses: Apache-2.0
Submitter: alerque
Maintainer: alerque
Last Packager: alerque
Votes: 0
Popularity: 0.000000
First Submitted: 2022-06-17 06:55 (UTC)
Last Updated: 2024-08-10 09:27 (UTC)

Latest Comments

aragon123 commented on 2024-08-16 10:40 (UTC)

For some time now the check method fails for me:

===================================================================== ERRORS =====================================================================
________________________________________________ ERROR collecting tests/test_axisregistry_api.py _________________________________________________
tests/test_axisregistry_api.py:1: in <module>
    from axisregistry import AxisRegistry
Lib/axisregistry/__init__.py:10: in <module>
    from axisregistry.axes_pb2 import AxisProto
Lib/axisregistry/axes_pb2.py:33: in <module>
    _descriptor.FieldDescriptor(
/usr/lib/python3.12/site-packages/google/protobuf/descriptor.py:621: in __new__
    _message.Message._CheckCalledFromGeneratedFile()
E   TypeError: Descriptors cannot be created directly.
E   If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
E    1. Downgrade the protobuf package to 3.20.x or lower.
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E   
E   More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
______________________________________________________ ERROR collecting tests/test_names.py ______________________________________________________
tests/test_names.py:3: in <module>
    from axisregistry import (
Lib/axisregistry/__init__.py:10: in <module>
    from axisregistry.axes_pb2 import AxisProto
Lib/axisregistry/axes_pb2.py:33: in <module>
    _descriptor.FieldDescriptor(
/usr/lib/python3.12/site-packages/google/protobuf/descriptor.py:621: in __new__
    _message.Message._CheckCalledFromGeneratedFile()
E   TypeError: Descriptors cannot be created directly.
E   If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
E    1. Downgrade the protobuf package to 3.20.x or lower.
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E   
E   More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
___________________________________________________ ERROR collecting tests/test_wellformed.py ____________________________________________________
tests/test_wellformed.py:2: in <module>
    from axisregistry import AxisRegistry
Lib/axisregistry/__init__.py:10: in <module>
    from axisregistry.axes_pb2 import AxisProto
Lib/axisregistry/axes_pb2.py:33: in <module>
    _descriptor.FieldDescriptor(
/usr/lib/python3.12/site-packages/google/protobuf/descriptor.py:621: in __new__
    _message.Message._CheckCalledFromGeneratedFile()
E   TypeError: Descriptors cannot be created directly.
E   If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
E    1. Downgrade the protobuf package to 3.20.x or lower.
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E   
E   More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
================================================================ warnings summary ================================================================
Lib/axisregistry/__init__.py:7
  /home/max/aurget/python-axisregistry/src/axisregistry-0.4.11/Lib/axisregistry/__init__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import resource_filename

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================ short test summary info =============================================================
ERROR tests/test_axisregistry_api.py - TypeError: Descriptors cannot be created directly.
ERROR tests/test_names.py - TypeError: Descriptors cannot be created directly.
ERROR tests/test_wellformed.py - TypeError: Descriptors cannot be created directly.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================== 1 warning, 3 errors in 0.40s ==========================================================

It works if I use the mentioned workaround, i.e. setting PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python but not sure if that is the correct fix. As I am unfamiliar with python protobuf I am not sure if that would be the correct "fix".