Skip to content

No CI for Python 3.10 yet #2274

@dgw

Description

@dgw

Tin. We've still not enabled a CI job for Python 3.10 because of various errors encountered along the way while attempting to do so.

Ultimately, the cause is probably related to pytest-dev/pytest#9174, an issue that was closed but it seems not confirmed fixed. Uncertainty remains as to whether fixing this problem is up to the pytest team or the core Python developers. It looks like a regression (breaking something that worked in Python 3.9 and prior versions) but it appears to be taking longer to sort out than the argparse stuff we dealt with a while back.

While we believe Sopel should run just fine on Python 3.10 in most cases, it's not currently possible to test Sopel on that version.

Log from last attempt (CPython 3.10.4, pytest 6.2.5
coverage run -m py.test -v . --vcr-record=none
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.[10](https://github.com/sopel-irc/sopel/runs/6252478452?check_suite_focus=true#step:7:10).4/x64/lib/python3.10/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 143, in main
    config = _prepareconfig(args, plugins)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 318, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 55, in _multicall
    gen.send(outcome)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
    config: Config = outcome.get_result()
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
    res = hook_impl.function(*args)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1003, in pytest_cmdline_parse
    self.parse(args)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1283, in parse
    self._preparse(args, addopts=addopts)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line [11](https://github.com/sopel-irc/sopel/runs/6252478452?check_suite_focus=true#step:7:11)72, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/pluggy/_manager.py", line 287, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/importlib/__init__.py", line [12](https://github.com/sopel-irc/sopel/runs/6252478452?check_suite_focus=true#step:7:12)6, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/home/runner/work/sopel/sopel/sopel/tests/pytest_plugin.py", line 12, in <module>
    from sopel import bot, loader, plugins, trigger
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/home/runner/work/sopel/sopel/sopel/bot.py", line 22, in <module>
    from sopel import db, irc, logger, plugin, plugins, tools
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/home/runner/work/sopel/sopel/sopel/irc/__init__.py", line 37, in <module>
    from .backends import AsynchatBackend, SSLAsynchatBackend
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/home/runner/work/sopel/sopel/sopel/irc/backends.py", line 20, in <module>
    from .abstract_backends import AbstractIRCBackend
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/home/runner/work/sopel/sopel/sopel/irc/abstract_backends.py", line 8, in <module>
    from .utils import safe
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/home/runner/work/sopel/sopel/sopel/irc/utils.py", line 8, in <module>
    from dns import rdtypes, resolver
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/dns/resolver.py", line 38, in <module>
    import dns.query
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/dns/query.py", line 42, in <module>
    import requests
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/requests/__init__.py", line [13](https://github.com/sopel-irc/sopel/runs/6252478452?check_suite_focus=true#step:7:13)3, in <module>
    from . import utils
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line [17](https://github.com/sopel-irc/sopel/runs/6252478452?check_suite_focus=true#step:7:17)0, in exec_module
    exec(co, module.__dict__)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/requests/utils.py", line 42, in <module>
    DEFAULT_CA_BUNDLE_PATH = certs.where()
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/certifi/core.py", line 37, in where
    _CACERT_PATH = str(_CACERT_CTX.__enter__())
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/contextlib.py", line 1[35](https://github.com/sopel-irc/sopel/runs/6252478452?check_suite_focus=true#step:7:35), in __enter__
    return next(self.gen)
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/importlib/_common.py", line 89, in _tempfile
    os.write(fd, reader())
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/importlib/abc.py", line [37](https://github.com/sopel-irc/sopel/runs/6252478452?check_suite_focus=true#step:7:37)1, in read_bytes
    with self.open('rb') as strm:
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/importlib/_adapters.py", line [54](https://github.com/sopel-irc/sopel/runs/6252478452?check_suite_focus=true#step:7:54), in open
    raise ValueError()
ValueError
make: *** [Makefile:17: test_norecord] Error 1
Error: Process completed with exit code 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions