You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alex-anast (via GitHub)" <gi...@apache.org> on 2026/04/22 21:07:53 UTC
[PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
alex-anast opened a new pull request, #49844:
URL: https://github.com/apache/arrow/pull/49844
### Rationale for this change
The Hypothesis test strategy for timezones (`pyarrow.tests.strategies.timezones`) only generates named IANA timezones (via pytz and zoneinfo). It does not generate fixed-offset timezones like `+05:30` or `-03:00`. As noted in #31318, this is not supported out of the box by Hypothesis, so a custom strategy is needed. Fixed-offset timezones are already used in manual tests and handled correctly by Arrow, but are never exercised via property-based testing.
### What changes are included in this PR?
Adds a `fixed_offset_timezones` strategy to `python/pyarrow/tests/strategies.py` that generates `datetime.timezone` objects with offsets ranging from UTC-12:00 to UTC+14:00, with minute components of 0, 30, or 45 (covering all real-world UTC offsets). This strategy is included in the existing `timezones` strategy across all dependency configurations.
### Are these changes tested?
This change improves test infrastructure itself -- it extends the `timezones` strategy used by existing Hypothesis-based tests. The generated fixed-offset timezones were verified to work correctly with `pa.timestamp()`.
### Are there any user-facing changes?
No. This only affects the internal test suite.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4299981934
:warning: GitHub issue #31318 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "alex-anast (via GitHub)" <gi...@apache.org>.
alex-anast commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4305996665
@AlenkaF thanks for the review!
You're right. I've pushed a follow-up that enforces both bounds, making sure that no offset fails outside the valid UTC-12 to UTC+14 range. Can you please re-check?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4305605046
:warning: GitHub issue #31318 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4377497563
After merging your PR, Conbench analyzed the 0 benchmarking runs that have been run so far on merge-commit 4373fdf929a852ea8d7f9f20f1232daff90e0f86.
None of the specified runs were found on the Conbench server.
The [full Conbench report](https://github.com/apache/arrow/runs/74372965501) has more details.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4312578742
```
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/24885507497
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4302423338
@github-actions crossbow submit test-conda-python-3.11-hypothesis
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4303304980
The extended hypothesis failure is currently unrelated, opened an issue for it here: https://github.com/apache/arrow/issues/49846
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4343157063
@github-actions crossbow submit test-conda-python-3.11-hypothesis
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4341746540
@github-actions crossbow submit test-conda-python-3.11-hypothesis
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4311569840
@alex-anast the PR has been merged on main, if you could rebase I'll re-trigger the hypothesis tests on CI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4305597011
:warning: GitHub issue #31318 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4343171756
Revision: a5fdd429b10f2dc5df6f0f6ae9d1f9ae1f9724fe
Submitted crossbow builds: [ursacomputing/crossbow @ actions-5df144ad3d](https://github.com/ursacomputing/crossbow/branches/all?query=actions-5df144ad3d)
|Task|Status|
|----|------|
|test-conda-python-3.11-hypothesis|[](https://github.com/ursacomputing/crossbow/actions/runs/25105632168/job/73566030691)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "alex-anast (via GitHub)" <gi...@apache.org>.
alex-anast commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4343031204
Alright, I managed to reproduce the issue with:
```sh
PYARROW_TEST_HYPOTHESIS=ON \
python -m pytest .venv/lib/python3.12/site-packages/pyarrow/tests/test_types.py::test_hashing \
-W error -x -v \
--hypothesis-seed=309228849660331397780595412479768595882
```
With the latest commit, the workflow passes locally. @raulcd if you could launch one more (hopefully final) time, please :pray:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4313279087
@github-actions crossbow submit test-conda-python-3.11-hypothesis
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd merged PR #49844:
URL: https://github.com/apache/arrow/pull/49844
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "alex-anast (via GitHub)" <gi...@apache.org>.
alex-anast commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4330982462
@raulcd sorry for the spam -- can you retrigger the workflow once more please?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4302440545
Revision: 6c9a20e3bf05815e4a2f44fc5931d0fde19f07ce
Submitted crossbow builds: [ursacomputing/crossbow @ actions-16091e66e1](https://github.com/ursacomputing/crossbow/branches/all?query=actions-16091e66e1)
|Task|Status|
|----|------|
|test-conda-python-3.11-hypothesis|[](https://github.com/ursacomputing/crossbow/actions/runs/24822290861/job/72649612523)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4300095500
:warning: GitHub issue #31318 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "alex-anast (via GitHub)" <gi...@apache.org>.
alex-anast commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4312582099
> ```
> Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
> The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/24885507497
> ```
expected :sweat:
@raulcd can you please re-trigger the test when you get the chance?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4377227708
:warning: GitHub issue #31318 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4341758312
Revision: f0e060e6b6a99236138803f84cfe3bd78fa8cb75
Submitted crossbow builds: [ursacomputing/crossbow @ actions-4a0924ba7a](https://github.com/ursacomputing/crossbow/branches/all?query=actions-4a0924ba7a)
|Task|Status|
|----|------|
|test-conda-python-3.11-hypothesis|[](https://github.com/ursacomputing/crossbow/actions/runs/25096761611/job/73535376949)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4307023777
Thanks for the update! There is a PR up to fix the hypothesis build: https://github.com/apache/arrow/pull/49847. After that is merged you can rebase and we can run the build here, to double check the logic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4313547593
I think the failure is connected to the changes in this PR:
```python
TypeError: tzinfo argument must be None or of a tzinfo subclass, not type 'datetime.timedelta'
```
see: https://github.com/ursacomputing/crossbow/actions/runs/24890383634/job/72880860677#step:6:3978
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4453161576
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 4373fdf929a852ea8d7f9f20f1232daff90e0f86.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/76040895050) has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4305894188
:warning: GitHub issue #31318 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "alex-anast (via GitHub)" <gi...@apache.org>.
alex-anast commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4312574922
@github-actions crossbow submit test-conda-python-3.11-hypothesis
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4313307319
Revision: 820665dc5ff61a4e8acc40390fd13689b0cc497f
Submitted crossbow builds: [ursacomputing/crossbow @ actions-096afcf5c0](https://github.com/ursacomputing/crossbow/branches/all?query=actions-096afcf5c0)
|Task|Status|
|----|------|
|test-conda-python-3.11-hypothesis|[](https://github.com/ursacomputing/crossbow/actions/runs/24890383634/job/72880860677)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-31318: [Python] Add fixed-offset timezones to Hypothesis test strategy [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #49844:
URL: https://github.com/apache/arrow/pull/49844#issuecomment-4341751592
> @raulcd sorry for the spam
Don't worry at all, sorry I missed your message yesterday.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org