gh-135273: Unify ZoneInfo.from_file signatures#135274
Conversation
ZeroIntensity
left a comment
There was a problem hiding this comment.
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 <andrew.hrimov@gmail.com>
|
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 <andrew.hrimov@gmail.com>
|
GH-135716 is a backport of this pull request to the 3.14 branch. |
|
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
Uh oh!
There was an error while loading. Please reload this page.