mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
GH-65961: Stop setting __cached__ on modules
This commit is contained in:
parent
e32c975640
commit
28f1334f1a
32 changed files with 93 additions and 240 deletions
|
|
@ -3408,20 +3408,20 @@ def _main():
|
|||
sys.exit(1)
|
||||
|
||||
if args.details:
|
||||
print('Target: {}'.format(target))
|
||||
print('Origin: {}'.format(getsourcefile(module)))
|
||||
print('Cached: {}'.format(module.__cached__))
|
||||
print(f'Target: {target}')
|
||||
print(f'Origin: {getsourcefile(module)}')
|
||||
print(f'Cached: {module.__spec__.cached}')
|
||||
if obj is module:
|
||||
print('Loader: {}'.format(repr(module.__loader__)))
|
||||
print(f'Loader: {module.__loader__!r}')
|
||||
if hasattr(module, '__path__'):
|
||||
print('Submodule search path: {}'.format(module.__path__))
|
||||
print(f'Submodule search path: {module.__path__}')
|
||||
else:
|
||||
try:
|
||||
__, lineno = findsource(obj)
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
print('Line: {}'.format(lineno))
|
||||
print(f'Line: {lineno}')
|
||||
|
||||
print()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue