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

bpo-39674: Revert "bpo-25988: Do not expose abstract collection classes in the collections module. (GH-10596)" #18545

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Feb 18, 2020

This reverts commit ef092fe.

Update collections getattr() and documentation to defer aliases
removal to Python 3.10.

https://bugs.python.org/issue39674

…es in the collections module. (GH-10596)"

This reverts commit ef092fe.

Update collections __getattr__() and documentation to defer aliases
removal to Python 3.10.
@vstinner
Copy link
Member Author

Since https://bugs.python.org/issue39674 is controversial, I would prefer to get at least one formal approval of this revert from core developers.

cc @brettcannon @warsaw @serhiy-storchaka @gvanrossum @zooba

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I do not care about other removals, but this change looks affecting too much code.

@codecov
Copy link

codecov bot commented Feb 18, 2020

Codecov Report

Merging #18545 into master will decrease coverage by 1.13%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #18545       +/-   ##
===========================================
- Coverage   83.25%   82.12%    -1.14%     
===========================================
  Files        1571     1955      +384     
  Lines      414749   584050   +169301     
  Branches    44456    44457        +1     
===========================================
+ Hits       345302   479622   +134320     
- Misses      59795    94780    +34985     
+ Partials     9652     9648        -4     
Impacted Files Coverage Δ
Lib/distutils/tests/test_bdist_rpm.py 30.00% <0.00%> (-65.00%) ⬇️
Lib/distutils/command/bdist_rpm.py 7.63% <0.00%> (-56.88%) ⬇️
Lib/test/test_urllib2net.py 76.92% <0.00%> (-13.85%) ⬇️
Lib/test/test_smtpnet.py 78.57% <0.00%> (-7.15%) ⬇️
Lib/ftplib.py 63.85% <0.00%> (-6.06%) ⬇️
Lib/test/test_ftplib.py 87.11% <0.00%> (-4.72%) ⬇️
Tools/scripts/db2pickle.py 17.82% <0.00%> (-3.97%) ⬇️
Tools/scripts/pickle2db.py 16.98% <0.00%> (-3.78%) ⬇️
Lib/test/test_socket.py 71.94% <0.00%> (-3.77%) ⬇️
Lib/test/test_asyncio/test_base_events.py 91.84% <0.00%> (-3.30%) ⬇️
... and 436 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d38517...23383c6. Read the comment docs.

@vstinner
Copy link
Member Author

Data point from Fedora packages: around 65 packages failed to build because of commit ef092fe which removed the collections aliases.

See Miro's email: https://mail.python.org/archives/list/python-dev@python.org/message/LGGI42UEQMJVNW2ZHEP473Z7ZQ5BDBPL/

This revert should fix most of these packages. "most" because we don't know if packages build will fail for another reasons (maybe another deprecated function removed from Python 3.9).

@vstinner
Copy link
Member Author

Fedora packages reported failures to most packages upstream and for some of them, we even proposed fixes.

@vstinner
Copy link
Member Author

The macOS failure is: https://bugs.python.org/issue38691

@vstinner vstinner merged commit af5ee3f into python:master Feb 18, 2020
@vstinner vstinner deleted the revert_collections_abc branch February 18, 2020 15:28
@vstinner
Copy link
Member Author

Merged, thanks for the approval @serhiy-storchaka and @gvanrossum.

@terryjreedy
Copy link
Member

Shouldn't '3.8' in
"For backwards compatibility, they continue to be visible in this module through Python 3.8."
be changed to '3.9'?

FWIW, I also think this 1 reversion was the best thing to do and perhaps had more support than revert nothing and revert multiple things.

@vstinner
Copy link
Member Author

vstinner commented Mar 2, 2020

Shouldn't '3.8' in "For backwards compatibility, they continue to be visible in this module through Python 3.8." be changed to '3.9'?

Right: I created #18747 to update the doc.

Anthchirp added a commit to Anthchirp/cpython that referenced this pull request Apr 8, 2021
The deprecation originally slated for 3.9 was deferred to 3.10
(bpo-39674, pythonGH-18545) and the documentation on the 3.8 release was
updated accordingly (pythonGH-18748). However the deprecation notice in
the code was left as is, and still indicates deprecation with 3.9.
Anthchirp added a commit to Anthchirp/cpython that referenced this pull request Apr 8, 2021
The deprecation originally slated for 3.9 was deferred to 3.10
(bpo-39674, pythonGH-18545). However the deprecation notice in the release
was left as is, and still indicates deprecation with 3.9.

Also add a missing space in the message.
vstinner pushed a commit that referenced this pull request Apr 8, 2021
The deprecation originally slated for 3.9 was deferred to 3.10
(bpo-39674, GH-18545) and the documentation on the 3.8 release was
updated accordingly (GH-18748). However the deprecation notice in
the code was left as is, and still indicates deprecation with 3.9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants