Skip to content

Commit ff2ee1e

Browse files
authored
[tarfile/weakref] finalize.atexit and TarInfo.path are properties (#16333)
1 parent cf09d2a commit ff2ee1e

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

stdlib/tarfile.pyi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,6 @@ class TarInfo:
792792
"_link_target",
793793
)
794794
name: str
795-
path: str
796795
size: int
797796
mtime: int | float
798797
chksum: int
@@ -823,6 +822,11 @@ class TarInfo:
823822
@classmethod
824823
def fromtarfile(cls, tarfile: TarFile) -> Self: ...
825824

825+
@property
826+
def path(self) -> str: ...
827+
@path.setter
828+
def path(self, name: str) -> None: ...
829+
826830
@property
827831
def linkpath(self) -> str: ...
828832
@linkpath.setter

stdlib/weakref.pyi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,8 @@ class finalize(Generic[_P, _T]):
210210
def peek(self) -> tuple[_T, Callable[_P, Any], tuple[Any, ...], dict[str, Any]] | None: ...
211211
@property
212212
def alive(self) -> bool: ...
213-
atexit: bool
213+
214+
@property
215+
def atexit(self) -> bool: ...
216+
@atexit.setter
217+
def atexit(self, value: bool) -> None: ...

0 commit comments

Comments
 (0)