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

CLN: make submodules of pandas.util private #16223

Merged
merged 3 commits into from
May 4, 2017
Merged

Conversation

jreback
Copy link
Contributor

@jreback jreback commented May 4, 2017

xref #13634

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

"pandas._period", "pandas._libs.period", ""
"pandas._sparse", "pandas.core.sparse.libsparse", ""
"pandas._testing", "pandas.util.libtesting", ""
"pandas._testing", "pandas.util._testing", ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific reason we do not put this in _libs ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no moving

@@ -1254,6 +1254,8 @@ these are now the public subpackages.

- The function :func:`~pandas.api.types.union_categoricals` is now importable from ``pandas.api.types``, formerly from ``pandas.types.concat`` (:issue:`15998`)
- The type import ``pandas.tslib.NaTType`` is deprecated and can be replaced by using ``type(pandas.NaT)`` (:issue:`16146`)
- The public functions in ``pandas.util.hashing`` deprecated from that locations, but are now importable from ``pandas.util`` (:issue:`16223`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed (the util.hashing module is new, not yet released), but you might need to update the entry about the move from tools.hashing to utils.hashing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

warnings.warn("pandas.util.hashing is deprecated and will be "
"removed in a future version, import "
"from pandas.util",
FutureWarning, stacklevel=3)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed I think, as I said above, see my recent PR here: https://github.com/pandas-dev/pandas/pull/16086/files, this was moved from pandas.tools to util.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -1,5 +1,5 @@
from .pandas_vb_common import *
from pandas.util.decorators import cache_readonly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do the public import here. But, you will also have to try the older import paths.

The hashing imports also can use an update I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

xref pandas-dev#13634

CLN: move pandas.util.*

validators, depr_module, decorators, print_versions

to _ leading
warnings.warn("pandas.tools.hashing is deprecated and will be "
"removed in a future version, import "
"from pandas.util",
FutureWarning, stacklevel=3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on making this one a DeprecationWarning? The only reason I ask is that dask did a release yesterday. Could do a point release fixing this if needed though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, sure could do that.

@codecov
Copy link

codecov bot commented May 4, 2017

Codecov Report

Merging #16223 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16223      +/-   ##
==========================================
- Coverage   90.25%   90.24%   -0.02%     
==========================================
  Files         162      164       +2     
  Lines       50879    50894      +15     
==========================================
+ Hits        45922    45927       +5     
- Misses       4957     4967      +10
Flag Coverage Δ
#multiple 88.02% <100%> (ø) ⬆️
#single 40.3% <77.35%> (-0.12%) ⬇️
Impacted Files Coverage Δ
pandas/util/_validators.py 93.75% <ø> (ø)
pandas/io/clipboard/exceptions.py 71.42% <ø> (ø)
pandas/util/_decorators.py 65.3% <ø> (ø)
pandas/util/_print_versions.py 15.71% <ø> (ø)
pandas/io/clipboard/__init__.py 73.8% <ø> (ø)
pandas/io/formats/terminal.py 47.82% <ø> (ø)
pandas/util/_doctools.py 0% <ø> (ø)
pandas/compat/pickle_compat.py 69.51% <ø> (ø) ⬆️
pandas/io/clipboard/windows.py 11.62% <ø> (ø)
pandas/io/clipboard/clipboard.py 100% <ø> (ø)
... and 59 more

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 1f5ecc9...0245cd7. Read the comment docs.

@codecov
Copy link

codecov bot commented May 4, 2017

Codecov Report

Merging #16223 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16223      +/-   ##
==========================================
- Coverage   90.25%   90.23%   -0.02%     
==========================================
  Files         162      164       +2     
  Lines       50879    50894      +15     
==========================================
+ Hits        45922    45926       +4     
- Misses       4957     4968      +11
Flag Coverage Δ
#multiple 88.02% <100%> (-0.01%) ⬇️
#single 40.3% <77.35%> (-0.12%) ⬇️
Impacted Files Coverage Δ
pandas/io/clipboard/clipboards.py 26.58% <ø> (ø)
pandas/util/_doctools.py 0% <ø> (ø)
pandas/util/_decorators.py 65.3% <ø> (ø)
pandas/util/_validators.py 93.75% <ø> (ø)
pandas/io/clipboard/exceptions.py 71.42% <ø> (ø)
pandas/io/clipboard/windows.py 11.62% <ø> (ø)
pandas/io/clipboard/clipboard.py 100% <ø> (ø)
pandas/util/_print_versions.py 15.71% <ø> (ø)
pandas/compat/pickle_compat.py 69.51% <ø> (ø) ⬆️
pandas/util/_depr_module.py 79.06% <ø> (ø)
... and 59 more

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 1f5ecc9...0245cd7. Read the comment docs.

@TomAugspurger
Copy link
Contributor

TomAugspurger commented May 4, 2017 via email

@jreback
Copy link
Contributor Author

jreback commented May 4, 2017

nore that I didn't move pandas.util.testing as I suspect this is heavily used like pandas.core. So will need to do something about that later.

@jreback
Copy link
Contributor Author

jreback commented May 4, 2017

Will have to update the test too.

already did

@jorisvandenbossche
Copy link
Member

Damn, this broke geopandas .. (we were apparently already using cache_readonly from utils.decorators)

And this will also break released version of dask (not master, as you already did a pr for that)

Any chance in doing a quick fix (0.20.1) before sending out the announcement?

@jreback
Copy link
Contributor Author

jreback commented May 5, 2017

does this not work with the latest released of dask?

@jorisvandenbossche
Copy link
Member

Yes, a clean install of pandas and dask currently does not work.

Can we somehow 'hide' the conda packages for a moment? (I hided the release on pypi as there are no wheels yet)

@jreback
Copy link
Contributor Author

jreback commented May 5, 2017

we. an tag a post release
i think it's 0.20.0.post i think is valid

also fyi add to the release checklist
pypi upload is very last step (or ok if u immediately hide)
until conda and wheels are there we want to hide

pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
* CLN: make submodules of pandas.util private

xref pandas-dev#13634

CLN: move pandas.util.*

validators, depr_module, decorators, print_versions

to _ leading

* CLN: move remaning extensions to _libs

* pandas.tools.hashing FutureWarning -> DeprecationWarning
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
* CLN: make submodules of pandas.util private

xref pandas-dev#13634

CLN: move pandas.util.*

validators, depr_module, decorators, print_versions

to _ leading

* CLN: move remaning extensions to _libs

* pandas.tools.hashing FutureWarning -> DeprecationWarning
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)
  ...
gfyoung added a commit to forking-repos/pandas that referenced this pull request Jan 11, 2018
jreback pushed a commit that referenced this pull request Jan 11, 2018
maximveksler pushed a commit to maximveksler/pandas that referenced this pull request Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants