Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extra_standard_library = [
"_heapq",
"_markupbase",
"_random",
"_threading_local",
"_tkinter",
"_tracemalloc",
"_warnings",
Expand Down
1 change: 1 addition & 0 deletions stdlib/_threading_local.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ class _localimpl:
class local:
def __getattribute__(self, name: str) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
def __delattr__(self, name: str) -> None: ...
12 changes: 12 additions & 0 deletions test_cases/stdlib/test_threading.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import _threading_local
import threading

loc = threading.local()
loc.foo = 42
del loc.foo
loc.baz = ["spam", "eggs"]
del loc.baz

l2 = _threading_local.local()
l2.asdfasdf = 56
del l2.asdfasdf