mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
This commit is contained in:
parent
a63cc21234
commit
f299abdafa
56 changed files with 4731 additions and 4621 deletions
|
@ -188,7 +188,7 @@ def warn(message, category=None, stacklevel=1):
|
|||
filename = globals.get('__file__')
|
||||
if filename:
|
||||
fnl = filename.lower()
|
||||
if fnl.endswith((".pyc", ".pyo")):
|
||||
if fnl.endswith(".pyc"):
|
||||
filename = filename[:-1]
|
||||
else:
|
||||
if module == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue