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: 0 additions & 1 deletion stdlib/@tests/stubtest_allowlists/py315.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ _struct.pack
_struct.pack_into
_thread.RLock.__exit__
_thread.lock.__exit__
copy.deepcopy
dataclasses.MISSING
dataclasses._MISSING_TYPE
dataclasses.field
Expand Down
9 changes: 7 additions & 2 deletions stdlib/copy.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ class _SupportsReplace(Protocol[_RT_co]):
# None in CPython but non-None in Jython
PyStringMap: Any

# Note: memo and _nil are internal kwargs.
def deepcopy(x: _T, memo: dict[int, Any] | None = None, _nil: Any = []) -> _T: ...
def copy(x: _T) -> _T: ...

if sys.version_info >= (3, 15):
def deepcopy(x: _T, memo: dict[int, Any] | None = None) -> _T: ...

else:
# Note: memo and _nil are internal kwargs.
def deepcopy(x: _T, memo: dict[int, Any] | None = None, _nil: Any = []) -> _T: ...

if sys.version_info >= (3, 13):
__all__ += ["replace"]
# The types accepted by `**changes` match those of `obj.__replace__`.
Expand Down