Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test invocation fails with Python 3.13.0~alpha2 #2903

Closed
befeleme opened this issue Dec 12, 2023 · 2 comments · Fixed by #2918
Closed

Test invocation fails with Python 3.13.0~alpha2 #2903

befeleme opened this issue Dec 12, 2023 · 2 comments · Fixed by #2918

Comments

@befeleme
Copy link

In Fedora Linux we try to build the Python libraries with Python 3.13.0 alpha versions.
Trio fails to build in our environment, more concretely the test invocation fail with a traceback below.

+ /usr/bin/pytest --pyargs trio -p trio._tests.pytest_plugin --verbose --skip-optional-imports
Traceback (most recent call last):
  File "/usr/bin/pytest", line 8, in <module>
    sys.exit(console_main())
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 192, in console_main
    code = main()
           ^^^^^^
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 150, in main
    config = _prepareconfig(args, plugins)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 331, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pluggy/_callers.py", line 130, in _multicall
    teardown[0].send(outcome)
  File "/usr/lib/python3.13/site-packages/_pytest/helpconfig.py", line 104, in pytest_cmdline_parse
    config: Config = outcome.get_result()
                     ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pluggy/_result.py", line 114, in get_result
    raise exc.with_traceback(exc.__traceback__)
  File "/usr/lib/python3.13/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1075, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1425, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1301, in _preparse
    self.pluginmanager.consider_preparse(args, exclude_only=False)
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 709, in consider_preparse
    self.consider_pluginarg(parg)
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 735, in consider_pluginarg
    self.import_plugin(arg, consider_entry_points=True)
  File "/usr/lib/python3.13/site-packages/_pytest/config/__init__.py", line 781, in import_plugin
    __import__(importspec)
  File "/builddir/build/BUILDROOT/python-trio-0.23.1-1.fc40.x86_64/usr/lib/python3.13/site-packages/trio/__init__.py", line 77, in <module>
    from ._path import Path as Path
  File "/builddir/build/BUILDROOT/python-trio-0.23.1-1.fc40.x86_64/usr/lib/python3.13/site-packages/trio/_path.py", line 201, in <module>
    class Path(metaclass=AsyncAutoWrapperType):
  File "/builddir/build/BUILDROOT/python-trio-0.23.1-1.fc40.x86_64/usr/lib/python3.13/site-packages/trio/_path.py", line 145, in __init__
    type(cls).generate_forwards(cls, attrs)
  File "/builddir/build/BUILDROOT/python-trio-0.23.1-1.fc40.x86_64/usr/lib/python3.13/site-packages/trio/_path.py", line 162, in generate_forwards
    raise TypeError(attr_name, type(attr))
TypeError: ('pathmod', <class 'module'>)
@A5rocks
Copy link
Contributor

A5rocks commented Dec 13, 2023

Unfortunately it appears that even if we fix this, one of our test deps (cryptography) doesn't support Python 3.13 yet :(

Oh and going up the chain of blockers, it seems that this won't be fixed until the betas.

@befeleme
Copy link
Author

I agree it's a very early heads-up at the moment.

FTR, we've built both cryptography 41.0.5 (https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-cryptography/) and cffi (https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-cffi/) with Python 3.13.0. The cffi's main branch already contains fixes for Python 3.13.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants