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
depr(rust, python): warn that, in a future version of Polars, constructing a Series with time-zone-aware datetimes will result in a dtype with UTC timezone #8908
Conversation
…cting a Series with time-zone-aware datetimes will result in a dtype with UTC timezone
Right, and on 0.18 we will not have this warning anymore right? |
It depends when you want to enforce the change - warning in 0.17.15, then enforcing in 0.18? TBH I'd be OK with that: so 0.18.x would be there to iron-out any issues, and 1.0.0 would be a solid release |
], | ||
"b": [float(i) for i in range(5)], | ||
} | ||
) | ||
.with_columns(pl.col("a").dt.replace_time_zone(time_zone)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting the time zone outside the constructor to avoid the warning (the constructor isn't the point of this test anyway) - likewise for the one below
I think that'd be fine. That would allow us to iron out these wrinkles. Now that I think of this, we should keep this one as a warning I think. User should be able to pass tz aware datetimes, but they must be aware that we convert them, so a warning does that. |
Sounds good! |
thanks for reviewing - shipping then! |
…cting a Series with time-zone-aware datetimes will result in a dtype with UTC timezone (#8908)
…cting a Series with time-zone-aware datetimes will result in a dtype with UTC timezone (pola-rs#8908)
…cting a Series with time-zone-aware datetimes will result in a dtype with UTC timezone (pola-rs#8908)
towards #8860
This will always raise a warning, which may be a bit annoying, but it's a custom warning class so users can filter it off if they wish (this is arguably better than making a breaking change with no warning?)