secondlife / secondlife/python-llbase

Update llbase JSON logging for Python 3.13 compatibility

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

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

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

説明

llbase.lljsonlog.JsonFormatter currently imports and supports cgitb for exception formatting. The cgitb module was removed in Python 3.13, so any code path that imports llbase.lljsonlog can fail or require local workarounds when running on Python 3.13.

We recently worked around this in the Join Django app by adding an internal JSON log formatter that is compatible with llbase.lljsonlog.JsonFormatter but does not import cgitb. That workaround keeps Join unblocked, but the underlying compatibility issue still exists in the shared python-llbase library.

Current library location:

llbase/lljsonlog.py

Current problem areas:

  • import cgitb happens at module import time.
  • _fmt_exc_cgitb() depends on cgitb.Hook.
  • JsonFormatter(exception_formatter="cgitb") cannot be supported on Python 3.13 without a replacement implementation.
  • The module still carries Python 2 compatibility code, which may make the Python 3.13 update harder to reason about.

Expected outcome:

  • llbase.lljsonlog.JsonFormatter should be importable on Python 3.13.
  • The default traceback formatter should continue to work.
  • Existing users of JsonFormatter() should not need app-level replacements.
  • If exception_formatter="cgitb" is still needed, either provide a Python 3.13-safe replacement or clearly document/deprecate that option.
  • Add or update tests covering import and basic formatting behavior on supported Python versions.

This should let Join remove its local compatibility formatter once the shared library has a Python 3.13-compatible release.

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

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

はじめの一歩

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

調査の方向性

llbase/lljsonlog.py から始め、次にモジュールレベルの cgitb の import、_fmt_exc_cgitb()、および JsonFormatter のデフォルト formatter パスと cgitb formatter パスを調べます。import と基本的なフォーマット動作がカバーされているか、既存のテスト構成を確認します。完了の条件は、モジュールが Python 3.13 で import でき、デフォルトのフォーマットが引き続き機能し、cgitb オプションが安全に置き換えられるか、明確に非推奨とされていることです。

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

評価

技術スタック
python
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

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

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