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
|
|
@ -44,7 +44,6 @@ def f():
|
|||
_loader = __loader__ if __loader__ is BuiltinImporter else type(__loader__)
|
||||
print('__loader__==%a' % _loader)
|
||||
print('__file__==%a' % __file__)
|
||||
print('__cached__==%a' % __cached__)
|
||||
print('__package__==%r' % __package__)
|
||||
# Check PEP 451 details
|
||||
import os.path
|
||||
|
|
@ -58,8 +57,6 @@ def f():
|
|||
assertEqual(__spec__.parent, __package__)
|
||||
assertIdentical(__spec__.submodule_search_locations, None)
|
||||
assertEqual(__spec__.origin, __file__)
|
||||
if __spec__.cached is not None:
|
||||
assertEqual(__spec__.cached, __cached__)
|
||||
# Check the sys module
|
||||
import sys
|
||||
assertIdentical(globals(), sys.modules[__name__].__dict__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue