Skip to content

lift upper bound on python-json-logger dependency - #557

Merged
soxofaan merged 1 commit into
masterfrom
issue541-python312-jsonlogging-compatibility
Oct 30, 2026
Merged

soxofaan merged 1 commit into
masterfrom
issue541-python312-jsonlogging-compatibility

Conversation

@soxofaan

Copy link
Copy Markdown
Member

improves compatibility with Python 3.12 and up

original bound was added for nhairs/python-json-logger#29 but that has been fixed in v3.2.1

ref #541

@soxofaan

soxofaan commented Oct 30, 2026 •

Copy link
Copy Markdown
Member Author

this should address the "taskName" related failures in unit test runs on python 3.12 and up

which was known and fixed issue nhairs/python-json-logger#3 but not available to use because of version upper bound

e.g.

FAILED tests/util/test_logging.py::test_setup_logging_rotating_file_json - AssertionError: assert {'message': 'Hello warning 4', 'levelname': 'WARNING', 'name': '__main__', 'created': 1793353709.1081774, ...} == {'message': 'Hello warning 0'}\n    # Differing: {'message': ('Hello warning 0', 'Hello warning 4')}
 +  where {'message': 'Hello warning 0'}\n    # Differing: {'message': ('Hello warning 0', 'Hello warning 4')} = DictSubSet({'message': 'Hello warning 0'})
FAILED tests/util/test_logging.py::TestExtraLoggingFilter::test_basic - assert [{'levelname'...kName': None}] == [{'levelname'...': 'kthxbye'}]
  
  At index 0 diff: {'levelname': 'INFO', 'name': 'foo', 'message': 'Hello', 'taskName': None} != {'levelname': 'INFO', 'name': 'foo', 'message': 'Hello'}
  
  Full diff: (-: missing in left side, +: extra in left side)
    [
        {
            'levelname': 'INFO',
            'name': 'foo',
            'message': 'Hello',
  +         'taskName': None,
        },
        {
            'levelname': 'INFO',
            'name': 'foo',
            'message': "Let's do some work",
  +         'taskName': None,
            'job_id': 'job-42',
        },

@soxofaan
soxofaan requested a balanced review from Copilot October 30, 2026 10:36
@soxofaan soxofaan self-assigned this Oct 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the update to require python-json-logger>=3.2.1.

No open issues 🎉

What changed in this PR

Updates the logging dependency to support Python 3.12 and newer, contributing to the compatibility work tracked in #541.

Changes:

  • Replaces python-json-logger~=2.0 with >=3.2.1, removing the upper bound and requiring the release containing the upstream fix.
  • Removes the obsolete comment explaining the previous restriction.
File Description
setup.py Updates the python-json-logger requirement to >=3.2.1.

Review effort: Balanced

improves compatibility with Python 3.12 and up

original bound was added for nhairs/python-json-logger#29
but that has been fixed in v3.2.1

ref #541
@soxofaan
soxofaan force-pushed the issue541-python312-jsonlogging-compatibility branch from cb9046f to aaf7db9 Compare October 30, 2026 10:43
@soxofaan

Copy link
Copy Markdown
Member Author

effect of this PR

failures (on python 3.12) goes down from

17 failed, 2494 passed, 11 skipped, 665 warnings in 201.34s (0:03:21)

to

6 failed, 2505 passed, 11 skipped, 666 warnings in 208.86s (0:03:28)

@soxofaan
soxofaan merged commit 8b32451 into master Oct 30, 2026
2 of 6 checks passed
@soxofaan
soxofaan deleted the issue541-python312-jsonlogging-compatibility branch October 30, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants