Skip to content

BUG: unpickle of Timestamp should not generate deprecation warning #41949

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

Closed
jorisvandenbossche opened this issue Jun 11, 2021 · 1 comment · Fixed by #42138
Closed

BUG: unpickle of Timestamp should not generate deprecation warning #41949

jorisvandenbossche opened this issue Jun 11, 2021 · 1 comment · Fixed by #42138
Labels
Blocker Blocking issue or pull request for an upcoming release Bug Datetime Datetime data dtype Deprecate Functionality to remove in pandas
Milestone

Comments

@jorisvandenbossche
Copy link
Member

Currently we give a deprecation warning when unpickling:

In [10]: idx = pd.date_range("2012", periods=3, freq="D")

In [11]: res = pickle.dumps(idx[0])

In [12]: pickle.loads(res)
/home/joris/miniconda3/envs/dev/bin/ipython:1: FutureWarning: The 'freq' argument in Timestamp is deprecated and will be removed in a future version.
  #!/home/joris/miniconda3/envs/dev/bin/python
Out[12]: Timestamp('2012-01-01 00:00:00', freq='D')

We should ensure that unpickling a Timestamp does not generate a warning, only if the user afterwards accesses the freq as normal it should warn.

@jorisvandenbossche jorisvandenbossche added Bug Datetime Datetime data dtype Deprecate Functionality to remove in pandas labels Jun 11, 2021
@jorisvandenbossche jorisvandenbossche added this to the 1.3 milestone Jun 11, 2021
jsignell added a commit to dask/dask that referenced this issue Jun 14, 2021
Filter freq deprecation warning on pickle. If pandas-dev/pandas#41949 gets in prior to a release, then we can come back and remove any ignoring here.
@jorisvandenbossche jorisvandenbossche added the Blocker Blocking issue or pull request for an upcoming release label Jun 14, 2021
@jsignell
Copy link
Contributor

Thank you all for working on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker Blocking issue or pull request for an upcoming release Bug Datetime Datetime data dtype Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants