8000 gh-135273: Unify ZoneInfo.from_file signatures by hrimov · Pull Request #135274 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-135273: Unify ZoneInfo.from_file signatures #135274

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Unify ZoneInfo.from_file signatures
  • Loading branch information
hrimov committed Jun 8, 2025
commit f6a1c4d37ebfca2e025e9901778dba8abf20192c
6 changes: 3 additions & 3 deletions Lib/zoneinfo/_zoneinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ def _new_instance(cls, key):
return obj

@classmethod
def from_file(cls, fobj, /, key=None):
def from_file(cls, file_obj, /, key=None):
obj = super().__new__(cls)
obj._key = key
obj._file_path = None
obj._load_file(fobj)
obj._file_repr = repr(fobj)
obj._load_file(file_obj)
obj._file_repr = repr(file_obj)

# Disable pickling for objects created from files
obj.__reduce__ = obj._file_reduce
Expand Down
Loading
0