Issue 30143: Using collections ABC from collections.abc rather than collections in 2to3 converted code (original) (raw)
Issue30143
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/74329
classification
Title: | Using collections ABC from collections.abc rather than collections in 2to3 converted code | ||
---|---|---|---|
Type: | enhancement | Stage: | resolved |
Components: | 2to3 (2.x to 3.x conversion tool) | Versions: | Python 3.7 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | benjamin.peterson, rhettinger, serhiy.storchaka | |
Priority: | normal | Keywords: |
Created on 2017-04-23 12:11 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 1262 | merged | serhiy.storchaka,2017-04-23 12:13 |
Messages (4) | ||
---|---|---|
msg292163 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-04-23 12:11 |
Proposed patch makes 2to3 generating a code that uses abstract collection classes Sequence and Mapping from collections.abc rather than collections. Since abstract collection classes now are defined in collections.abc and collections contains only aliases for compatibility, this is more idiomatic Python 3 code. | ||
msg306279 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-11-15 16:03 |
What are your thoughts about this Benjamin? | ||
msg306282 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2017-11-15 16:33 |
+1 I think this change will be essential. IIRC, elsewhere Guido approved a 3.7 change so that the ABC will no longer be visible in collections. | ||
msg306341 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-11-16 07:16 |
New changeset 0a2abdfca2495291809855cf7dfc6721c9c962e3 by Serhiy Storchaka in branch 'master': bpo-30143: 2to3 now generates a code that uses abstract collection classes (#1262) https://github.com/python/cpython/commit/0a2abdfca2495291809855cf7dfc6721c9c962e3 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:45 | admin | set | github: 74329 |
2017-11-16 07:19:42 | serhiy.storchaka | set | status: open -> closedresolution: fixedstage: patch review -> resolved |
2017-11-16 07:16:27 | serhiy.storchaka | set | messages: + |
2017-11-15 16:33:29 | rhettinger | set | nosy: + rhettingermessages: + |
2017-11-15 16:03:56 | serhiy.storchaka | set | messages: + |
2017-04-23 12:13:57 | serhiy.storchaka | set | pull_requests: + <pull%5Frequest1375> |
2017-04-23 12:11:25 | serhiy.storchaka | create |