Comments (3)
Thanks for the report, but this is not an issue with Polars.
The Python docs are really clear about this. DeprecationWarnings are ignored outside the current main.
Also, FutureWarning is not applicable here. It is intended for end users, not for developers. Polars should not throw any FutureWarnings.
If you want to see DeprecationWarnings outside of the main module, you can explicitly opt in to that:
import warnings
warnings.filterwarnings("always", category=DeprecationWarning)
from polars.
I am not sure. Users of a library that is written in Polars shouldn't see that deprecation warning. That warning is intended for the developers of that library, not the users up the stack.
from polars.
Sure but like this direct users of Polars who have defined their own convenience functions (e.g. @stfdxv ) risk not seeing the warning
The other extreme is to do what pandas currently does which is to always raise FutureWarning, which is always shown. This is too noisy in my opinion, users see warnings which they can't do anything about.
A middle-ground option, which I'm hoping pandas will move to too (long discussion here pandas-dev/pandas#54970), is:
- start by raising
DeprecationWarning
. This will be seen my library developers and end users directly invoking deprecated functions - after some time, change it to
FutureWarning
. This will be visible by everyone, including end users who have defined their own convenience functions (e.g. @stfdxv ) - finally, enforce the deprecation
Example following the Polars policy:
- Polars 0.20.11 deprecates
pl.col('a').meta.write_json
in favour ofpl.col('a').meta.serialize
, and emits aDeprecationWarning
- In Polars 1.1.0 (some time in the middle of the 1.x series? When there's a feeling that the next minor release will be the final non-breaking one? Up for discussion), the
DeprecationWarning
changes toFutureWarning
- In Polars 2.0.0,
Expr.meta.write_json
is removed
from polars.
Related Issues (20)
- Problem with join operations followed by sink_csv on LazyFrame HOT 2
- Expression IR todo log.
- Allow `pl.Expr.get` handle null index values in Aggregation context so that `pl.Expr.arg_min/arg_max` is always valid input HOT 5
- JSON Error should also report line HOT 2
- Enum literals evaluate to equal for CSE when one dtype is subset of another HOT 2
- SQL Query Hangs When Using scan_parquet off S3 HOT 5
- write_parquet(compression_level=X) has no effect HOT 1
- f32 values read from parquet file with `Float32` column are broken HOT 2
- dtype=pl.Object not respected when converting pandas object Series HOT 1
- Support `is_between` pushdown to Arrow
- SOLUTION IN COMMENTS: write_parquet() using pyarrow with a "partition_cols" of type "str" maps all partition values to "...". This is NOT an issue in pyarrow.parquet.write_to_dataset HOT 2
- PanicException: impl error, should be a list at this point "invalid series dtype: expected `List`, got `str`" HOT 3
- Lazily evaluated error expression HOT 2
- Unsorted positional inputs to pl.Expr.is_between should be sorted or raise an error HOT 3
- Memory issue whith extend df with column of type List
- Error constructing DataFrame from dict scalar HOT 5
- Convenience method to get the week-commencing-date of an ISO week number HOT 9
- `pl.from_records(series_of_structs)` used to work (in v0.20.8 to v0.20.15), but now errors (in v0.20.16) HOT 8
- Query plan bug with partitioned iceberg tables
- Incorrect SyntaxError for Positional Argument Following Keyword Argument in Polars Aggregation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polars.