| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7b0e09f commit ba28610
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | # NOTE: this needs to be kept in sync with the "requires" list in pyproject.toml | |
| 2 | 2 | # and the pins in setup.py | |
| 3 | - typing_extensions>=4.6.0 | ||
| 3 | + typing_extensions>=4.6.0; python_version<'3.15' | ||
| 4 | + typing_extensions>=4.14.0; python_version>='3.15' | ||
| 4 | 5 | mypy_extensions>=1.0.0 | |
| 5 | 6 | pathspec>=1.0.0 | |
| 6 | 7 | tomli>=1.1.0; python_version<'3.11' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1157,6 +1157,9 @@ void CPyTrace_LogEvent(const char *location, const char *line, const char *op, c | |||
| 1157 | 1157 | typedef struct { | |
| 1158 | 1158 | PyObject_HEAD | |
| 1159 | 1159 | PyObject *name; | |
| 1160 | + #if CPY_3_15_FEATURES | ||
| 1161 | + PyObject *qualname; | ||
| 1162 | + #endif | ||
| 1160 | 1163 | PyObject *type_params; | |
| 1161 | 1164 | PyObject *compute_value; | |
| 1162 | 1165 | PyObject *value; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,6 +160,7 @@ static inline CPyTagged CPyTagged_ShortFromSsize_t(Py_ssize_t x) { | |||
| 160 | 160 | #define CPY_3_11_FEATURES (PY_VERSION_HEX >= 0x030b0000) | |
| 161 | 161 | #define CPY_3_12_FEATURES (PY_VERSION_HEX >= 0x030c0000) | |
| 162 | 162 | #define CPY_3_14_FEATURES (PY_VERSION_HEX >= 0x030e0000) | |
| 163 | + #define CPY_3_15_FEATURES (PY_VERSION_HEX >= 0x030f0000) | ||
| 163 | 164 | ||
| 164 | 165 | #if CPY_3_12_FEATURES | |
| 165 | 166 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -204,6 +204,11 @@ def test_urlsafe_b64decode_errors() -> None: | |||
| 204 | 204 | for b in b"eA", b"eA=", b"eHk": | |
| 205 | 205 | with assertRaises(ValueError): | |
| 206 | 206 | b64decode(b) | |
| 207 | + [out version>=3.15] | ||
| 208 | + driver.py:28: FutureWarning: invalid character '+' in URL-safe Base64 data will be discarded in future Python versions | ||
| 209 | + test_func() | ||
| 210 | + driver.py:28: FutureWarning: invalid character '/' in URL-safe Base64 data will be discarded in future Python versions | ||
| 211 | + test_func() | ||
| 207 | 212 | ||
| 208 | 213 | [case testBase64UsedAtTopLevelOnly_librt] | |
| 209 | 214 | from librt.base64 import b64encode | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -971,7 +971,10 @@ print(z) | |||
| 971 | 971 | [case testCheckVersion] | |
| 972 | 972 | import sys | |
| 973 | 973 | ||
| 974 | - if sys.version_info[:2] == (3, 14): | ||
| 974 | + if sys.version_info[:2] == (3, 15): | ||
| 975 | + def version() -> int: | ||
| 976 | + return 15 | ||
| 977 | + elif sys.version_info[:2] == (3, 14): | ||
| 975 | 978 | def version() -> int: | |
| 976 | 979 | return 14 | |
| 977 | 980 | elif sys.version_info[:2] == (3, 13): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -199,6 +199,7 @@ EnumLiteralAlias3 = Literal[SomeEnum.AVALUE] | None | |||
| 199 | 199 | [typing fixtures/typing-full.pyi] | |
| 200 | 200 | ||
| 201 | 201 | [case testPEP695GenericTypeAlias] | |
| 202 | + import sys | ||
| 202 | 203 | from typing import Callable | |
| 203 | 204 | from types import GenericAlias | |
| 204 | 205 | ||
@@ -208,24 +209,36 @@ type A[T] = list[T] | |||
| 208 | 209 | ||
| 209 | 210 | def test_generic_alias() -> None: | |
| 210 | 211 | assert type(A[str]) is GenericAlias | |
| 211 | - assert str(A[str]) == "A[str]" | ||
| 212 | + if sys.version_info >= (3, 15): # type: ignore[operator] | ||
| 213 | + assert str(A[str]) == "_frozen_importlib.A[str]" | ||
| 214 | + else: | ||
| 215 | + assert str(A[str]) == "A[str]" | ||
| 212 | 216 | assert str(getattr(A, "__value__")) == "list[T]" | |
| 213 | 217 | ||
| 214 | 218 | type B[T, S] = dict[S, T] | |
| 215 | 219 | ||
| 216 | 220 | def test_generic_alias_with_two_args() -> None: | |
| 217 | - assert str(B[str, int]) == "B[str, int]" | ||
| 221 | + if sys.version_info >= (3, 15): # type: ignore[operator] | ||
| 222 | + assert str(B[str, int]) == "_frozen_importlib.B[str, int]" | ||
| 223 | + else: | ||
| 224 | + assert str(B[str, int]) == "B[str, int]" | ||
| 218 | 225 | assert str(getattr(B, "__value__")) == "dict[S, T]" | |
| 219 | 226 | ||
| 220 | 227 | type C[*Ts] = tuple[*Ts] | |
| 221 | 228 | ||
| 222 | 229 | def test_type_var_tuple_type_alias() -> None: | |
| 223 | - assert str(C[int, str]) == "C[int, str]" | ||
| 230 | + if sys.version_info >= (3, 15): # type: ignore[operator] | ||
| 231 | + assert str(C[int, str]) == "_frozen_importlib.C[int, str]" | ||
| 232 | + else: | ||
| 233 | + assert str(C[int, str]) == "C[int, str]" | ||
| 224 | 234 | assert str(getattr(C, "__value__")) == "tuple[typing.Unpack[Ts]]" | |
| 225 | 235 | ||
| 226 | 236 | type D[**P] = Callable[P, int] | |
| 227 | 237 | ||
| 228 | 238 | def test_param_spec_type_alias() -> None: | |
| 229 | - assert str(D[[int, str]]) == "D[[int, str]]" | ||
| 239 | + if sys.version_info >= (3, 15): # type: ignore[operator] | ||
| 240 | + assert str(D[[int, str]]) == "_frozen_importlib.D[[int, str]]" | ||
| 241 | + else: | ||
| 242 | + assert str(D[[int, str]]) == "D[[int, str]]" | ||
| 230 | 243 | assert str(getattr(D, "__value__")) == "typing.Callable[P, int]" | |
| 231 | 244 | [typing fixtures/typing-full.pyi] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,8 @@ requires = [ | |||
| 5 | 5 | # self-typechecking :/ | |
| 6 | 6 | "setuptools >= 77.0.3", | |
| 7 | 7 | # the following is from mypy-requirements.txt/setup.py | |
| 8 | - "typing_extensions>=4.6.0", | ||
| 8 | + "typing_extensions>=4.6.0; python_version<'3.15'", | ||
| 9 | + "typing_extensions>=4.14.0; python_version>='3.15'", | ||
| 9 | 10 | "mypy_extensions>=1.0.0", | |
| 10 | 11 | "pathspec>=1.0.0", | |
| 11 | 12 | "tomli>=1.1.0; python_version<'3.11'", | |
@@ -49,7 +50,8 @@ classifiers = [ | |||
| 49 | 50 | requires-python = ">=3.10" | |
| 50 | 51 | dependencies = [ | |
| 51 | 52 | # When changing this, also update build-system.requires and mypy-requirements.txt | |
| 52 | - "typing_extensions>=4.6.0", | ||
| 53 | + "typing_extensions>=4.6.0; python_version<'3.15'", | ||
| 54 | + "typing_extensions>=4.14.0; python_version>='3.15'", | ||
| 53 | 55 | "mypy_extensions>=1.0.0", | |
| 54 | 56 | "pathspec>=1.0.0", | |
| 55 | 57 | "tomli>=1.1.0; python_version<'3.11'", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments