Skip to content

Add _thread.start_new_thread #1936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 25, 2020
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions Lib/_rp_thread.py

This file was deleted.

3 changes: 3 additions & 0 deletions Lib/_weakrefset.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,6 @@ def union(self, other):

def isdisjoint(self, other):
return len(self.intersection(other)) == 0

def __repr__(self):
return repr(self.data)
11 changes: 10 additions & 1 deletion Lib/importlib/_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,12 +1149,21 @@ def _setup(sys_module, _imp_module):

# Directly load built-in modules needed during bootstrap.
self_module = sys.modules[__name__]
for builtin_name in ('_thread', '_warnings', '_weakref'):
for builtin_name in ('_warnings', '_weakref'):
if builtin_name not in sys.modules:
builtin_module = _builtin_from_name(builtin_name)
else:
builtin_module = sys.modules[builtin_name]
setattr(self_module, builtin_name, builtin_module)
# _thread was part of the above loop, but other parts of the code allow for it
# to be None, so we handle it separately here
builtin_name = '_thread'
if builtin_name in sys.modules:
builtin_module = sys.modules[builtin_name]
else:
builtin_spec = BuiltinImporter.find_spec(builtin_name)
builtin_module = builtin_spec and _load_unlocked(builtin_spec)
setattr(self_module, builtin_name, builtin_module)


def _install(sys_module, _imp_module):
Expand Down
Loading