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.

Title: Using collections ABC from rather than collections in 2to3 converted code
Type: enhancement Stage: resolved
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.7
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) * (Python committer) Date: 2017-04-23 12:11
Proposed patch makes 2to3 generating a code that uses abstract collection classes Sequence and Mapping from rather than collections. Since abstract collection classes now are defined in and collections contains only aliases for compatibility, this is more idiomatic Python 3 code.
msg306279 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-15 16:03
What are your thoughts about this Benjamin?
msg306282 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) 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) * (Python committer) 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)
Date User Action Args
2022-04-11 14:58:45adminsetgithub: 74329
2017-11-16 07:19:42serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-11-16 07:16:27serhiy.storchakasetmessages: + msg306341
2017-11-15 16:33:29rhettingersetnosy: + rhettinger
messages: + msg306282
2017-11-15 16:03:56serhiy.storchakasetmessages: + msg306279
2017-04-23 12:13:57serhiy.storchakasetpull_requests: + pull_request1375
2017-04-23 12:11:25serhiy.storchakacreate