-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-135273: Unify ZoneInfo.from_file signatures #135274
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-135273: Unify ZoneInfo.from_file signatures #135274
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, this is a positional-only argument, so the name of it shouldn't actually matter. But I think we might as well be consistent, especially if this is causing problems in typeshed.
Can you also update the docs: https://docs.python.org/3/library/zoneinfo.html#zoneinfo.ZoneInfo.from_file? |
I agree that there's no inherent advantage of I've updated the docs, thanks! |
Actually, I'm thinking about something: wouldn't it be easier if we were to use |
Sure, as I mentioned in the typeshed PR - the desynchronization came only because C implementation was different (just not specified alias). Re would it be easier or not - we will just need to update the typeshed stubs for it, depending whether we gonna backport it or not. So if you think it will be better - I can update this PR with these changes, If you don't mind. |
file_obj would be more explicit, but fobj would take less work. But actually, now that I think about, if the change has been made in 3.12, we won't be able to backport it, so let's continue with |
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature. (cherry picked from commit 7cc8949) Co-authored-by: Andrii Hrimov <[email protected]>
GH-135715 is a backport of this pull request to the 3.13 branch. |
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature. (cherry picked from commit 7cc8949) Co-authored-by: Andrii Hrimov <[email protected]>
GH-135716 is a backport of this pull request to the 3.14 branch. |
…135715) gh-135273: Unify `ZoneInfo.from_file` signatures (GH-135274) Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature. (cherry picked from commit 7cc8949) Co-authored-by: Andrii Hrimov <[email protected]>
…135716) gh-135273: Unify `ZoneInfo.from_file` signatures (GH-135274) Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature. (cherry picked from commit 7cc8949) Co-authored-by: Andrii Hrimov <[email protected]>
|
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
Uh oh!
There was an error while loading. Please reload this page.