secondlife / secondlife/python-llbase
Update llbase JSON logging for Python 3.13 compatibility
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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 cgitbhappens at module import time._fmt_exc_cgitb()depends oncgitb.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.JsonFormattershould 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with llbase/lljsonlog.py, then inspect the module-level cgitb import, _fmt_exc_cgitb(), and JsonFormatter's default and cgitb formatter paths. Check the existing test layout for coverage of import and basic formatting behavior. Done means the module imports on Python 3.13, default formatting still works, and the cgitb option is safely replaced or clearly deprecated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100