Created in different context error
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 20/100
調査の方向性
ContextVarsScopeManager と tracer.wrappers.fastapi.fastapi_wrapper の after_request 関数から始め、FastAPI にマウントされた Flask WSGI アプリケーションを含むリンク先のサンプルプロジェクトを使って失敗を再現してください。この構成で scope を閉じても “created in a different Context” エラーが発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi all,
Everything has worked fine for ContextVarsScopeManager if I have only Fastapi application. But, When I tried to mount a Flask WSGIApplication to the Fastapi application, I've got an error from ContextVarsScopeManager as "<Token var=<ContextVar name='scope' at 0x7ff47d568a90> at 0x7ff47d61fe00> was created in a different Context". This error has been raised from after_request function of tracer.wrappers.fastapi.fastapi_wrapper module while trying to close scope. When I debugged the code, I have found out that "if token._var is not self" check into reset function of ContextVar class has caused this exception. I've created a sample project to reproduce the issue and shared it's Github url below.
Github url: https://github.com/gokhan721/opentracing_contextvar_work
Thanks.
- 主要言語
- Python
- スター
- 90
- フォーク
- 9
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MagicStack/contextvars のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
MagicStack/contextvars#17 · リアクション 1 件 ·
-
2.4: pytest warning オープン
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
MagicStack/contextvars#16 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
MagicStack/contextvars#15 · リアクション 2 件 ·
-
asyncio support オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
MagicStack/contextvars#2 · コメント 16 件 ·
MagicStack/contextvars の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
use-agent-os/agent-os#3314 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
BasedHardware/omi#15662 · コメント 1 件 ·
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
AiursoftWeb/AnduinOS-2#19 ·