Skip to content

Commit 6a6643c

Browse files
authored
Merge branch 'main' into docutils.nodes.paragraph
2 parents f1c9113 + 9772c42 commit 6a6643c

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

stdlib/multiprocessing/queues.pyi

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import queue
21
import sys
32
from typing import Any, Generic, TypeVar
43

@@ -9,19 +8,24 @@ __all__ = ["Queue", "SimpleQueue", "JoinableQueue"]
98

109
_T = TypeVar("_T")
1110

12-
class Queue(queue.Queue[_T]):
11+
class Queue(Generic[_T]):
1312
# FIXME: `ctx` is a circular dependency and it's not actually optional.
1413
# It's marked as such to be able to use the generic Queue in __init__.pyi.
1514
def __init__(self, maxsize: int = 0, *, ctx: Any = ...) -> None: ...
16-
def get(self, block: bool = True, timeout: float | None = None) -> _T: ...
1715
def put(self, obj: _T, block: bool = True, timeout: float | None = None) -> None: ...
18-
def put_nowait(self, obj: _T) -> None: ...
16+
def get(self, block: bool = True, timeout: float | None = None) -> _T: ...
17+
def qsize(self) -> int: ...
18+
def empty(self) -> bool: ...
19+
def full(self) -> bool: ...
1920
def get_nowait(self) -> _T: ...
21+
def put_nowait(self, obj: _T) -> None: ...
2022
def close(self) -> None: ...
2123
def join_thread(self) -> None: ...
2224
def cancel_join_thread(self) -> None: ...
2325

24-
class JoinableQueue(Queue[_T]): ...
26+
class JoinableQueue(Queue[_T]):
27+
def task_done(self) -> None: ...
28+
def join(self) -> None: ...
2529

2630
class SimpleQueue(Generic[_T]):
2731
def __init__(self, *, ctx: Any = ...) -> None: ...

stubs/docutils/@tests/stubtest_allowlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ docutils.nodes.Element.__getattr__
1010
docutils.nodes.NodeVisitor.__getattr__
1111
docutils.nodes.document.__getattr__
1212
docutils.nodes.document.__init__
13+
docutils.nodes.Element.__iter__ # doesn't exist at runtime, but the class is iterable due to __getitem__
1314
docutils.parsers.rst.Directive.__getattr__
1415
docutils.transforms.Transform.__getattr__
1516
docutils.transforms.Transformer.__getattr__

stubs/docutils/docutils/nodes.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import xml.dom.minidom
22
from _typeshed import Incomplete
33
from abc import abstractmethod
4-
from collections.abc import Callable, Generator, Iterable, Sequence
4+
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
55
from typing import Any, ClassVar, Protocol, TypeVar, overload
66
from typing_extensions import Literal, Self
77

@@ -82,6 +82,9 @@ class Element(Node):
8282
def __init__(self, rawsource: str = "", *children: Node, **attributes): ...
8383
def __len__(self) -> int: ...
8484
def __contains__(self, key: str | Node) -> bool: ...
85+
# '__iter__' is added as workaround, since mypy doesn't support classes that are iterable via '__getitem__'
86+
# see https://github.com/python/typeshed/pull/10099#issuecomment-1528789395
87+
def __iter__(self) -> Iterator[Node]: ...
8588
@overload
8689
def __getitem__(self, key: str) -> Any: ...
8790
@overload

stubs/hdbcli/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "2.15.*"
1+
version = "2.16.*"

stubs/hdbcli/hdbcli/dbapi.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class Cursor:
9595
def setpacketsize(self, value: int) -> None: ...
9696
def set_resultset_holdability(self, holdability: int) -> None: ...
9797
def setoutputsize(self, *args: Any, **kwargs: Any) -> None: ...
98+
def setcommandinfo(self, command_info: str, line_number: int) -> None: ...
9899

99100
class Warning(Exception):
100101
errorcode: int

0 commit comments

Comments
 (0)