-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
build(python)!: Streamline optional dependency definitions in pyproject.toml
#17168
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
breaking
Change that breaks backwards compatibility
build
Changes that affect the build system or external dependencies
python
Related to Python Polars
labels
Jun 24, 2024
stinodego
requested review from
ritchie46,
c-peters,
alexander-beedie,
MarcoGorelli and
reswqa
as code owners
June 24, 2024 22:23
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17168 +/- ##
==========================================
- Coverage 80.94% 80.94% -0.01%
==========================================
Files 1464 1464
Lines 191928 191928
Branches 2742 2742
==========================================
- Hits 155349 155347 -2
- Misses 36070 36072 +2
Partials 509 509 ☔ View full report in Codecov by Sentry. |
stinodego
changed the title
build(python)!: Streamline optional 'extra' dependency groups
build(python)!: Streamline optional dependency definitions in Jun 25, 2024
pyproject.toml
alexander-beedie
pushed a commit
to alexander-beedie/polars
that referenced
this pull request
Jun 26, 2024
alexander-beedie
pushed a commit
to alexander-beedie/polars
that referenced
this pull request
Jun 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Credit to @alexander-beedie for the initial work in #17064
Closes #17143
Changes
Breaking:
fastexcel
group was renamed tocalamine
to align with the engine name in the API.async
group now installsgevent
instead ofnest-asyncio
. Thegevent
group was removed.nest-asyncio
is installed as part of the newdatabase
group.matplotlib
group was renamed tograph
, since it enables theLazyFrame.show_graph
functionality.Non-breaking:
adbc
andplot
group now also install pandas/pyarrow, which are required for them to work.excel
anddatabase
install all the engines for their respective functionality.Rationale
Here's the logic by which the new extras group structure was constructed:
to_numpy
is tied to NumPy, and thexlsx2csv
dependency is tied to a specific engine forread_excel
. These get their own key.polars[pyarrow]
so that we need to define the minimum dependency version only once.all
group is included for convenience. Again, this is not recommended for production use.Users are advised to explicitly mention the extras that they use when installing Polars, e.g.
polars[numpy]
when relying on Polars NumPy interop. This will make sure your dependencies are compatible.Example
Before:
pip install 'polars[fastexcel,gevent,matplotlib]'
After:
pip install 'polars[calamine,async,graph]'