Skip to content

fix: support Python 3.14 #5646

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

Merged
merged 21 commits into from
May 17, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_multiple_interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

sys.path.append(".")

if sys.version_info >= (3, 14):
if sys.version_info >= (3, 15):
import interpreters
elif sys.version_info >= (3, 13):
elif sys.version_info >= (3, 14):
import _interpreters as interpreters
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like they didn't do this rename in 3.14, so it should be _interpreters for 3.13 and 3.14. Maybe just get rid of the 3.15 and leave it as :

    if sys.version_info >= (3, 13):
        import _interpreters as interpreters

Or future proof it as:

    if sys.version_info >= (3, 13):
        try: 
            import interpreters
        except ImportError:
            import _interpreters as interpreters

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think there will be a pypi package for 3.14 eventually (though I think it was supposed to come to 3.13 originally, so who knows...), but let's just leave it as <3.15 for now.

elif sys.version_info >= (3, 12):
import _xxsubinterpreters as interpreters

Check failure on line 23 in tests/test_multiple_interpreters.py

View workflow job for this annotation

GitHub Actions / 🐍 3.13 • ubuntu-24.04 • x64

test_independent_subinterpreters ModuleNotFoundError: No module named '_xxsubinterpreters'
else:
pytest.skip("Test requires a the interpreters stdlib module")

Expand Down Expand Up @@ -87,7 +87,7 @@
sys.path.append(".")

if sys.version_info >= (3, 14):
import interpreters

Check failure on line 90 in tests/test_multiple_interpreters.py

View workflow job for this annotation

GitHub Actions / 🐍 3.14 • ubuntu-24.04 • x64

test_dependent_subinterpreters ModuleNotFoundError: No module named 'interpreters'
elif sys.version_info >= (3, 13):
import _interpreters as interpreters
elif sys.version_info >= (3, 12):
Expand Down
Loading