-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add 3.14 Deprecations #14289
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
base: main
Are you sure you want to change the base?
Add 3.14 Deprecations #14289
Changes from 12 commits
87447ec
2e34041
c52f786
7b92886
5c5315a
74badea
0f14bad
da6d451
6661c35
1e2e617
ed65903
2bffae4
647bb88
d40fc6c
83efd5d
90c97d4
7eccbac
4f5c981
28a1743
3de835b
8c44563
94c49d6
7d0fb15
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 |
---|---|---|
@@ -1,25 +1,27 @@ | ||
from __future__ import annotations | ||
|
||
import sys | ||
from asyncio import iscoroutinefunction | ||
from collections.abc import Awaitable, Callable, Coroutine | ||
from typing import Any | ||
from typing_extensions import assert_type | ||
|
||
if sys.version_info < (3, 14): | ||
|
||
def test_iscoroutinefunction( | ||
x: Callable[[str, int], Coroutine[str, int, bytes]], | ||
y: Callable[[str, int], Awaitable[bytes]], | ||
z: Callable[[str, int], str | Awaitable[bytes]], | ||
xx: object, | ||
) -> None: | ||
if iscoroutinefunction(x): | ||
assert_type(x, Callable[[str, int], Coroutine[str, int, bytes]]) | ||
def test_iscoroutinefunction( | ||
x: Callable[[str, int], Coroutine[str, int, bytes]], | ||
y: Callable[[str, int], Awaitable[bytes]], | ||
z: Callable[[str, int], str | Awaitable[bytes]], | ||
xx: object, | ||
) -> None: | ||
if iscoroutinefunction(x): | ||
assert_type(x, Callable[[str, int], Coroutine[str, int, bytes]]) | ||
|
||
if iscoroutinefunction(y): | ||
assert_type(y, Callable[[str, int], Coroutine[Any, Any, bytes]]) | ||
if iscoroutinefunction(y): | ||
assert_type(y, Callable[[str, int], Coroutine[Any, Any, bytes]]) | ||
|
||
if iscoroutinefunction(z): | ||
assert_type(z, Callable[[str, int], Coroutine[Any, Any, Any]]) | ||
if iscoroutinefunction(z): | ||
assert_type(z, Callable[[str, int], Coroutine[Any, Any, Any]]) | ||
|
||
if iscoroutinefunction(xx): | ||
assert_type(xx, Callable[..., Coroutine[Any, Any, Any]]) | ||
if iscoroutinefunction(xx): | ||
assert_type(xx, Callable[..., Coroutine[Any, Any, Any]]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,12 @@ class PurePath(PathLike[str]): | |
def __rtruediv__(self, key: StrPath) -> Self: ... | ||
def __bytes__(self) -> bytes: ... | ||
def as_posix(self) -> str: ... | ||
def as_uri(self) -> str: ... | ||
if sys.version_info >= (3, 14): | ||
@deprecated("PurePath.as_uri() is deprecated. Use Path.as_uri() instead.") | ||
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. That's confusing, it's the same method. Also, we don't have an override for 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. Missed the fact that we didn't have an override: 7eccbac 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. Yeah, the exact snippet from the release notes: pathlib.PurePath.as_uri() is deprecated and will be removed in Python 3.19. Use pathlib.Path.as_uri() instead 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. You can also find a runtime warning: https://github.com/python/cpython/blob/e9b647dd30d22cef465972d898a34c4b1bb6615d/Lib/pathlib/__init__.py#L534 |
||
def as_uri(self) -> str: ... | ||
else: | ||
def as_uri(self) -> str: ... | ||
|
||
def is_absolute(self) -> bool: ... | ||
def is_reserved(self) -> bool: ... | ||
if sys.version_info >= (3, 14): | ||
|
Uh oh!
There was an error while loading. Please reload this page.