| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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.
Sorry, something went wrong.
|
Can you also update the docs: https://docs.python.org/3/library/zoneinfo.html#zoneinfo.ZoneInfo.from_file? fobj is not necessarily better than file_obj (at least there is no ambiguity with f being for file) |
Sorry, something went wrong.
|
I agree that there's no inherent advantage of file_obj over fobj and vice versa in terms of clarity - both are unambiguous. The change is primarily motivated by the need for signature unification, nothing more. I've updated the docs, thanks! |
Sorry, something went wrong.
|
Actually, I'm thinking about something: wouldn't it be easier if we were to use fobj in C and revert the typeshed stuff? We can use fobj as file_obj in C so that we minimize the C changes as well. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
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 file_obj for the rest of Python. |
Sorry, something went wrong.
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. |
Sorry, something went wrong.
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. |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 Fedora Stable Clang 3.x (tier-2) has failed when building commit 7cc8949. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/234/builds/7857 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/test_perf_profiler.py", line 373, in test_python_calls_appear_in_the_stack_if_perf_activated
self.assertEqual(stderr, "")
~~~~~~~~~~~~~~~~^^^^^^^^^^^^
AssertionError: 'Warning:\nProcessed 431 events and lost 3[34 chars]\n\n' != ''
- Warning:
- Processed 431 events and lost 3 chunks!
-
- Check IO/CPU overload!
-
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/test_perf_profiler.py", line 373, in test_python_calls_appear_in_the_stack_if_perf_activated
self.assertEqual(stderr, "")
~~~~~~~~~~~~~~~~^^^^^^^^^^^^
AssertionError: 'Warning:\nProcessed 457 events and lost 1[34 chars]\n\n' != ''
- Warning:
- Processed 457 events and lost 1 chunks!
-
- Check IO/CPU overload!
-
|
Sorry, something went wrong.
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.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.