Title: gh-97955: Migrate `zoneinfo` to Argument Clinic by sobolevn · Pull Request #97958 · python/cpython · GitHub
Open Graph Title: gh-97955: Migrate `zoneinfo` to Argument Clinic by sobolevn · Pull Request #97958 · python/cpython
X Title: gh-97955: Migrate `zoneinfo` to Argument Clinic by sobolevn · Pull Request #97958 · python/cpython
Description: I am not sure that it is worth converting these functions: {"utcoffset", (PyCFunction)zoneinfo_utcoffset, METH_O, PyDoc_STR("Retrieve a timedelta representing the UTC offset in a zone at " "the given datetime.")}, {"dst", (PyCFunction)zoneinfo_dst, METH_O, PyDoc_STR("Retrieve a timedelta representing the amount of DST applied " "in a zone at the given datetime.")}, {"tzname", (PyCFunction)zoneinfo_tzname, METH_O, PyDoc_STR("Retrieve a string containing the abbreviation for the time " "zone that applies in a zone at a given datetime.")}, {"fromutc", (PyCFunction)zoneinfo_fromutc, METH_O, PyDoc_STR("Given a datetime with local time in UTC, retrieve an adjusted " "datetime in local time.")}, Because they don't have any argument parsing logic in them. Just improving the signature? If this is desired, I can send an extra PR later :) New help output: >>> import _zoneinfo >>> help(_zoneinfo.ZoneInfo) Help on class ZoneInfo in module zoneinfo: class ZoneInfo(datetime.tzinfo) | Method resolution order: | ZoneInfo | datetime.tzinfo | builtins.object | | Methods defined here: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Function for serialization with the pickle protocol. | | __repr__(self, /) | Return repr(self). | | __str__(self, /) | Return str(self). | | dst(...) | Retrieve a timedelta representing the amount of DST applied in a zone at the given datetime. | | fromutc(...) | Given a datetime with local time in UTC, retrieve an adjusted datetime in loca l time. | | tzname(...) | Retrieve a string containing the abbreviation for the time zone that applies i n a zone at a given datetime. | | utcoffset(...) | Retrieve a timedelta representing the UTC offset in a zone at the given dateti me. | | ---------------------------------------------------------------------- | Class methods defined here: | | __init_subclass__(...) from builtins.type | Function to initialize subclasses. | | clear_cache(*, only_keys=None) from builtins.type | Clear the ZoneInfo cache. | | from_file(file_obj, /, key=None) from builtins.type | Create a ZoneInfo file from a file object. | | no_cache(key) from builtins.type | Get a new instance of ZoneInfo, bypassing the cache. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | key Issue: gh-97955
Open Graph Description: I am not sure that it is worth converting these functions: {"utcoffset", (PyCFunction)zoneinfo_utcoffset, METH_O, PyDoc_STR("Retrieve a timedelta representing the UTC offset...
X Description: I am not sure that it is worth converting these functions: {"utcoffset", (PyCFunction)zoneinfo_utcoffset, METH_O, PyDoc_STR("Retrieve a timedelta representing th...
Opengraph URL: https://github.com/python/cpython/pull/97958
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ad90940d-62a0-4c54-0686-8d3d383f221f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 92F8:3695F9:16CF682:2150F4E:6A563482 |
| html-safe-nonce | ec7d76e3ead44d7617ff2dc089ff7df001dbdf18edc49fee95a56dae1d1b7cad |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkY4OjM2OTVGOToxNkNGNjgyOjIxNTBGNEU6NkE1NjM0ODIiLCJ2aXNpdG9yX2lkIjoiMTE2NjE5NDYyMTc4MjgzMjI1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 51fe491be47298f6406c1bbe8a5ddb3720b519239177099bfae20ee99b7f96e6 |
| hovercard-subject-tag | pull_request:1078789071 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/97958/files |
| twitter:image | https://avatars.githubusercontent.com/u/4660275?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4660275?s=400&v=4 |
| og:image:alt | I am not sure that it is worth converting these functions: {"utcoffset", (PyCFunction)zoneinfo_utcoffset, METH_O, PyDoc_STR("Retrieve a timedelta representing the UTC offset... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d78ea552aac0685ca5f006d44f88166cbbf3bb96843f8da0c5a2c0b9908430b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423b2fb76ac2b90de5ab599b7a76a0d2b2c83f24 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width