Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Thomas Kriechbaumer
    @Kriechi
    hyperlink is using a PYPI_UPLOAD_TOKEN and has an active codecov integration! Who is currently leading that project?
    brotlicffi also has a PYPI_TOKEN! @sethmlarson ?
    Thomas Kriechbaumer
    @Kriechi
    wsproto, hpack, hyperframe, priority, h11 are all clean as far as I can tell: no secrets, and no GitHub Environments.
    Phil Jones
    @pgjones
    Thanks for checking
    Seth Michael Larson
    @sethmlarson
    I'll rotate brotlicffi's token, thanks
    rotated
    Nathaniel J. Smith
    @njsmith
    I guess also make sure there aren't any unexpected releases on pypi?
    Seth Michael Larson
    @sethmlarson
    yeah, there aren't :)
    Thomas Kriechbaumer
    @Kriechi
    :rocket:
    graingert
    @graingert:matrix.org
    [m]
    is @pgjones reddit.com/u/stetio ?
    I didn't think get_event_loop raised RuntimeError
    graingert
    @graingert:matrix.org
    [m]
    ah amazing we can un-revert it django/asgiref@4a48f4f
    Phil Jones
    @pgjones
    Yep, that is me. Did you mean to post here though? (asgiref isn't a hyper project)
    graingert
    @graingert:matrix.org
    [m]
    does anyone use hpack.hpack.Decoder.decode(raw=False) ?
    it makes the type annotations very annoying, eg we could define:
    class HeaderTuple(NamedTuple):
        name: bytes
        value: bytes
    
        @property
        def indexable(self):
            return True
    because you can't make
    class HeaderTuple(NamedTuple, Generic[AnyStr]):
        name: AnyStr
        value: AnyStr
    
        @property
        def indexable(self):
            return True
    graingert
    @graingert:matrix.org
    [m]
    maybe we could make a .decode_raw( method and hide .decode( from the type definition?
    and just assert that HeaderTuple is always bytes?
    @sethmlarson: ^
    Thomas Kriechbaumer
    @Kriechi
    I'm not aware of many users directly using hpack - most downloads are through h2 itself I would assume...
    graingert
    @graingert:matrix.org
    [m]
    Thomas Kriechbaumer
    @Kriechi
    funnily mitmproxy is the second largest - which I'm also a maintainer of :D
    graingert
    @graingert:matrix.org
    [m]
    h2 makes hpack.HeaderTuple a part of its public interface
    so it's tricky to change it
    I'm thinking something like:
    def decode_raw(self, data: bytes) -> List[HeaderTuple]:
        ...
    
    if not typing.TYPE_CHECKING:
        def decode(self, data, bytes):
            return [_unicode_if_needed(h, raw) for h in self.decode_raw()]
    `
    then everyone can use .decode_raw and always get bytesy HeaderTuples
    inside hpack it's always bytes
    then if you don't use type checking you can do .decode(raw=False) and get back a HeaderTuple with str's in
    Ideally it would be @attr.frozen but it needs to subclass tuple
    graingert
    @graingert:matrix.org
    [m]
    Then pretty much all the type: ignores go away
    Thomas Kriechbaumer
    @Kriechi
    @sethmlarson would you mind adding me on pypi to https://pypi.org/project/rfc3986/ ?
    I'd like to help out https://github.com/python-hyper/rfc3986/pull/75#issuecomment-833468087 and cut a release.
    Seth Michael Larson
    @sethmlarson
    Let me ping sigmavirus
    Seth Michael Larson
    @sethmlarson
    He says he get a release out today :)
    Thanks for the ping
    Alexandre Flament
    @dalf
    Hi everyone.
    FYI this is unfinished, but I wrote hpack implementation using nghttp2: https://github.com/dalf/hpack_nghttp2
    It uses cython because the nghttp2 API has issue (it doesn't support the sensitive flag for example).
    Thomas Kriechbaumer
    @Kriechi
    I'm planning to cut a major release of https://github.com/python-hyper/priority in the next weeks - and since the last release is over 4 years ago, I'm wondering if anyone is actively using it or knows of major dependents that we should talk to before bumping from v1 to v2? No major API changes, mostly Python versions, typing with mypy, and minor bugfixes.
    Phil Jones
    @pgjones
    I use it with Hypercorn, I think the h2spec tests may exercise the priority code
    Thomas Kriechbaumer
    @Kriechi
    @pgjones thanks - I will check it out. If you got a few minutes, I'd be happy to hear your feedback if latest master still works for you.
    Thomas Kriechbaumer
    @Kriechi
    @pgjones I ran the tox suite of hypercorn against my priority branch - seems to work all fine. Although hypercorn's test suite is pretty noisy and full of tracebacks.... yet all tests pass. Whats up with that?
    graingert
    @graingert:matrix.org
    [m]
    https://gitlab.com/pgjones/hypercorn/-/blob/master/pyproject.toml#L35 missing filterwarnings=error and pytest-asyncio doesn't set the asyncio exception_handler pytest-dev/pytest-asyncio#205
    @Kriechi
    anyio's pytest plugin does set this hook so you'll get test failures if you leak exceptions
    Thomas Kriechbaumer
    @Kriechi
    @graingert:matrix.org are you good with python-hyper/priority#145 ?
    this should give full type hinting for the priority package - and I can cut a release in the next days.
    graingert
    @graingert:matrix.org
    [m]
    @Kriechi pytest has type annotations
    You should install pytest in the mypy virtual environment
    Thomas Kriechbaumer
    @Kriechi
    @graingert:matrix.org right! fair point!
    graingert
    @graingert:matrix.org
    [m]
    you should use the same toxenv for mypy as you do for pytest
    Thomas Kriechbaumer
    @Kriechi
    yeah I remember having the same situation with wsproto - haven't done a clean job there yet.