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

Tests fail on Python 3.12 #683

Open
jaraco opened this issue Apr 16, 2024 · 1 comment
Open

Tests fail on Python 3.12 #683

jaraco opened this issue Apr 16, 2024 · 1 comment
Labels
bug Something is broken triage

Comments

@jaraco
Copy link
Member

jaraco commented Apr 16, 2024

Attempting to run the tests on Python 3.12, they fail to start with DeprecationWarning.

.pkg: _optional_hooks> python '/Users/jaraco/Library/Application Support/pipx/venvs/tox/lib/python3.12/site-packages/pyproject_api/_backend.py' True setuptools.build_meta
.pkg: get_requires_for_build_editable> python '/Users/jaraco/Library/Application Support/pipx/venvs/tox/lib/python3.12/site-packages/pyproject_api/_backend.py' True setuptools.build_meta
.pkg: build_editable> python '/Users/jaraco/Library/Application Support/pipx/venvs/tox/lib/python3.12/site-packages/pyproject_api/_backend.py' True setuptools.build_meta
py: install_package> .tox/py/bin/python -bb -E -s /Users/jaraco/code/cherrypy/cheroot/bin/pip-wrapper py /Users/jaraco/code/cherrypy/cheroot/requirements/ install --force-reinstall --no-deps /Users/jaraco/code/cherrypy/cheroot/.tox/.tmp/package/13/cheroot-11.0.0b1.dev28+g3cd212f9-0.editable-py3-none-any.whl
py: commands_pre[0]> .tox/py/bin/python -bb -E -s -m OpenSSL.debug
pyOpenSSL: 24.1.0
cryptography: 42.0.5
cffi: 1.16.0
cryptography's compiled against OpenSSL: OpenSSL 3.2.1 30 Jan 2024
cryptography's linked OpenSSL: OpenSSL 3.2.1 30 Jan 2024
Python's OpenSSL: OpenSSL 3.2.1 30 Jan 2024
Python executable: /Users/jaraco/code/cherrypy/cheroot/.tox/py/bin/python
Python version: 3.12.2 (main, Feb  6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)]
Platform: darwin
sys.path: ['/Users/jaraco/code/cherrypy/cheroot', '/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python312.zip', '/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12', '/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload', '/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages']
py: commands[0]> .tox/py/bin/python -bb -E -s -m pytest
/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/config/__init__.py:324: PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
Plugin: helpconfig, Hook: pytest_cmdline_parse
DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
  config = pluginmanager.hook.pytest_cmdline_parse(
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pytest/__main__.py", line 5, in <module>
    raise SystemExit(pytest.console_main())
                     ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/config/__init__.py", line 187, in console_main
    code = main()
           ^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/config/__init__.py", line 145, in main
    config = _prepareconfig(args, plugins)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/config/__init__.py", line 324, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_hooks.py", line 501, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_manager.py", line 119, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_callers.py", line 155, in _multicall
    teardown[0].send(outcome)
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/helpconfig.py", line 102, in pytest_cmdline_parse
    config: Config = outcome.get_result()
                     ^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_result.py", line 99, in get_result
    raise exc.with_traceback(exc.__traceback__)
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_callers.py", line 102, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1017, in pytest_cmdline_parse
    self.parse(args)
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1305, in parse
    self._preparse(args, addopts=addopts)
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1207, in _preparse
    self.hook.pytest_load_initial_conftests(
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_hooks.py", line 501, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_manager.py", line 119, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_callers.py", line 181, in _multicall
    return outcome.get_result()
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_result.py", line 99, in get_result
    raise exc.with_traceback(exc.__traceback__)
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pluggy/_callers.py", line 102, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pytest_cov/plugin.py", line 126, in pytest_load_initial_conftests
    plugin = CovPlugin(options, early_config.pluginmanager)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/pytest_cov/plugin.py", line 172, in __init__
    from . import engine
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 159, in exec_module
    source_stat, co = _rewrite_test(fn, self.config)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 338, in _rewrite_test
    rewrite_asserts(tree, source, strfn, config)
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 399, in rewrite_asserts
    AssertionRewriter(module_path, config, source).run(mod)
  File "/Users/jaraco/code/cherrypy/cheroot/.tox/py/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 670, in run
    and isinstance(item.value, ast.Str)
                               ^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ast.py", line 1802, in __getattr__
    warnings._deprecated(
  File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/warnings.py", line 530, in _deprecated
    warn(msg, DeprecationWarning, stacklevel=3)
DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
py: exit 1 (0.15 seconds) /Users/jaraco/code/cherrypy/cheroot> .tox/py/bin/python -bb -E -s -m pytest pid=36137
  py: FAIL code 1 (1.11=setup[0.91]+cmd[0.05,0.15] seconds)
  evaluation failed :( (1.16 seconds)

@jaraco jaraco added bug Something is broken triage labels Apr 16, 2024
@webknjaz
Copy link
Member

FTR, yesterday the CI started running ARM64 macOS suddently: #696 (comment). I'll take care of it.

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

No branches or pull requests

2 participants