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

Logging test fail on python 3.8+ #2234

Open
kudlatyamroth opened this issue Apr 17, 2023 · 0 comments
Open

Logging test fail on python 3.8+ #2234

kudlatyamroth opened this issue Apr 17, 2023 · 0 comments

Comments

@kudlatyamroth
Copy link

kudlatyamroth commented Apr 17, 2023

Since python 3.8 logger format validates format by default: https://docs.python.org/3/library/logging.html#logging.Formatter

In tests there is config with failing format:
https://github.com/powerline/powerline/blob/develop/tests/test_python/test_logging.py#L323
https://github.com/powerline/powerline/blob/develop/tests/test_python/test_logging.py#L343
https://github.com/powerline/powerline/blob/develop/tests/test_python/test_logging.py#L344

these format not include any %(message)s or any other placeholder.

Correct way would be to add placesholder in tests and fix checks, but if someone is using powerline on python older then 3.8 and have setting with incorect format, then this is a breaking change for them

the other way that will not introduce any breaking changes will be to add validate=False in:
https://github.com/powerline/powerline/blob/develop/powerline/__init__.py#L255

Maybe there should be github workflow for running these tests on every PR, and tests should include newest python always :)

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

No branches or pull requests

1 participant