python-hyper / python-hyper/h2

Wanted to extend hpack encoders or allow different Encoder and Decoders to be used.

オープン
#1,312 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
1k
フォーク
187
PR マージ指標
30日以内にマージされた PR はありません

説明

I have a library coming out which I made as a drop in replacement for python hpack called cyhpack and I wanted to try developing a better solution for injecting my own Decoder and Encoder which runs ls-hpack under the hood. As of currently, here is my workaround but I was wondering if a better implementation could be implemented such as a factory attribute or an Abstract class could be made to accommodate my version and the pure python one as well?

from __future__ import annotations

from h2.config import H2Configuration
from h2.connection import H2Connection as _H2Connection

from .hpack import Decoder, Encoder


class H2Connection(_H2Connection):
    """
    Contains an overridable version of H2Connection that drops
    python hpack in exchange for cyhpack for faster performance
    and speed.
    """

    def __init__(self, config: H2Configuration | None = None):
        super().__init__(config)
        self.encoder = Encoder()
        self.decoder = Decoder()

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず h2.connection.H2Connection と H2Configuration を読み、現在の Encoder と Decoder がどのように初期化されているかを、issue に示されているサブクラスによる回避策と比較します。呼び出し側がカスタム H2Connection サブクラスを維持せずに代替の Encoder と Decoder の実装を使用でき、設定経路のカバレッジが含まれれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
api, networking
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。