Skip to content
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: correct deprecation message for datetools #16202

Merged
merged 1 commit into from
May 3, 2017

Conversation

jorisvandenbossche
Copy link
Member

Small error in the datetools depr message I just noticed:

Before ("Day.Day"):

In [33]: from pandas import datetools

In [34]: datetools.Day(1)
/home/joris/miniconda3/envs/dev/bin/ipython:1: FutureWarning: pandas.core.datetools.Day is deprecated. Please use pandas.tseries.offsets.Day.Day instead.
  #!/home/joris/miniconda3/envs/dev/bin/python
Out[34]: <Day>

After:

In [2]: datetools.Day(1)
/home/joris/miniconda3/envs/dev/bin/ipython:1: FutureWarning: pandas.core.datetools.Day is deprecated. Please use pandas.tseries.offsets.Day instead.
  #!/home/joris/miniconda3/envs/dev/bin/python
Out[2]: <Day>

@jorisvandenbossche jorisvandenbossche added the Deprecate Functionality to remove in pandas label May 2, 2017
@jorisvandenbossche jorisvandenbossche added this to the 0.20.0 milestone May 2, 2017
@codecov
Copy link

codecov bot commented May 2, 2017

Codecov Report

Merging #16202 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16202      +/-   ##
==========================================
- Coverage   90.86%   90.86%   -0.01%     
==========================================
  Files         162      162              
  Lines       50871    50871              
==========================================
- Hits        46225    46223       -2     
- Misses       4646     4648       +2
Flag Coverage Δ
#multiple 88.64% <100%> (-0.01%) ⬇️
#single 40.31% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/depr_module.py 79.06% <100%> (ø) ⬆️
pandas/core/common.py 90.68% <0%> (-0.35%) ⬇️
pandas/core/indexes/datetimes.py 95.33% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20fda22...d29e2a2. Read the comment docs.

@codecov
Copy link

codecov bot commented May 2, 2017

Codecov Report

Merging #16202 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16202      +/-   ##
==========================================
- Coverage   90.86%   90.86%   -0.01%     
==========================================
  Files         162      162              
  Lines       50871    50871              
==========================================
- Hits        46225    46223       -2     
- Misses       4646     4648       +2
Flag Coverage Δ
#multiple 88.64% <100%> (-0.01%) ⬇️
#single 40.31% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/depr_module.py 79.06% <100%> (ø) ⬆️
pandas/core/common.py 90.68% <0%> (-0.35%) ⬇️
pandas/core/indexes/datetimes.py 95.33% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20fda22...d29e2a2. Read the comment docs.

@TomAugspurger
Copy link
Contributor

This looks good.

We can do this elsewhere, but I noticed a couple of others that should be removed / moved in datetools.

  • ABCDataFrame
  • ABCSeries
  • ABCIndexClass
  • is_integer
  • is_scalar
  • notnull
  • normalize_date (move?)
  • DateParseError (do we need to expose this?)

Moves

  • is_timedelta64_dtype (maybe)
  • unique : pandas.unique
  • Timedelta: pandas.Timedelta

@jreback
Copy link
Contributor

jreback commented May 2, 2017

that entire module is deprecated I wouldn't change anything else.

@TomAugspurger TomAugspurger merged commit 02eafaf into pandas-dev:master May 3, 2017
@jorisvandenbossche
Copy link
Member Author

Yeah, Tom, I think the other ones you listed are normally not used from that module, so in principle we should add more manual redirects, but for those it is not a priority I think.

For the normalize_date there is a normalize method on Timestamp/DatetimeIndex as alternative, so not needed to move this I think

@jorisvandenbossche jorisvandenbossche deleted the depr-message branch May 3, 2017 22:15
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
yarikoptic added a commit to neurodebian/pandas that referenced this pull request Jul 12, 2017
Version 0.20.0

* tag 'v0.20.0': (742 commits)
  RLS: v0.20.0
  DOC: Whatsnew cleanup (pandas-dev#16245)
  TST: Test CategoricalIndex in test_is_categorical (pandas-dev#16243)
  TST: xfail some bottleneck on windows (pandas-dev#16240)
  DOC, TST: Document and Test Functions in dtypes/common.py (pandas-dev#16237)
  TST: Remove __init__ statements in testing (pandas-dev#16238)
  DOC: don't include all methods/attributes of IntervalIndex (pandas-dev#16221)
  PKG: Fix ModuleNotFoundError: No module named 'pandas.formats' (pandas-dev#16239)
  RLS: v0.20.0rc2
  CLN: make submodules of pandas.util private (pandas-dev#16223)
  MAINT: Remove tm.TestCase from testing (pandas-dev#16225)
  MAINT: Complete Conversion to Pytest Idiom (pandas-dev#16201)
  DOC: add whatsnew for 0.21.0
  DEPR: correct deprecation message for datetools (pandas-dev#16202)
  API Change repr name for table schema (pandas-dev#16204)
  DOC: Remove various warnings from doc build (pandas-dev#16206)
  DOC: add whatsnew for v0.20.1
  BUG: Fixed renaming of falsey names in build_table_schema (pandas-dev#16205)
  COMPAT: ensure proper extension dtype's don't pickle the cache (pandas-dev#16207)
  REF: register custom DisplayFormatter for table schema (pandas-dev#16198)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants