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

py312: latest pytest still throws deprecations warnings with py312 #11515

Closed
ssbarnea opened this issue Oct 18, 2023 · 4 comments
Closed

py312: latest pytest still throws deprecations warnings with py312 #11515

ssbarnea opened this issue Oct 18, 2023 · 4 comments

Comments

@ssbarnea
Copy link
Member

At this moment both pytest main branch and latest release (7.4.2) do still produce deprecation warnings when run under pytest 3.12 and that is a problem for anyone that is following the practice of treating warnings as errors during testing.

I already seen projects going the long route of disabling these but the better approach is to address them and ensure that current versions do not produce them.

Example: https://sourcegraph.com/github.com/home-assistant/core/-/blob/pyproject.toml?L495-496

  .tox/py/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:916: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    template = ast.BinOp(assertmsg, ast.Add(), ast.Str(explanation))

Latest stable version, should not produce any deprecation warnings coming directly from its own code with py312.

@RonnyPfannschmidt
Copy link
Member

@bluetech can/should we backport #10894 ?

@bluetech
Copy link
Member

bluetech commented Oct 18, 2023 via email

@RonnyPfannschmidt
Copy link
Member

indeed, it was backported

@RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
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

No branches or pull requests

3 participants