-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Conversation
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.
Looks good!
doc/source/whatsnew/v0.20.0.txt
Outdated
"pandas._period", "pandas._libs.period", "" | ||
"pandas._sparse", "pandas.core.sparse.libsparse", "" | ||
"pandas._testing", "pandas.util.libtesting", "" | ||
"pandas._testing", "pandas.util._testing", "" |
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.
Is there a specific reason we do not put this in _libs
?
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.
no moving
doc/source/whatsnew/v0.20.0.txt
Outdated
@@ -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`) |
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.
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
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.
done
pandas/util/hashing.py
Outdated
warnings.warn("pandas.util.hashing is deprecated and will be " | ||
"removed in a future version, import " | ||
"from pandas.util", | ||
FutureWarning, stacklevel=3) |
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.
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.
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.
done
@@ -1,5 +1,5 @@ | |||
from .pandas_vb_common import * | |||
from pandas.util.decorators import cache_readonly |
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.
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
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.
done
xref pandas-dev#13634 CLN: move pandas.util.* validators, depr_module, decorators, print_versions to _ leading
pandas/tools/hashing.py
Outdated
warnings.warn("pandas.tools.hashing is deprecated and will be " | ||
"removed in a future version, import " | ||
"from pandas.util", | ||
FutureWarning, stacklevel=3) |
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.
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.
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.
hmm, sure could do that.
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Will have to update the test too.
…On Thu, May 4, 2017 at 7:00 AM, Jeff Reback ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pandas/tools/hashing.py
<#16223 (comment)>:
> @@ -0,0 +1,18 @@
+import warnings
+import sys
+
+m = sys.modules['pandas.tools.hashing']
+for t in ['hash_pandas_object', 'hash_array']:
+
+ def outer(t=t):
+
+ def wrapper(*args, **kwargs):
+ from pandas import util
+ warnings.warn("pandas.tools.hashing is deprecated and will be "
+ "removed in a future version, import "
+ "from pandas.util",
+ FutureWarning, stacklevel=3)
hmm, sure could do that.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#16223 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIhpO2eai0OmpXj4EK5w3RJSmMOecks5r2b35gaJpZM4NQKIU>
.
|
nore that I didn't move |
already did |
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? |
does this not work with the latest released of dask? |
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) |
we. an tag a post release also fyi add to the release checklist |
* 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
* 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
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) ...
Deprecated in v0.20.0 xref pandas-devgh-16223
Deprecated in v0.20.0 xref gh-16223
Deprecated in v0.20.0 xref pandas-devgh-16223
xref #13634