Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
53e600c2
Commit
53e600c2
authored
Jun 15, 2013
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #17177: update checkpyc to stop using imp
parent
ca5ff3a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Tools/scripts/checkpyc.py
Tools/scripts/checkpyc.py
+4
-4
No files found.
Tools/scripts/checkpyc.py
View file @
53e600c2
...
...
@@ -5,11 +5,11 @@
import
sys
import
os
from
stat
import
ST_MTIME
import
imp
import
imp
ortlib.util
# PEP 3147 compatibility (PYC Repository Directories)
cache_from_source
=
(
imp
.
cache_from_source
if
hasattr
(
imp
,
'get_tag'
)
else
lambda
path
:
path
+
'c'
)
cache_from_source
=
(
imp
ortlib
.
util
.
cache_from_source
if
sys
.
implementation
.
cache_tag
else
lambda
path
:
path
+
'c'
)
def
main
():
...
...
@@ -18,7 +18,7 @@ def main():
silent
=
(
sys
.
argv
[
1
]
==
'-s'
)
else
:
verbose
=
silent
=
False
MAGIC
=
imp
.
get_magic
()
MAGIC
=
imp
ortlib
.
util
.
MAGIC_NUMBER
if
not
silent
:
print
(
'Using MAGIC word'
,
repr
(
MAGIC
))
for
dirname
in
sys
.
path
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment