-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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-29770: remove outdated PYO related info #590
Merged
+25
−31
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5f6bcbf
remove outdated pyo info on *nix platforms
zhangyangyu ab26b41
remove outdated pyo info in getpathp.c
zhangyangyu d3b9957
remove outdated pyo info on Windows
zhangyangyu acaeebe
restore build changes and add two more doc changes
zhangyangyu 0fbe45d
restore
zhangyangyu 274c2e9
re-add rt.bat
zhangyangyu 3f44ebb
delete pyo files but not show them
zhangyangyu 8e672fc
remove delete in rmpyc.py
zhangyangyu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
# Remove all the .pyc and .pyo files under ../Lib. | ||
# Remove all the .pyc files under ../Lib. | ||
|
||
|
||
def deltree(root): | ||
import os | ||
from os.path import join | ||
|
||
npyc = npyo = 0 | ||
npyc = 0 | ||
for root, dirs, files in os.walk(root): | ||
for name in files: | ||
delete = False | ||
if name.endswith('.pyc'): | ||
delete = True | ||
# to be thorough | ||
if name.endswith(('.pyc', '.pyo')): | ||
npyc += 1 | ||
elif name.endswith('.pyo'): | ||
delete = True | ||
npyo += 1 | ||
|
||
if delete: | ||
os.remove(join(root, name)) | ||
|
||
return npyc, npyo | ||
return npyc | ||
|
||
npyc, npyo = deltree("../Lib") | ||
print(npyc, ".pyc deleted,", npyo, ".pyo deleted") | ||
npyc = deltree("../Lib") | ||
print(npyc, ".pyc deleted") | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ rem Usage: rt [-d] [-O] [-q] [-x64] regrtest_args | |
rem -d Run Debug build (python_d.exe). Else release build. | ||
rem -O Run python.exe or python_d.exe (see -d) with -O. | ||
rem -q "quick" -- normally the tests are run twice, the first time | ||
rem after deleting all the .py[co] files reachable from Lib/. | ||
rem -q runs the tests just once, and without deleting .py[co] files. | ||
rem after deleting all the .pyc files reachable from Lib/. | ||
rem -q runs the tests just once, and without deleting .pyc files. | ||
rem -x64 Run the 64-bit build of python (or python_d if -d was specified) | ||
rem from the 'amd64' dir instead of the 32-bit build in this dir. | ||
rem All leading instances of these switches are shifted off, and | ||
|
@@ -45,7 +45,7 @@ set exe=%prefix%python%suffix%.exe | |
set cmd="%exe%" %dashO% -u -Wd -E -bb -m test %regrtestargs% | ||
if defined qmode goto Qmode | ||
|
||
echo Deleting .pyc/.pyo files ... | ||
echo Deleting .pyc files ... | ||
"%exe%" "%pcbuild%rmpyc.py" | ||
|
||
echo Cleaning _pth files ... | ||
|
@@ -55,7 +55,7 @@ echo on | |
%cmd% | ||
@echo off | ||
|
||
echo About to run again without deleting .pyc/.pyo first: | ||
echo About to run again without deleting .pyc first: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the info! |
||
pause | ||
|
||
:Qmode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, but
rmpyc.py
should still delete.pyo
files, just to be thorough :). If you want to reduce it to justif name.endswith(('.pyc', '.pyo')):
on line 12, that would be fine with me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to reduce it since rt.bat is modified to just mention pyc. Then still output pyo info would lead to confusion in my mind.