Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests work with Python 3.13 #192

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

befeleme
Copy link

Attribute created of LogRecord is time.time_ns since Python 3.13: https://docs.python.org/3.13/library/logging.html#logrecord-attributes

This is not a backwards compatible change.

Attribute `created` of LogRecord is `time.time_ns` since Python 3.13: https://docs.python.org/3.13/library/logging.html#logrecord-attributes
@hroncok
Copy link

hroncok commented Jun 10, 2024

Would keeping both decorators make it compatible?

@befeleme
Copy link
Author

It seems so, I updated the PR.

@nhairs
Copy link

nhairs commented Jun 18, 2024

Hi @befeleme, @hroncok,

Just so you're aware it looks like python-json-logger is currently unmaintained, that said I am working on a maintained fork which includes testing against Python 3.13.

@hroncok
Copy link

hroncok commented Jun 18, 2024

FWIW I don't see this test in your fork.

@nhairs
Copy link

nhairs commented Jun 18, 2024

FWIW I don't see this test in your fork.

The test on the timestamp does still exist, however I've moved to using freezegun over unittest.mock.

https://github.com/nhairs/python-json-logger/blob/main/tests/test_formatters.py#L452

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.

3 participants