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

ENH: Support Python 3.11 #2592

Closed
EwoutH opened this issue Oct 11, 2022 · 4 comments · Fixed by #2627
Closed

ENH: Support Python 3.11 #2592

EwoutH opened this issue Oct 11, 2022 · 4 comments · Fixed by #2627

Comments

@EwoutH
Copy link
Contributor

EwoutH commented Oct 11, 2022

Python 3.11 is expected to be released as stable around October 24th, with many new features including:

  • PEP 657 -- Include Fine-Grained Error Locations in Tracebacks
  • PEP 654 -- Exception Groups and except*
  • PEP 673 -- Self Type
  • PEP 646-- Variadic Generics
  • PEP 680-- tomllib: Support for Parsing TOML in the Standard Library
  • PEP 675-- Arbitrary Literal String Type
  • PEP 655-- Marking individual TypedDict items as required or potentially-missing
  • bpo-46752-- Introduce task groups to asyncio
  • The Faster Cpython Project is already yielding some exciting results: this version of CPython 3.11 is ~ 19% faster on the geometric mean of the PyPerformance benchmarks, compared to 3.10.0.

The state of the Python 3.11 ecosystem is already great:

  • ✅ The regular scientific computing stack is in excellent shape. NumPy and Pandas support Python 3.11 and have wheels available, as do SciPy, Matplotlib and Seaborn. Tools like, Black and pre-commit and pytest also support Python 3.11.
  • The geospatial stack is build on top of those, and now also gaining Python 3.11 support very quickly
    • 🚀 fiona the CI passes for 3.11, wheel building is being worked on. See tracking issue: Support Python 3.11 Toblerity/Fiona#1087
    • ✅ shapely just released version 1.8.5, with 3.11 wheels on PyPI!
    • ✅ pyproj supports Python 3.11 and has wheels on PyPI
    • ✅ SQLAlchemy idem dito
    • ✅ rtree just released their 1.0.1 release which include Python 3.11 support and wheels!
    • ✅ geopy has a version-independent Python wheel available

GeoPandas is the glue that connects the whole geospatial Python stack. I think it would very well be possible to have full Python 3.11 support in GeoPandas before the official release! (currently planned for October 24th). Would that be a target to aim for?

@martinfleis
Copy link
Member

Given geopandas is pure python, it should be straightforward as soon as all dependencies have 3.11 support. If you'd like to figure out a CI env that may test it right now, go for it!

@EwoutH
Copy link
Contributor Author

EwoutH commented Oct 12, 2022

Thanks for getting back! I think aside from the GeoPandas dependencies, the CI relying on Conda will be the hold up. Conda is quite slow with adopting new Python versions. I don't think Conda is needed if all dependencies have wheels on PyPI available, right?

I think moving the dependencies and the optional docs/dev dependencies to the pyproject.toml would also help. The number of needed dependencies for each kind of job can be reduced quite a bit probably.

@martinfleis
Copy link
Member

I think aside from the GeoPandas dependencies, the CI relying on Conda will be the hold up. Conda is quite slow with adopting new Python versions. I don't think Conda is needed if all dependencies have wheels on PyPI available, right?

Yes, it can be a bit cumbersome initially. You don't need conda to install geopandas so we should also be able to create a CI env without it if we really want. It just adds some complexity to our CI setup I am not sure I am happy about.

I think moving the dependencies and the optional docs/dev dependencies to the pyproject.toml would also help.

See #2512

@EwoutH
Copy link
Contributor Author

EwoutH commented Oct 12, 2022

shapely just released version 1.8.5, with 3.11 wheels on PyPI! Only Fiona is left of the direct dependencies!

Conda is working on it, see tracking issue conda/conda#11170.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants