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

gh-72572: Remove mention of synced None returns for utcoffset() and dst() #93001

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slateny
Copy link
Contributor

@slateny slateny commented May 20, 2022

#72572

All methods of tzinfo now already mention the circumstances that they return None. Timezone does also appear to violate the removed statement: timezone.dst states that it always returns None, while that's not the case for timezone.utcoffset.

@slateny slateny requested review from pganssle and abalkin as code owners May 20, 2022
@bedevere-bot bedevere-bot added docs awaiting review labels May 20, 2022
@pganssle
Copy link
Member

@pganssle pganssle commented May 21, 2022

Per my comment here, I'm thinking maybe we should change the behavior of datetime.timezone rather than changing the long-standing mandate. I think there might be some consequences of doing that, so it might take a bit of digging to do so...

@slateny
Copy link
Contributor Author

@slateny slateny commented May 21, 2022

Hmm, it's also possible to keep the wording but soften it, like '... should generally not ...', and actually I think the current wording is technically fine, since it doesn't say something like 'must not'. Timezone just needs some justification on why it violates the mandate, if there is a reason for it

@pganssle
Copy link
Member

@pganssle pganssle commented May 21, 2022

I don't think we should document that it's OK for timezone to have the bug it has, we should just fix its behavior.

@slateny slateny marked this pull request as draft Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants