Skip to content

Allow python-dateutil 3 and 4 - #122

Open
itzzdev09 wants to merge 1 commit into
zeroSteiner:masterfrom
itzzdev09:allow-dateutil-3-and-4
Open

itzzdev09 wants to merge 1 commit into
zeroSteiner:masterfrom
itzzdev09:allow-dateutil-3-and-4

Conversation

@itzzdev09

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
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