Skip to content

Allow python-dateutil 3 and 4 - #122

Merged
zeroSteiner merged 2 commits into
zeroSteiner:masterfrom
itzzdev09:allow-dateutil-3-and-4
Nov 24, 2026
Merged

zeroSteiner merged 2 commits into
zeroSteiner:masterfrom
itzzdev09:allow-dateutil-3-and-4

Conversation

@itzzdev09

Copy link
Copy Markdown
Contributor

python-dateutil~=2.7 means >=2.7,<3. python-dateutil 3.0.0 (21 Oct) and 4.0.0 (1 Nov) are out, so rule-engine can't be installed next to anything that needs them.

rule-engine uses dateutil.parser.isoparse for datetime literals and tz.tzlocal / tz.tzutc. dateutil 4.0 made isoparse reject malformed numeric fields (e.g. 2014- 4-21), which doesn't affect valid literals. This changes the requirement to >=2.7,<5 in both [project] and [build-system].

python -m unittest tests: 710 tests, OK (32 skipped) with python-dateutil 2.9.0.post0, 3.0.0 and 4.0.0 (Python 3.12).

I didn't touch uv.lock: my uv version rewrote the whole file. uv sync in CI re-resolves it, or uv lock locally will refresh the requires-dist entry.

~=2.7 caps python-dateutil below 3. The test suite passes unchanged with
python-dateutil 2.9.0.post0, 3.0.0 and 4.0.0, including the isoparse
based datetime literals.
@zeroSteiner

Copy link
Copy Markdown
Owner

Thanks for opening this! Changes look good. I'd just like to see the test suite pass with the new major versions of python-dateutil that will be accepted. If you want to add that, that'd be great otherwise if you give me a a week or two, I should be able to handle it.

Add two jobs on Python 3.14 that install python-dateutil 3.0.0 and 4.0.0 over the
locked version. The other jobs keep the locked 2.9.0.post0. The test steps use
uv run --no-sync so the override is not undone. Python 3.14 is used because
python-dateutil 4 needs Python 3.11 or newer.
@itzzdev09

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I added CI jobs for the new majors in 57fa765: two extra jobs on Python 3.14 install python-dateutil 3.0.0 and 4.0.0 over the locked 2.9.0.post0, and the test steps use uv run --no-sync so the override sticks. (dateutil 4 needs Python 3.11+, hence 3.14 only.)

I also ran the suite locally against all three versions first: 710 tests, OK (32 skipped) on 2.9.0.post0, 3.0.0 and 4.0.0. The new jobs haven't run yet, so I'll check the Actions results once they finish.

@zeroSteiner

Copy link
Copy Markdown
Owner

LGTM. Thanks for this. I'll have it released in v5.2.1 shortly.

@zeroSteiner
zeroSteiner merged commit 45426c2 into zeroSteiner:master Nov 24, 2026
10 checks passed
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.

2 participants