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

Update to Python 3.12 #32548

Merged
merged 58 commits into from
Jun 11, 2024
Merged

Update to Python 3.12 #32548

merged 58 commits into from
Jun 11, 2024

Conversation

BBBmau
Copy link
Contributor

@BBBmau BBBmau commented May 27, 2024

Fixes #32516

Second PR was created due to the revert of Removing Pyenv

Same as the first PR, it uses a custom pypackage that uses metadrive with py3.12 support in order to get this merged now. Once the official metadrive repo updates and publishes a new release that supports 3.12 we can update it to use that one instead of this custom one.

https://pypi.org/project/metadrive-simulator-py3-12/

Copy link
Contributor

github-actions bot commented May 27, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@BBBmau
Copy link
Contributor Author

BBBmau commented May 27, 2024

error is just due to missing assets, fixing right now

@BBBmau
Copy link
Contributor Author

BBBmau commented May 27, 2024

metadrive is now failing in CI?

FAILED tools/sim/tests/test_metadrive_bridge.py::TestMetaDriveBridge::test_driving - AssertionError: Failed because no messages received, or CarEvents '[]' or processes not running '['soundd']'

@BBBmau
Copy link
Contributor Author

BBBmau commented May 27, 2024

I'll look into fixing the metadrive error, but this PR will be blocked until the work is done that gets google-crc32c on 3.12 support. Could be relatively soon based on this comment googleapis/python-crc32c#149 (comment)

pyproject.toml Outdated
@@ -140,14 +140,14 @@ inputs = "*"
Jinja2 = "*"
lru-dict = "*"
matplotlib = "*"
metadrive-simulator = { version = "0.4.2.3", markers = "platform_machine != 'aarch64'" } # no linux/aarch64 wheels for certain dependencies
metadrive-simulator-py3-12 = { version = "0.3.0", markers = "platform_machine != 'aarch64'" } # no linux/aarch64 wheels for certain dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

I pushed your branch to our fork. can you install from git? https://github.com/commaai/metadrive/tree/python3.12

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you'll want to update that branch, 0.2.0 had missing assets. 0.3.0 adds them

Copy link
Contributor

Choose a reason for hiding this comment

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

done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR now uses the git that you linked. I should mention that the repo as it stands does rely on a release to exist in order to download assets for metadrive use (assuming they're not there locally)

It'll work fine since it will download the assets from the release coming from my repo: https://github.com/BBBmau/metadrive/releases/tag/0.3.0 but i figured I'd bring this up. Not sure if you want to leave as is, this is technically a temporary fix until they support it on theirs.

@adeebshihadeh
Copy link
Contributor

Looks like MetaDrive is prepared to merge our PR. Let's wait for that before continuing this metadriverse/metadrive#720 (comment)

@BBBmau
Copy link
Contributor Author

BBBmau commented Jun 4, 2024

Looks like MetaDrive is prepared to merge our PR. Let's wait for that before continuing this metadriverse/metadrive#720 (comment)

@adeebshihadeh Sounds good, i made the changes to the metadrive PR though it looks to be blocked by other dependencies that have still not yet supported 3.12 also. They are actively working on it which is good to see.

ray-project/ray#45621

pyproject.toml Show resolved Hide resolved
.github/workflows/tools_tests.yaml Outdated Show resolved Hide resolved
@maxime-desroches maxime-desroches marked this pull request as ready for review June 11, 2024 20:45
@maxime-desroches maxime-desroches merged commit 148eaf8 into commaai:master Jun 11, 2024
16 checks passed
Edison-CBS pushed a commit to Edison-CBS/openpilot that referenced this pull request Sep 15, 2024
* 3.12

* pprofile is broken

* use modified metadrivepy3-12

* 0.3.0 metadrive

* add metadrive/commaai git dependency

* metadrive git set

* pin sounddevice 0.4.6

* datetime.utcnow() deprecation

* poetry lock

* make datetime not aware

* poetry lock

* pin pytools

* google_crc32c wheel

* unpin sounddevice

* clean metadrive

* use python crc

* mypy

* 3.12.4

* allow python3.11

* test

* no pip

* poetry

* better

* better

* merge

* remove

* try

* test

* try  this

* snok

* python

* simpler

* setuptools

* lower

* try

* try

* work?

* ubuntu deps

* ubuntu

* try

* remove

* move

* remove this

* names

* Update .github/workflows/tools_tests.yaml

Co-authored-by: Adeeb Shihadeh <[email protected]>

* python<4

* <3.13

---------

Co-authored-by: Adeeb Shihadeh <[email protected]>
Co-authored-by: Maxime Desroches <[email protected]>
old-commit-hash: 148eaf8
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.

[$250 bounty] Update to Python 3.12
3 participants