-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
COMPAT: Import abstract classes from collections.abc #22020
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
Comments
|
re six: it is an implicit dependency because dateutil requires it. It would simplify some of the intra-pandas dependencies if we got imports from six instead of pandas.compat. |
Since six provide some but not all compat things, keeping all import from pandas.compat seems more unified. What I suggest is from six import what's needed to pandas.compat, that will clean up code in pandas.compat. |
The End Of Life date of Python 2 is 2020-01-01, let's forget six and clean up the code in the future. |
@holymonson : I still think your collections proposal is reasonable though. Feel free to do a PR for that. |
We're planning to remove 2.7 support at the end of the year. If somewhat absolutely needs Python 3.8 support before then, they're welcome to update |
Numpy team has done it. numpy/numpy#10743
A problem is
collections_abc
being too long,isinstance(something, collections_abc.Iterable)
occupies half line, butfrom pandas.compat.collections_abc import Iterable
might pollute namespace.BTW,
pandas/compat/__init__.py
seems messy. Since Much of the code in this module comes from Benjamin Peterson's six library, why not require six like many other libraries do?The text was updated successfully, but these errors were encountered: