Yang, Bo
Yang, Bo
please review
According to https://docs.python.org/3/library/itertools.html#:~:text=When%20the%20input%20iterable%20is%20already,rather%20than%20a%20chain%20of%20calls. > When the input iterable is already a tee iterator object, all members of the return tuple are constructed as if they had been produced by the...
> Are these tests AI generated? Their alleged output doesn't match what I get when running them. Yes. I created some tests in a Jupyter notebook and asked AI to...
> You keep selecting that you want to submit a bugfix. Is that actually the case? I would assign these tickets to you, then. Yes. I am willing to submit...
> It looks like the quoted section only appeared in Python 3.13. According to https://github.com/python/cpython/issues/123884#issuecomment-2342829955 , it was documented from the beginning, but I cannot find the document about it...
> > You keep selecting that you want to submit a bugfix. Is that actually the case? I would assign these tickets to you, then. > > Yes. I am...
> Sorry, I just have to ask again: Is this AI generated? No implementation code is generated by AI. The docstring is partially generated by AI. Also I asked AI...
In fact, I forgot `asyncio.shield`, which is neccessary to prevent the one consumer from being cancelled by another consumer accidentally. ```python @dataclass(frozen=True) class FutureIteratorBackedAsyncIterator(IteratorBackedAsyncIterator[_ItemType], Generic[_ItemType]): iterator: TeeIterator[Future[_ItemType]] @override def __anext__(self):...
https://github.com/pydantic/pydantic/blob/0c4a22b64b23dfad27387750cf07487efc45eb05/pydantic/_internal/_fields.py#L459-L462 The implementation of `rebuild_model_fields` is buggy, because it tries to resolve all `ForwardRef` using the `NsResolver` of the final class, even when the field is defined in its super...
Workaround: ```python # nested_models_1.py from pydantic import BaseModel from typing import override class Outer1(BaseModel): class Inner1(BaseModel): outer: "Outer1" @classmethod @override def model_rebuild( cls, *, force: bool = False, raise_errors: bool...