Skip to content

Handle tzinfo=None in arrow.get()#1265

Open
ReinerBRO wants to merge 1 commit intoarrow-py:masterfrom
ReinerBRO:fix/tzinfo-none-get
Open

Handle tzinfo=None in arrow.get()#1265
ReinerBRO wants to merge 1 commit intoarrow-py:masterfrom
ReinerBRO:fix/tzinfo-none-get

Conversation

@ReinerBRO
Copy link
Copy Markdown

Fixes #1259.

When tzinfo=None is passed explicitly, ArrowFactory.get() now treats it the same as omitting tzinfo instead of incorrectly routing the call into the 3+ argument constructor path.

Validation:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=. python -m pytest -c /dev/null tests/test_factory.py -k "kwarg_tzinfo_none or kwarg_tzinfo_string or no_args or insufficient_kwargs" -q
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=. python -m pytest -c /dev/null tests/test_factory.py -q
  • ruff check arrow/factory.py tests/test_factory.py

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b423717) to head (e306a27).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1265   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2315      2316    +1     
  Branches       358       358           
=========================================
+ Hits          2315      2316    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

arrow.get() behaviour for tzinfo=None

1 participant