Skip to content

Commit f422c9c

Browse files
authored
Merge branch 'python:main' into update_multiprocessing_managers_BaseListProxy
2 parents 914bb31 + 8dcca56 commit f422c9c

18 files changed

+266
-64
lines changed

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ concurrent.interpreters._queues.UNBOUND_REMOVE
4141

4242
importlib.util.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
4343

44+
# Condition functions are exported in __init__
45+
threading.Condition.locked
46+
multiprocessing.dummy.Condition.locked
4447

4548
# ====================================
4649
# Pre-existing errors from Python 3.13

stdlib/mimetypes.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ if sys.version_info >= (3, 13):
2525
def guess_type(url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ...
2626
def guess_all_extensions(type: str, strict: bool = True) -> list[str]: ...
2727
def guess_extension(type: str, strict: bool = True) -> str | None: ...
28-
def init(files: Sequence[str] | None = None) -> None: ...
29-
def read_mime_types(file: str) -> dict[str, str] | None: ...
28+
def init(files: Sequence[StrPath] | None = None) -> None: ...
29+
def read_mime_types(file: StrPath) -> dict[str, str] | None: ...
3030
def add_type(type: str, ext: str, strict: bool = True) -> None: ...
3131

3232
if sys.version_info >= (3, 13):
3333
def guess_file_type(path: StrPath, *, strict: bool = True) -> tuple[str | None, str | None]: ...
3434

3535
inited: bool
36-
knownfiles: list[str]
36+
knownfiles: list[StrPath]
3737
suffix_map: dict[str, str]
3838
encodings_map: dict[str, str]
3939
types_map: dict[str, str]
@@ -44,12 +44,12 @@ class MimeTypes:
4444
encodings_map: dict[str, str]
4545
types_map: tuple[dict[str, str], dict[str, str]]
4646
types_map_inv: tuple[dict[str, str], dict[str, str]]
47-
def __init__(self, filenames: tuple[str, ...] = (), strict: bool = True) -> None: ...
47+
def __init__(self, filenames: tuple[StrPath, ...] = (), strict: bool = True) -> None: ...
4848
def add_type(self, type: str, ext: str, strict: bool = True) -> None: ...
4949
def guess_extension(self, type: str, strict: bool = True) -> str | None: ...
5050
def guess_type(self, url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ...
5151
def guess_all_extensions(self, type: str, strict: bool = True) -> list[str]: ...
52-
def read(self, filename: str, strict: bool = True) -> None: ...
52+
def read(self, filename: StrPath, strict: bool = True) -> None: ...
5353
def readfp(self, fp: IO[str], strict: bool = True) -> None: ...
5454
def read_windows_registry(self, strict: bool = True) -> None: ...
5555
if sys.version_info >= (3, 13):

stdlib/sqlite3/__init__.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ _AdaptedInputData: TypeAlias = _SqliteData | Any
222222
_Parameters: TypeAlias = SupportsLenAndGetItem[_AdaptedInputData] | Mapping[str, _AdaptedInputData]
223223
# Controls the legacy transaction handling mode of sqlite3.
224224
_IsolationLevel: TypeAlias = Literal["DEFERRED", "EXCLUSIVE", "IMMEDIATE"] | None
225+
_RowFactoryOptions: TypeAlias = type[Row] | Callable[[Cursor, Row], object] | None
225226

226227
@type_check_only
227228
class _AnyParamWindowAggregateClass(Protocol):
@@ -300,7 +301,7 @@ class Connection:
300301
def autocommit(self) -> int: ...
301302
@autocommit.setter
302303
def autocommit(self, val: int) -> None: ...
303-
row_factory: Any
304+
row_factory: _RowFactoryOptions
304305
text_factory: Any
305306
if sys.version_info >= (3, 12):
306307
def __init__(
@@ -416,7 +417,7 @@ class Cursor:
416417
def description(self) -> tuple[tuple[str, None, None, None, None, None, None], ...] | MaybeNone: ...
417418
@property
418419
def lastrowid(self) -> int | None: ...
419-
row_factory: Callable[[Cursor, Row], object] | None
420+
row_factory: _RowFactoryOptions
420421
@property
421422
def rowcount(self) -> int: ...
422423
def __init__(self, cursor: Connection, /) -> None: ...

stdlib/threading.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ class Condition:
144144
) -> None: ...
145145
def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ...
146146
def release(self) -> None: ...
147+
if sys.version_info >= (3, 14):
148+
def locked(self) -> bool: ...
149+
147150
def wait(self, timeout: float | None = None) -> bool: ...
148151
def wait_for(self, predicate: Callable[[], _T], timeout: float | None = None) -> _T: ...
149152
def notify(self, n: int = 1) -> None: ...

stdlib/unittest/mock.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ class NonCallableMock(Base, Any):
199199
call_count: int
200200
call_args: _Call | MaybeNone
201201
call_args_list: _CallList
202+
method_calls: _CallList
202203
mock_calls: _CallList
203204
def _format_mock_call_signature(self, args: Any, kwargs: Any) -> str: ...
204205
def _call_matcher(self, _call: tuple[_Call, ...]) -> _Call: ...

stubs/psutil/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ psutil.__all__
55
psutil._psaix
66
psutil._psbsd
77
psutil._pssunos
8+
psutil._psutil_aix
9+
psutil._psutil_bsd
10+
psutil._psutil_sunos
811

912
# Test utilities
1013
psutil.tests.*

stubs/psutil/@tests/stubtest_allowlist_darwin.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
psutil._pslinux
2+
psutil._pswindows
23
psutil._psutil_linux
34
psutil._psutil_windows
4-
psutil._pswindows
55

66
# not always available on ARM64, but we test there
77
psutil.cpu_freq
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
psutil._psosx
2-
psutil._psutil_windows
3-
psutil._psutil_osx
42
psutil._pswindows
3+
psutil._psutil_osx
4+
psutil._psutil_windows
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
psutil._pslinux
21
psutil._psosx
3-
psutil._psutil_linux
2+
psutil._pslinux
43
psutil._psutil_osx
5-
psutil._psutil_posix
4+
psutil._psutil_linux

stubs/psutil/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "7.1.1"
1+
version = "7.1.3"
22
upstream_repository = "https://github.com/giampaolo/psutil"
33

44
[tool.stubtest]

0 commit comments

Comments
 (0)