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

Add six.moves.collections.abc #155

Closed
benjaminp opened this issue May 29, 2016 · 7 comments
Closed

Add six.moves.collections.abc #155

benjaminp opened this issue May 29, 2016 · 7 comments

Comments

@benjaminp
Copy link
Owner

Originally reported by: Eklavya Sharma (Bitbucket: ekujupr, GitHub: Unknown)


I'm fed up of doing

try:
    import collections.abc as collections_abc # only works on python 3.3+
except ImportError:
    import collections as collections_abc

A six.moves.collections.abc would be very convenient.


@WildCard65
Copy link

Bumping this issue as Python 3.7 (once it release) may end up giving a deprecation warning for using classes from collections.abc in collections itself.

Reference: python/cpython#5460

@haikuginger
Copy link

I'm 👍 on this request. With the removal of the collections.abc items from collections in Python 3.8, now is the right time to do this so we can transition appropriately.

Reference: urllib3/urllib3#1324

medmunds added a commit to anymail/django-anymail that referenced this issue Aug 27, 2018
Python 3.3 moved various collections abstract base classes from
`collections` to `collections.abc`, but also kept them available in
`collections` for compatibility with Python 2. Python 3.8 will allow
importing only from `collections.abc`.

(`collections.abc` hasn't yet been added to six.moves; see
benjaminp/six#155.)
@NeilGirdhar
Copy link

Duplicate of #241

@nickwilliams-eventbrite

Duplicate of #241

This is not correct. This is an issue. #241 is a pull request. In fact, #241's comment specifically says that it resolves #155 (this). So ... this is not a duplicate. It's the companion issue to the #241 pull request.

@WildCard65
Copy link

To add onto what @nickwilliams-eventbrite said, should #241 get accepted, GitHub will automatically close this issue as the PR's comment has "closes " in it.

@NeilGirdhar
Copy link

oh right, sorry, was quickly searching for #241, and ran into this in the search.

@NeilGirdhar
Copy link

Although, it is confusing that most of the discussion there is about whether this should be done at all (that discussion should be here, I think).

pmhahn added a commit to univention/univention-corporate-server that referenced this issue Jul 5, 2020
This reverts commit 40d511e.

 > Traceback:
 > /usr/lib/python2.7/dist-packages/six.py:709: in exec_
 >     exec("""exec _code_ in _globs_, _locs_""")
 > tests/test_interfaces.py:13: in <module>
 >     from univention.config_registry.interfaces import _Iface, Interfaces, forgiving, cmp_alnum  # noqa E402
 > python/univention/config_registry/__init__.py:33: in <module>
 >     from univention.config_registry.backend import StrictModeException, SCOPE, ConfigRegistry  # noqa F401
 > python/univention/config_registry/backend.py:39: in <module>
 >     from collections.abc import MutableMapping
 > E   ImportError: No module named abc

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn added a commit to univention/univention-corporate-server that referenced this issue Jul 11, 2020
This reverts commit 40d511e.

 > Traceback:
 > /usr/lib/python2.7/dist-packages/six.py:709: in exec_
 >     exec("""exec _code_ in _globs_, _locs_""")
 > tests/test_interfaces.py:13: in <module>
 >     from univention.config_registry.interfaces import _Iface, Interfaces, forgiving, cmp_alnum  # noqa E402
 > python/univention/config_registry/__init__.py:33: in <module>
 >     from univention.config_registry.backend import StrictModeException, SCOPE, ConfigRegistry  # noqa F401
 > python/univention/config_registry/backend.py:39: in <module>
 >     from collections.abc import MutableMapping
 > E   ImportError: No module named abc

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn added a commit to univention/univention-corporate-server that referenced this issue Jul 11, 2020
This reverts commit 40d511e.

 > Traceback:
 > /usr/lib/python2.7/dist-packages/six.py:709: in exec_
 >     exec("""exec _code_ in _globs_, _locs_""")
 > tests/test_interfaces.py:13: in <module>
 >     from univention.config_registry.interfaces import _Iface, Interfaces, forgiving, cmp_alnum  # noqa E402
 > python/univention/config_registry/__init__.py:33: in <module>
 >     from univention.config_registry.backend import StrictModeException, SCOPE, ConfigRegistry  # noqa F401
 > python/univention/config_registry/backend.py:39: in <module>
 >     from collections.abc import MutableMapping
 > E   ImportError: No module named abc

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn added a commit to univention/univention-corporate-server that referenced this issue Jul 31, 2020
This reverts commit 40d511e.

 > Traceback:
 > /usr/lib/python2.7/dist-packages/six.py:709: in exec_
 >     exec("""exec _code_ in _globs_, _locs_""")
 > tests/test_interfaces.py:13: in <module>
 >     from univention.config_registry.interfaces import _Iface, Interfaces, forgiving, cmp_alnum  # noqa E402
 > python/univention/config_registry/__init__.py:33: in <module>
 >     from univention.config_registry.backend import StrictModeException, SCOPE, ConfigRegistry  # noqa F401
 > python/univention/config_registry/backend.py:39: in <module>
 >     from collections.abc import MutableMapping
 > E   ImportError: No module named abc

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn added a commit to univention/univention-corporate-server that referenced this issue Jul 31, 2020
This reverts commit 40d511e.

 > Traceback:
 > /usr/lib/python2.7/dist-packages/six.py:709: in exec_
 >     exec("""exec _code_ in _globs_, _locs_""")
 > tests/test_interfaces.py:13: in <module>
 >     from univention.config_registry.interfaces import _Iface, Interfaces, forgiving, cmp_alnum  # noqa E402
 > python/univention/config_registry/__init__.py:33: in <module>
 >     from univention.config_registry.backend import StrictModeException, SCOPE, ConfigRegistry  # noqa F401
 > python/univention/config_registry/backend.py:39: in <module>
 >     from collections.abc import MutableMapping
 > E   ImportError: No module named abc

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn added a commit to univention/univention-corporate-server that referenced this issue Aug 10, 2020
This reverts commit 40d511e.

 > Traceback:
 > /usr/lib/python2.7/dist-packages/six.py:709: in exec_
 >     exec("""exec _code_ in _globs_, _locs_""")
 > tests/test_interfaces.py:13: in <module>
 >     from univention.config_registry.interfaces import _Iface, Interfaces, forgiving, cmp_alnum  # noqa E402
 > python/univention/config_registry/__init__.py:33: in <module>
 >     from univention.config_registry.backend import StrictModeException, SCOPE, ConfigRegistry  # noqa F401
 > python/univention/config_registry/backend.py:39: in <module>
 >     from collections.abc import MutableMapping
 > E   ImportError: No module named abc

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Aug 15, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Aug 21, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Aug 21, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Aug 30, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 10, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 10, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 11, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 11, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 11, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 11, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 11, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 14, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 15, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 15, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 15, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 16, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 18, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 18, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 18, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 18, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 18, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 19, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 21, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 21, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
pmhahn pushed a commit to univention/univention-corporate-server that referenced this issue Sep 21, 2020
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated, and in 3.8 it will stop
working

There is no six.moves.collections.abc yet:
<benjaminp/six#155>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants