Skip to content

Maintain compatibility with Python 3.13#375

Merged
copybara-service[bot] merged 2 commits intogoogle-deepmind:masterfrom
daskol:compat/py313
Feb 24, 2025
Merged

Maintain compatibility with Python 3.13#375
copybara-service[bot] merged 2 commits intogoogle-deepmind:masterfrom
daskol:compat/py313

Conversation

@daskol
Copy link
Contributor

@daskol daskol commented Jan 10, 2025

Resolve #371.

@daskol daskol marked this pull request as ready for review January 10, 2025 18:15
@daskol
Copy link
Contributor Author

daskol commented Jan 14, 2025

Wheels dm-tree for Python 3.13 are missing. Building dm-tree from tarball with default gcc fails because of missing typedefs of uint8_t and uint64_t in absl/strings/internal/str_format/extension.h of vendored abseil library. Upstream issue is google-deepmind/tree#119.

@medaminezghal
Copy link

@daskol try to remove the "python_version < "3.13"" in the "https://github.com/google-deepmind/chex/blob/master/requirements/requirements-test.txt" file and rebuild the package.

- Resolve breacking change in `dataclasses`
- Update matrix of supported Pythons
- Update testing dependencies
- Minimal version with Python 3.13 support follows.
  - cloudpickle@3.1.0
  - dm-tree@0.1.9
@daskol
Copy link
Contributor Author

daskol commented Feb 9, 2025

@jakevdp Take a look at this PR, please. It became stale until I added support for Python 3.13 in google-deepmind/tree#123. Then Sergei Lebedev uploaded cp313 wheels in PyPI on the last days of January.

This branch is squashed and rebased on top of the latest changes in master.

@medaminezghal
Copy link

@stompchicken Could you approve this change and update the package to be compatible with python 3.13?

@daskol
Copy link
Contributor Author

daskol commented Feb 24, 2025

It seems that Google recently changed an indentation style (see here). I have adjusted test runner to preserve previous pylint configuration (indent width and E1120 error).

# String used as indentation unit.  The internal Google style guide mandates 2
# spaces.  Google's externaly-published style guide says 4, consistent with
# PEP 8.
indent-string='   '

Copy link
Member

@hbq1 hbq1 left a comment

Choose a reason for hiding this comment

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

Thanks for adjusting the new pylint!

@copybara-service copybara-service bot merged commit 6e930bc into google-deepmind:master Feb 24, 2025
9 checks passed
@daskol daskol deleted the compat/py313 branch February 24, 2025 19:07
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.

Failed in the test process in Python 3.13

3 participants