Skip to content

Add official support for Python 3.15#14527

Merged
bluetech merged 3 commits into
pytest-dev:mainfrom
bluetech:py315
May 27, 2026
Merged

Add official support for Python 3.15#14527
bluetech merged 3 commits into
pytest-dev:mainfrom
bluetech:py315

Conversation

@bluetech
Copy link
Copy Markdown
Member

Currently at beta 1.

Fix #14524.

Python 3.15b1 no longer sets `module.__cached__`. But
`module.__spec__.cached` is still set, is recommended over
`module.__cached__` by Python documentation, and it works for all
previous versions as well, so switch to that.

Ref:
https://docs.python.org/3.15/reference/datamodel.html#module.__file__
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label May 27, 2026
Comment thread pyproject.toml Outdated
# https://github.com/pytest-dev/pytest/pull/13057
'default::pytest.PytestFDWarning',
# https://github.com/pexpect/pexpect/issues/827
'ignore:.*use of forkpty\(\) may lead to deadlocks in the child:DeprecationWarning',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer

Suggested change
'ignore:.*use of forkpty\(\) may lead to deadlocks in the child:DeprecationWarning',
'ignore:.*use of forkpty\(\) may lead to deadlocks in the child:DeprecationWarning:ptyprocess',

here so that the ignore is more narrow, but I see we haven't done that for other ignores either, so I suppose this is more consistent as-is.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

bluetech added 2 commits May 27, 2026 22:38
…ython 3.15

Nothing we can do about it, needs a new pexpect release, so ignore for
now.
@bluetech bluetech enabled auto-merge May 27, 2026 19:39
@bluetech bluetech merged commit ea98f72 into pytest-dev:main May 27, 2026
36 checks passed
@bluetech bluetech deleted the py315 branch May 27, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python 3.15 support

3 participants