Skip to content

Add Python 3.14 Support#371

Open
lola831 wants to merge 7 commits intoBerkeleyLearnVerify:mainfrom
lola831:python-3.14-support
Open

Add Python 3.14 Support#371
lola831 wants to merge 7 commits intoBerkeleyLearnVerify:mainfrom
lola831:python-3.14-support

Conversation

@lola831
Copy link
Copy Markdown
Collaborator

@lola831 lola831 commented Aug 4, 2025

Description

This PR adds support for Python 3.14 in Scenic, including CI , tox, and dependency updates.

Dependency updates

  • Switched Scenic to use pygame-ce for Python 3.10+.
  • Kept pygame for Python versions below 3.10, since pygame-ce only supports Python 3.10+.
  • This change helps with Python 3.14 support, since pygame-ce provides Python 3.14 support.
  • Because Scenic and VerifAI depend on each other, both need the same conditional pygame --> pygame-ce change for Python 3.10+. (Related VerifAI PR: PR #61)
  • Updated the CARLA Python version guard from <= 3.10 to <= 3.12.

CI Support:

  • Added Python 3.14 to the GitHub Actions test matrix (run-tests.yml)
  • Enabled allow-prereleases: true to test against prereleases

Tox support:

  • Extended tox.ini to include Python 3.14 environments
  • Worked around an issue where scenic[metadrive] was being installed even when python_version > 3.11 by listing metadrive-simulator directly with the correct version guard

Pre-commit updates:

  • Updated black and isort to run under Python 3.14

Sphinx compatibility:

  • Increased the upper bound for sphinx to <8 to allow versions compatible with Python 3.14
  • Patched object_description in conf.py to accept **kwargs for compatibility with Sphinx ≥7.2 (which passes a _seen kwarg) while remaining backward-compatible with older versions

Documentation:

  • Added a note in the simulator docs reminding users that not all simulators may support the same range of Python versions, users should verify support per simulator.

Issue Link

Checklist

  • I have tested the changes locally via pytest and/or other means
  • I have added or updated relevant documentation
  • I have autoformatted the code with black and isort
  • I have added test cases (if applicable)

Additional Notes

@lola831 lola831 requested a review from dfremont August 4, 2025 19:26
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.74%. Comparing base (1798eaa) to head (2960769).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #371      +/-   ##
==========================================
+ Coverage   89.72%   89.74%   +0.01%     
==========================================
  Files          48       48              
  Lines       13190    13190              
==========================================
+ Hits        11835    11837       +2     
+ Misses       1355     1353       -2     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lola831 lola831 marked this pull request as ready for review April 2, 2026 22:04
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

Successfully merging this pull request may close these issues.

1 participant