Skip to content

CI failing on Python 3.12 #50

@DMRobertson

Description

@DMRobertson

E.g.


Run tox -e check_codestyle
.pkg: install_requires> python -I -m pip install setuptools wheel
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: get_requires_for_build_editable> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: install_requires_for_build_editable> python -I -m pip install wheel
.pkg: freeze> python -m pip freeze --all
.pkg: pip==23.3.1,setuptools==69.0.2,wheel==0.41.3
.pkg: build_wheel> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
check_codestyle: install_package_deps> python -I -m pip install PyCryptodome aiohttp attrs black==22.3.0 cachetools 'canonicaljson>=1.6.3' flake8==4.0.1 humanfriendly isort==5.9.3 jsonschema 'mautrix[detect_mimetype]' mypy-zope mypy==0.931 python-olm pyyaml tox types-PyYAML types-cachetools types-humanfriendly types-jsonschema unpaddedbase64
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [155 lines of output]
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.
      
        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.
      
      
      -- The CXX compiler identification is GNU 11.4.0
      -- The C compiler identification is GNU 11.4.0
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
      -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
      -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
      -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
      -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
      -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
      -- Configuring done (1.1s)
      -- Generating done (0.0s)
      -- Build files have been written to: /tmp/pip-install-7rrpuj_z/python-olm_775c5b3e5232407ea240aaa435ab8789/libolm/build
      [  1%] Building CXX object CMakeFiles/olm.dir/src/account.cpp.o
      [  3%] Building CXX object CMakeFiles/olm.dir/src/base64.cpp.o
      [  5%] Building CXX object CMakeFiles/olm.dir/src/cipher.cpp.o
      [  7%] Building CXX object CMakeFiles/olm.dir/src/crypto.cpp.o
      [  9%] Building CXX object CMakeFiles/olm.dir/src/memory.cpp.o
      [ 11%] Building CXX object CMakeFiles/olm.dir/src/message.cpp.o
      [ 13%] Building CXX object CMakeFiles/olm.dir/src/pickle.cpp.o
      [ 15%] Building CXX object CMakeFiles/olm.dir/src/ratchet.cpp.o
      [ 16%] Building CXX object CMakeFiles/olm.dir/src/session.cpp.o
      [ 18%] Building CXX object CMakeFiles/olm.dir/src/utility.cpp.o
      [ 20%] Building CXX object CMakeFiles/olm.dir/src/pk.cpp.o
      [ 22%] Building C object CMakeFiles/olm.dir/src/sas.c.o
      [ 24%] Building C object CMakeFiles/olm.dir/src/ed25519.c.o
      [ 26%] Building C object CMakeFiles/olm.dir/src/error.c.o
      [ 28%] Building C object CMakeFiles/olm.dir/src/inbound_group_session.c.o
      [ 30%] Building C object CMakeFiles/olm.dir/src/megolm.c.o
      [ 32%] Building CXX object CMakeFiles/olm.dir/src/olm.cpp.o
      [ 33%] Building C object CMakeFiles/olm.dir/src/outbound_group_session.c.o
      [ 35%] Building C object CMakeFiles/olm.dir/src/pickle_encoding.c.o
      [ 37%] Building C object CMakeFiles/olm.dir/lib/crypto-algorithms/aes.c.o
      [ 39%] Building C object CMakeFiles/olm.dir/lib/crypto-algorithms/sha256.c.o
      [ 41%] Building C object CMakeFiles/olm.dir/lib/curve25519-donna/curve25519-donna.c.o
      [ 43%] Linking CXX static library libolm.a
      [ 43%] Built target olm
      [ 45%] Building CXX object tests/CMakeFiles/test_base64.dir/test_base64.cpp.o
      [ 47%] Linking CXX executable test_base64
      [ 47%] Built target test_base64
      [ 49%] Building CXX object tests/CMakeFiles/test_crypto.dir/test_crypto.cpp.o
      [ 50%] Linking CXX executable test_crypto
      [ 50%] Built target test_crypto
      [ 52%] Building CXX object tests/CMakeFiles/test_group_session.dir/test_group_session.cpp.o
      [ 54%] Linking CXX executable test_group_session
      [ 54%] Built target test_group_session
      [ 56%] Building CXX object tests/CMakeFiles/test_list.dir/test_list.cpp.o
      [ 58%] Linking CXX executable test_list
      [ 58%] Built target test_list
      [ 60%] Building CXX object tests/CMakeFiles/test_megolm.dir/test_megolm.cpp.o
      [ 62%] Linking CXX executable test_megolm
      [ 62%] Built target test_megolm
Collecting PyCryptodome
  Downloading pycryptodome-3.19.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.4 kB)
Collecting aiohttp
  Downloading aiohttp-3.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.4 kB)
Collecting attrs
  Downloading attrs-23.1.0-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 4.7 MB/s eta 0:00:00
Collecting black==22.3.0
  Downloading black-22.3.0-py3-none-any.whl (153 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 153.9/153.9 kB 11.8 MB/s eta 0:00:00
Collecting cachetools
  Using cached cachetools-5.3.2-py3-none-any.whl.metadata (5.2 kB)
Collecting canonicaljson>=1.6.3
  Downloading canonicaljson-2.0.0-py3-none-any.whl (7.9 kB)
Collecting flake8==4.0.1
  Downloading flake8-4.0.1-py2.py3-none-any.whl (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.1/64.1 kB 14.8 MB/s eta 0:00:00
Collecting humanfriendly
  Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 kB 12.6 MB/s eta 0:00:00
Collecting isort==5.9.3
  Downloading isort-5.9.3-py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.1/106.1 kB 12.7 MB/s eta 0:00:00
Collecting jsonschema
  Downloading jsonschema-4.20.0-py3-none-any.whl.metadata (8.1 kB)
Collecting mypy-zope
  Downloading mypy_zope-1.0.1-py3-none-any.whl.metadata (6.3 kB)
Collecting mypy==0.931
  Downloading mypy-0.931-py3-none-any.whl (2.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 21.0 MB/s eta 0:00:00
Collecting python-olm
  Downloading python-olm-3.2.15.tar.gz (2.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 41.9 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): still running...
  Preparing metadata (pyproject.toml): finished with status 'error'
check_codestyle: exit 1 (66.68 seconds) /home/runner/work/matrix-content-scanner-python/matrix-content-scanner-python> python -I -m pip install PyCryptodome aiohttp attrs black==22.3.0 cachetools 'canonicaljson>=1.6.3' flake8==4.0.1 humanfriendly isort==5.9.3 jsonschema 'mautrix[detect_mimetype]' mypy-zope mypy==0.931 python-olm pyyaml tox types-PyYAML types-cachetools types-humanfriendly types-jsonschema unpaddedbase64 pid=2052
.pkg: _exit> python /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
      [ 64%] Building CXX object tests/CMakeFiles/test_message.dir/test_message.cpp.o
      [ 66%] Linking CXX executable test_message
      [ 66%] Built target test_message
      [ 67%] Building CXX object tests/CMakeFiles/test_olm.dir/test_olm.cpp.o
      [ 69%] Linking CXX executable test_olm
      [ 69%] Built target test_olm
      [ 71%] Building CXX object tests/CMakeFiles/test_olm_decrypt.dir/test_olm_decrypt.cpp.o
      [ 73%] Linking CXX executable test_olm_decrypt
      [ 73%] Built target test_olm_decrypt
      [ 75%] Building CXX object tests/CMakeFiles/test_olm_sha256.dir/test_olm_sha256.cpp.o
      [ 77%] Linking CXX executable test_olm_sha256
      [ 77%] Built target test_olm_sha256
      [ 79%] Building CXX object tests/CMakeFiles/test_olm_signature.dir/test_olm_signature.cpp.o
      [ 81%] Linking CXX executable test_olm_signature
      [ 81%] Built target test_olm_signature
      [ 83%] Building CXX object tests/CMakeFiles/test_olm_using_malloc.dir/test_olm_using_malloc.cpp.o
      [ 84%] Linking CXX executable test_olm_using_malloc
      [ 84%] Built target test_olm_using_malloc
      [ 86%] Building CXX object tests/CMakeFiles/test_session.dir/test_session.cpp.o
      [ 88%] Linking CXX executable test_session
      [ 88%] Built target test_session
      [ 90%] Building CXX object tests/CMakeFiles/test_pk.dir/test_pk.cpp.o
      [ 92%] Linking CXX executable test_pk
      [ 92%] Built target test_pk
      [ 94%] Building CXX object tests/CMakeFiles/test_sas.dir/test_sas.cpp.o
      [ 96%] Linking CXX executable test_sas
      [ 96%] Built target test_sas
      [ 98%] Building CXX object tests/CMakeFiles/test_ratchet.dir/test_ratchet.cpp.o
      [100%] Linking CXX executable test_ratchet
      [100%] Built target test_ratchet
      /tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:75: _MissingDynamic: `license` defined outside of `pyproject.toml` is ignored.
      !!
      
              ********************************************************************************
              The following seems to be defined outside of `pyproject.toml`:
      
              `license = 'Apache 2.0'`
      
              According to the spec (see the link below), however, setuptools CANNOT
              consider this value unless `license` is listed as `dynamic`.
      
              https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
      
              To prevent this problem, you can list `license` under `dynamic` or alternatively
              remove the `[project]` table from your file and rely entirely on other means of
              configuration.
              ********************************************************************************
      
      !!
        _handle_missing_dynamic(dist, project_table)
      /tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
        corresp(dist, value, root_dir)
      Traceback (most recent call last):
        File "/home/runner/work/matrix-content-scanner-python/matrix-content-scanner-python/.tox/check_codestyle/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/runner/work/matrix-content-scanner-python/matrix-content-scanner-python/.tox/check_codestyle/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/runner/work/matrix-content-scanner-python/matrix-content-scanner-python/.tox/check_codestyle/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 14, in <module>
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 159, in setup
          dist.parse_config_files()
        File "/home/runner/work/matrix-content-scanner-python/matrix-content-scanner-python/.tox/check_codestyle/lib/python3.12/site-packages/_virtualenv.py", line 23, in parse_config_files
          result = old_parse_config_files(self, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 627, in parse_config_files
          pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/config/pyprojecttoml.py", line 67, in apply_configuration
          return _apply(dist, config, filepath)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 56, in apply
          _apply_project_table(dist, config, root_dir)
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 82, in _apply_project_table
          corresp(dist, value, root_dir)
        File "/tmp/pip-build-env-56e2rp5f/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 183, in _license
          _set_config(dist, "license", val["text"])
                                       ~~~^^^^^^^^
      KeyError: 'text'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
  check_codestyle: FAIL code 1 (71.13 seconds)
  evaluation failed :( (71.30 seconds)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions