-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Add Python 3.15 socket SSL and platform updates #15734
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
Changes from 4 commits
ffe0bbc
86a678d
76a3d35
2cfd182
4ea6af6
0d077ad
199c014
94dd724
a853d10
a58beaf
2e64dbf
15cc880
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,19 @@ PAGESIZE: Final[int] | |
| @disjoint_base | ||
| class mmap: | ||
| if sys.platform == "win32": | ||
| def __new__(cls, fileno: int, length: int, tagname: str | None = None, access: int = 0, offset: int = 0) -> Self: ... | ||
| if sys.version_info >= (3, 15): | ||
| def __new__( | ||
| cls, | ||
| fileno: int, | ||
| length: int, | ||
| tagname: str | None = None, | ||
| access: int = 0, | ||
| offset: int = 0, | ||
| *, | ||
| trackfd: bool = True, | ||
| ) -> Self: ... | ||
| else: | ||
| def __new__(cls, fileno: int, length: int, tagname: str | None = None, access: int = 0, offset: int = 0) -> Self: ... | ||
| else: | ||
| if sys.version_info >= (3, 13): | ||
| def __new__( | ||
|
|
@@ -53,11 +65,16 @@ class mmap: | |
| ) -> Self: ... | ||
|
|
||
| def close(self) -> None: ... | ||
| def flush(self, offset: int = 0, size: int = ..., /) -> None: ... | ||
| if sys.version_info >= (3, 15): | ||
| def flush(self, offset: int = 0, size: int = ..., /, *, flags: int = 0) -> None: ... | ||
| else: | ||
| def flush(self, offset: int = 0, size: int = ..., /) -> None: ... | ||
|
|
||
| def move(self, dest: int, src: int, count: int, /) -> None: ... | ||
| def read_byte(self) -> int: ... | ||
| def readline(self) -> bytes: ... | ||
| def resize(self, newsize: int, /) -> None: ... | ||
| if sys.version_info < (3, 15) or sys.platform != "darwin": | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. weird
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently this is correct: python/cpython#138276. It used to be available on all platforms (but it would fail on platforms without MREMAP), now it only exists if it works. |
||
| def resize(self, newsize: int, /) -> None: ... | ||
| if sys.platform != "win32": | ||
| def seek(self, pos: int, whence: Literal[0, 1, 2, 3, 4] = os.SEEK_SET, /) -> None: ... | ||
| else: | ||
|
|
@@ -69,12 +86,24 @@ class mmap: | |
| def __len__(self) -> int: ... | ||
| closed: bool | ||
| if sys.platform != "win32": | ||
| def madvise(self, option: int, start: int = 0, length: int = ..., /) -> None: ... | ||
| if sys.version_info >= (3, 15): | ||
| def madvise(self, option: int, start: int = 0, length: int | None = None, /) -> None: ... | ||
| else: | ||
| def madvise(self, option: int, start: int = 0, length: int = ..., /) -> None: ... | ||
|
|
||
| if sys.version_info >= (3, 15): | ||
| def find(self, view: ReadableBuffer, start: int | None = None, end: int | None = None, /) -> int: ... | ||
| def rfind(self, view: ReadableBuffer, start: int | None = None, end: int | None = None, /) -> int: ... | ||
|
|
||
| else: | ||
| def find(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ... | ||
| def rfind(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ... | ||
|
|
||
| def find(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ... | ||
| def rfind(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ... | ||
| def read(self, n: int | None = None, /) -> bytes: ... | ||
| def write(self, bytes: ReadableBuffer, /) -> int: ... | ||
| if sys.version_info >= (3, 15): | ||
| def set_name(self, name: str, /) -> None: ... | ||
|
|
||
| @overload | ||
| def __getitem__(self, key: SupportsIndex, /) -> int: ... | ||
| @overload | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,9 @@ def mac_ver( | |
| release: str = "", versioninfo: tuple[str, str, str] = ("", "", ""), machine: str = "" | ||
| ) -> tuple[str, tuple[str, str, str], str]: ... | ||
|
|
||
| if sys.version_info >= (3, 13): | ||
| if sys.version_info >= (3, 15): | ||
| pass | ||
| elif sys.version_info >= (3, 13): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm on mobile right now, so I can't select multiple rows, but can we fix the version_info check to use the standard format?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll change it so it's unconditionally |
||
| @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") | ||
| def java_ver( | ||
| release: str = "", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these definitely need the ()? magic trick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, I cleaned up a bunch more socket constants that should have been added.