Skip to content

Unify ZoneInfo.from_file signature #135273

Closed
@hrimov

Description

@hrimov

Bug report

Bug description:

While enhancing stubs for ZoneInfo.from_file in typeshed, I noticed that the regression in the from_file signature was caused by the argument clinic migration, but without specifying an argument alias - intentionally or not, I don't know.

Therefore, I believe it would be a good approach to unify both signatures for the native and Python versions of zoneinfo. Since AC takes priority and fobj is a pos-only argument, I think the more appropriate approach would be to update Python's fallback.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

added
type-bugAn unexpected behavior, bug, or error
on Jun 8, 2025
added a commit that references this issue on Jun 19, 2025

gh-135273: Unify `ZoneInfo.from_file` signatures (#135274)

7cc8949
added a commit that references this issue on Jun 19, 2025

pythongh-135273: Unify `ZoneInfo.from_file` signatures (pythonGH-135274)

added 2 commits that reference this issue on Jun 19, 2025

[3.13] gh-135273: Unify `ZoneInfo.from_file` signatures (GH-135274) (#…

a8c3af0

[3.14] gh-135273: Unify `ZoneInfo.from_file` signatures (GH-135274) (#…

a170086
picnixz

picnixz commented on Jun 19, 2025

@picnixz
Member

Thank you for the fix & the report!

added a commit that references this issue on Jun 19, 2025

pythongh-135273: Unify `ZoneInfo.from_file` signatures (python#135274)

1 remaining item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Unify ZoneInfo.from_file signature · Issue #135273 · python/cpython

      Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

      Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant