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: Python 3.12 support #53665

Closed
1 task done
EwoutH opened this issue Jun 14, 2023 · 7 comments
Closed
1 task done

ENH: Python 3.12 support #53665

EwoutH opened this issue Jun 14, 2023 · 7 comments
Labels
Compat pandas objects compatability with Numpy or Python functions Enhancement Python 3.12

Comments

@EwoutH
Copy link
Contributor

EwoutH commented Jun 14, 2023

Feature Type

  • Adding platform support

Problem Description

Currently, Python 3.12 isn't fully supported in the Pandas library.

Feature Description

The solution we'd like to see is full support for Python 3.12, including testing in Continuous Integration (CI) and the publishing of compatible wheels to PyPI.

Alternative Solutions

Not applicable in this case, as the goal is specific to supporting a new version of Python.

Additional Context

Python 3.12 is expected to be released as stable later this year, bringing several new features and deprecations that can impact the Pandas library, including:

  • New grammar features:
    • PEP 701: Syntactic formalization of f-strings
  • New typing features:
    • PEP 688: Making the buffer protocol accessible in Python
    • PEP 692: Using TypedDict for more precise **kwargs typing
    • PEP 695: Type Parameter Syntax
    • PEP 698: Override Decorator for Static Typing
  • Important deprecations, removals, or restrictions:
    • PEP 623: Remove wstr from Unicode
    • PEP 632: Remove the distutils package

These changes may have implications for the usage and operation of the Pandas library, making it necessary for the library to adapt to this new version.

Pandas is one of the most used packages and a package on which many other packages depend, so early support will help speed up Python 3.12 adoption. It would be beneficial to have full Python 3.12 support in Pandas by the time Python 3.12.0 beta 1 gets released. This includes testing in CI and publishing wheels to PyPI.

@EwoutH EwoutH added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 14, 2023
@lithomas1 lithomas1 added Compat pandas objects compatability with Numpy or Python functions Python 3.12 Blocked and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 14, 2023
@lithomas1
Copy link
Member

lithomas1 commented Jun 14, 2023

Hi,
Thanks for the bug report.
We need at least numpy/Cython support before we can start on the pandas side, so gonna mark as blocked pending numpy/numpy#23808 (need at least numpy wheels). This means wheels will be out a little later than usual, but hopefully we can still get some in before the 3.12 final release.

Cython side should be OK as far as I can tell.

EDIT: typo

@EwoutH
Copy link
Contributor Author

EwoutH commented Jun 14, 2023

Thanks! That should be numpy/numpy#23808, right?

@lithomas1
Copy link
Member

Thanks, updated.

@EwoutH
Copy link
Contributor Author

EwoutH commented Jun 19, 2023

NumPy wheels are incoming: numpy/numpy#23991

@EwoutH
Copy link
Contributor Author

EwoutH commented Jun 20, 2023

NumPy wheels are online!

@EwoutH
Copy link
Contributor Author

EwoutH commented Sep 26, 2023

I see Python 3.12 wheels are now on PyPI for Pandas 2.1.1! Awesome work!

@mroeschke
Copy link
Member

Closing as 3.12 support has been released

miohtama added a commit to tradingstrategy-ai/web3-ethereum-defi that referenced this issue Nov 26, 2023
- Debian Bullseye and pyenv was picking up old web3-ethereum-defi version
- Create a Docker script to check installation on Debian Bullseye
- This did not then use the correct version of [safe-pysha3](https://github.com/5afe/pysha3), but picked up the old pysha3 package
- Make `pyproject.toml` to say we are compatible all they way to Python 3.12
- [pkgutil compatibility fixes](https://stackoverflow.com/questions/77364550/attributeerror-module-pkgutil-has-no-attribute-impimporter-did-you-mean).
- [Upgrade to Pandas 2.x](pandas-dev/pandas#53665), needed for Python 3.12 compatibility
- Upgrade to the latest Web3.py 6.x version
- Python 3.12 changes `ast` module and this has breaking changes with `eth_trace` library. Workaround them.
- Disable `test_fallback_double_fault` because new Web3.py does not like `MagicMock` results
- Bump to `zope.dottedname` 6.0 needed [for Python 3.11 compatibility](https://pypi.org/project/zope.dottedname/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Enhancement Python 3.12
Projects
None yet
Development

No branches or pull requests

3 participants