first commit

This commit is contained in:
2025-08-07 13:15:31 +01:00
commit d903893b4c
21854 changed files with 4461308 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
import unittest
unittest.main('test.test_import')

View File

@ -0,0 +1,2 @@
"""Circular imports through direct, relative imports."""
from . import basic2

View File

@ -0,0 +1 @@
import test.test_import.data.circular_imports.binding2 as binding2

View File

@ -0,0 +1 @@
import test.test_import.data.circular_imports.binding as binding

View File

@ -0,0 +1,2 @@
from .from_cycle2 import a
b = 1

View File

@ -0,0 +1,2 @@
from .from_cycle1 import b
a = 1

View File

@ -0,0 +1 @@
from . import basic, basic2

View File

@ -0,0 +1,3 @@
"""Test the binding of names when a circular import shares the same name as an
attribute."""
from .rebinding2 import util

View File

@ -0,0 +1,3 @@
from .subpkg import util
from . import rebinding
util = util.util

View File

@ -0,0 +1,2 @@
from . import use
spam = 1

View File

@ -0,0 +1,2 @@
"""Circular import involving a sub-package."""
from .subpkg import subpackage2

View File

@ -0,0 +1,2 @@
#from .util import util
from .. import subpackage

View File

@ -0,0 +1,2 @@
from . import source
source.spam

View File

@ -0,0 +1,2 @@
import package.submodule
package.submodule

View File

@ -0,0 +1,3 @@
import sys
sys.modules.pop(__package__, None)
from . import submodule2

View File

@ -0,0 +1,12 @@
import sys
class MyMod(object):
__slots__ = ['__builtins__', '__cached__', '__doc__',
'__file__', '__loader__', '__name__',
'__package__', '__path__', '__spec__']
def __init__(self):
for attr in self.__slots__:
setattr(self, attr, globals()[attr])
sys.modules[__name__] = MyMod()