Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-39683: 2to3 fix_exitfunc suggests duplicated import of atexit module#18654

Closed
phsilva wants to merge 1 commit into
python:mainpython/cpython:mainfrom
phsilva:bpo-39683phsilva/cpython:bpo-39683Copy head branch name to clipboard
Closed

bpo-39683: 2to3 fix_exitfunc suggests duplicated import of atexit module#18654
phsilva wants to merge 1 commit into
python:mainpython/cpython:mainfrom
phsilva:bpo-39683phsilva/cpython:bpo-39683Copy head branch name to clipboard

Conversation

@phsilva

@phsilva phsilva commented Feb 25, 2020

Copy link
Copy Markdown
Contributor

2to3 fix for sys.exitfunc adds multiple imports when sys.exitfunc
is present multiple times.

This patch adds a check for already existing 'import atexit' and
do not add multiple imports.

https://bugs.python.org/issue39683

@codecov

codecov Bot commented Feb 25, 2020

Copy link
Copy Markdown

Codecov Report

Merging #18654 into master will increase coverage by 1.06%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #18654       +/-   ##
===========================================
+ Coverage   82.06%   83.13%    +1.06%     
===========================================
  Files        1956     1571      -385     
  Lines      589514   414887   -174627     
  Branches    44464    44465        +1     
===========================================
- Hits       483809   344928   -138881     
+ Misses      96052    60339    -35713     
+ Partials     9653     9620       -33     
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 428 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 eb8ac57...88488c3. Read the comment docs.

Comment thread Misc/NEWS.d/next/Tools-Demos/2020-02-25-01-08-58.bpo-39683.-fbPik.rst Outdated
2to3 fix for sys.exitfunc adds multiple import when sys.exitfunc
is present multiple times.

This patch adds a check for already existing 'import atexit' and
do not add multiple imports.
@iritkatriel

iritkatriel commented Oct 20, 2021

Copy link
Copy Markdown
Member

Closed under bpo-45544.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.