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

Drop support for Python 3.9, require Python >= 3.10 #2132

Merged
merged 4 commits into from
May 8, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented May 7, 2024

Starting development for Mesa 3.0 and following SPEC 0 we can drop Python 3.9 support and require Python 3.10 or higher for future development. This allows adopting more modern Python features and simplifies the testing and CI configurations.

See the Python 3.10 release notes: https://docs.python.org/3/whatsnew/3.10.html

The 2.3.x release series will keep supporting Python 3.9.

EwoutH added 2 commits May 7, 2024 10:14
Starting development for Mesa 3.0 and following SPEC 0 we can drop Python 3.9 support and require Python 3.10 or higher for future development. This allows adopting more modern Python features and simplifies the testing and CI configurations.

See the Python 3.10 release notes: https://docs.python.org/3/whatsnew/3.10.html

The 2.3.x release series will keep supporting Python 3.9.
`X | Y` can now be used for type annotations, including making a variable optional with `X | None`
@EwoutH EwoutH requested review from rht and tpike3 May 7, 2024 08:20
Copy link

github-actions bot commented May 7, 2024

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
Schelling small 🔵 +0.3% [-0.0%, +0.6%] 🔵 +2.4% [+2.2%, +2.7%]
Schelling large 🔵 +0.1% [-0.7%, +1.0%] 🔵 +3.6% [+2.9%, +4.6%]
WolfSheep small 🔵 +1.0% [+0.2%, +1.8%] 🔵 +0.7% [+0.2%, +1.1%]
WolfSheep large 🔵 +0.8% [+0.5%, +1.0%] 🔵 +1.5% [-0.1%, +2.8%]
BoidFlockers small 🔵 +1.6% [+0.6%, +2.7%] 🔵 -0.2% [-1.0%, +0.6%]
BoidFlockers large 🔵 +1.9% [+1.2%, +2.5%] 🔵 -0.2% [-0.5%, +0.1%]

@rht
Copy link
Contributor

rht commented May 7, 2024

@EwoutH
Copy link
Member Author

EwoutH commented May 7, 2024

Good catch, added it.

The reason I opened a new PR because the previous one didn't move forward and looked incomplete. This one is a fresh take without conflicts including all the typing changes that can be made automatically.

We can do this now in Python 3.10!
@rht rht merged commit f4ae953 into projectmesa:main May 8, 2024
4 of 9 checks passed
@EwoutH EwoutH added the maintenance Release notes label label May 8, 2024
@EwoutH EwoutH added this to the [FUTURE] v3.0.0 milestone May 21, 2024
@EwoutH EwoutH deleted the drop_python_39 branch July 3, 2024 11:11
vitorfrois pushed a commit to vitorfrois/mesa that referenced this pull request Jul 15, 2024
* Drop support for Python 3.9, require Python >= 3.10

Starting development for Mesa 3.0 and following SPEC 0 we can drop Python 3.9 support and require Python 3.10 or higher for future development. This allows adopting more modern Python features and simplifies the testing and CI configurations.

See the Python 3.10 release notes: https://docs.python.org/3/whatsnew/3.10.html

The 2.3.x release series will keep supporting Python 3.9.

* Update type hinting for Python 3.10

`X | Y` can now be used for type annotations, including making a variable optional with `X | None`

* intro_tutorial.ipynb: Require Python 3.10

* typing: Replace Union with pipe (|)

We can do this now in Python 3.10!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants