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.StringTemplateStyle's usesTime method using wrong variable to search for asctime #99811

Closed
cemysce opened this issue Nov 27, 2022 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@cemysce
Copy link
Contributor

cemysce commented Nov 27, 2022

Bug report

See usesTime method of StringTemplateStyle class in logging module. It's passing self.asctime_format to fmt.find but I believe it should be passing self.asctime_search. The two variables have the same value so it doesn't currently result in broken behavior, but this is a latent bug that could reveal itself if either variable's value changes. I've got a PR ready, I'll submit it shortly after this.

Linked PRs

@cemysce cemysce added the type-bug An unexpected behavior, bug, or error label Nov 27, 2022
vsajip pushed a commit that referenced this issue Nov 28, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 28, 2022
…ing (pythonGH-99812)

Use correct variable to search for asctime
(cherry picked from commit 1d1bb95)

Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 28, 2022
…ing (pythonGH-99812)

Use correct variable to search for asctime
(cherry picked from commit 1d1bb95)

Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com>
vsajip pushed a commit that referenced this issue Nov 28, 2022
…ring (GH-99812) (GH-99851)

(cherry picked from commit 1d1bb95)
Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com>
vsajip pushed a commit that referenced this issue Nov 28, 2022
…ring (GH-99812) (GH-99852)

(cherry picked from commit 1d1bb95)
Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com>
@vsajip vsajip closed this as completed Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants