Skip to content

Migrate zoneinfo to argument clinic #97955

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

Closed
sobolevn opened this issue Oct 6, 2022 · 1 comment
Closed

Migrate zoneinfo to argument clinic #97955

sobolevn opened this issue Oct 6, 2022 · 1 comment
Assignees
Labels
topic-argument-clinic type-feature A feature request or enhancement

Comments

@sobolevn
Copy link
Member

sobolevn commented Oct 6, 2022

Feature or enhancement

Migrate _zoneinfo.c to argument clinic.

It is proposed by @vstinner and @pganssle
Link: #19909 (comment)

Pitch

This will improve several things:

  1. help() on ZoneInfo methods. Here's how it looks now:
>>> help(zoneinfo.ZoneInfo.clear_cache)
Help on built-in function clear_cache:

clear_cache(...) method of builtins.type instance
    Clear the ZoneInfo cache.
  1. Add __text_signature__ property to methods, it is very useful: for example, python/typeshed uses it to be sure that stubs and implementation match
  2. Move all argument parsing to clinic, which is more convenient

Previous discussion

  1. PEP 615: Add zoneinfo module #84683
  2. bpo-40503: Add tests and implementation for ZoneInfo #19909
  3. bpo-40503: Add tests and implementation for ZoneInfo #19909 (comment)

I will send a PR for this today :)

@sobolevn sobolevn added type-feature A feature request or enhancement topic-argument-clinic labels Oct 6, 2022
@sobolevn sobolevn self-assigned this Oct 6, 2022
sobolevn added a commit to sobolevn/cpython that referenced this issue Oct 6, 2022
@ambv ambv closed this as completed Oct 7, 2022
@ambv
Copy link
Contributor

ambv commented Oct 7, 2022

Thanks, Nikita! ✨ 🍰 ✨

mpage pushed a commit to mpage/cpython that referenced this issue Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-argument-clinic type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants