Skip to content

Migrate to pyproject.toml #131

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

Merged
merged 34 commits into from
Aug 14, 2024
Merged

Migrate to pyproject.toml #131

merged 34 commits into from
Aug 14, 2024

Conversation

fsoubelet
Copy link
Member

@fsoubelet fsoubelet commented Aug 12, 2024

Next in the wave of PRs transitioning our packages to using the standard pyproject.toml file.

Important

The setup.py file is gone. A pyproject.toml file now centralises everything, including metadata conformly to PEP621.

I have put down hatchling as a build backend, as it is the one developped by PyPA, the Python Packaging Authority, as they publish the authoritative user guide. This has little impact though, as any PEP518-compliant backend would work there instead.

Like for all other packages, this moves the minimum supported Python version to 3.9.

Details

I have put Hatch as a packaging tool as it is also the one from PyPA, but it is strictly optional. One does not need Hatch, because standards. The new common workflows (PR upcoming) don't even use it.

I have taken upon me to up some minimum required versions (numpy for instance), for uniformity with the rest of the packages.

@fsoubelet fsoubelet added Type: Feature A (suggetion for a) new feature or enhancement in functionality. Feature Request labels Aug 12, 2024
@fsoubelet fsoubelet requested a review from JoschD August 12, 2024 11:56
@fsoubelet fsoubelet self-assigned this Aug 12, 2024
@fsoubelet fsoubelet changed the title Migrate to pyproject.toml, update for numpy 2.0 Migrate to pyproject.toml Aug 12, 2024
@fsoubelet
Copy link
Member Author

Note: tests are failing here as pytables still does not have a release compatible with numpy 2.x. Setting in your environments numpy<2.0 will let you pass the tests without issue.

@JoschD what do you think is a good course of action? I say we can merge this as it does not yield a release, and changes nothing to the status of tfs-pandas on master: package is fine, numpy 2-compatible, but pytables is a bottleneck.

JoschD
JoschD previously approved these changes Aug 13, 2024
@JoschD JoschD self-requested a review August 13, 2024 11:52
@JoschD JoschD dismissed their stale review August 13, 2024 11:53

because of failing tests

@fsoubelet
Copy link
Member Author

fsoubelet commented Aug 13, 2024

Status

@JoschD

A new version of pytables was released today with compatibility for numpy 2.x. This is great.

However, they failed declaring numpy 2.x as accepted in their config: PyTables/PyTables#1200. It still runs fine with numpy 2.0 though. Additionnally, this new release dropped support for Python 3.9, which we do still support.

I have then put some conditionals in our required versions for the hdf5 extra, as follows:

  • We require pytables>=3.9 which pulls 3.9 on Python 3.9 and 3.10 on Python 3.10.
  • On Python < 3.10 (so, 3.9.x as we require 3.9) we forbid numpy 2.x. This ensures no issues (as on 3.9 one can't get a compatible pytables).
  • On Python >= 3.10 we allow numpy 2.x, by simply asking >= 1.24. Users would be able to get a pytables version compatible (once 3.10.1 is released on their side with dependency specification fix).

I have added TODOs in the pyproject.toml. As soon as we drop support for Python 3.9, ideally pytables 3.10.1 is out and we require it. We can also then relax the numpy constraint.

I would suggest a patch release with this new configuration, so that users encounter less dependency issues.

@fsoubelet fsoubelet merged commit d106b27 into master Aug 14, 2024
21 checks passed
@fsoubelet fsoubelet deleted the pyproject branch August 14, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature A (suggetion for a) new feature or enhancement in functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants