GeezerVison is showing github.com — Normalize bare dates in rruleset.rdate/exdate by 0718lol · Pull Request #1663 · dateutil/dateutil
Conversation
0718lol
commented
Nov 4, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary of changes
rruleset.rdate() and rruleset.exdate() accepted bare datetime.date
objects without complaint but raised
TypeError: can't compare datetime.datetime to datetime.date at iteration
time, while rrule silently converts a date dtstart to midnight. Parsing
real iCalendar data hits this because RFC 5545 permits DATE values for RDATE
and EXDATE (§3.8.5.1).
Both methods now normalize a bare date to midnight, the same conversion
rrule applies to dtstart. Per RFC 5545 §3.8.5.1 exclusion is by exact
DATE-TIME value, so a DATE-form EXDATE excludes the midnight instance of a
DATE-form DTSTART recurrence set — the common all-day-event case.
Open question for maintainers: #275 also discusses whether a DATE-form
EXDATE should exclude a whole day regardless of time. RFC 5545 §3.8.5.1
specifies exclusion by exact DATE-TIME value, so this PR follows that; a
whole-day reading would need separate tracking of DATE-form values and is
not attempted here.
Closes #275
Pull Request Checklist
Assisted-by: ZCode agent:GLM-5.3-Flash
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
rruleset.rdate() and rruleset.exdate() accepted bare datetime.date objects
without complaint but raised TypeError at iteration time, while rrule
converts a date dtstart to midnight. RFC 5545 permits DATE values for
RDATE and EXDATE, so parsing real iCalendar data hits this.
Both methods now normalize a bare date to midnight, the same conversion
rrule applies to dtstart.
Assisted-by: ZCode agent:GLM-5.3-Flash
|
CI triage: test (3.14t, macos-latest) / test (3.15t, macos-latest) failures
Both recent runs on this branch fail only in tests/test_tzpath_data.py::test_dst_matches_tzdata_zi[tzpath] (Africa/Casablanca and Africa/El_Aaiun far-future standard-offset mismatches). Evidence that this is unrelated to this PR's changes (which are limited to dateutil/rrule.py, tests/test_rrule.py, AUTHORS.md, changelog.d/):
- In run 41887443716 (head
184b27e), the same test passes on macOS with CPython 3.12, 3.14 and pypy3.11, and on ubuntu/windows for every version; all four tz-* variant jobs (rearguard/vanguard/fat/slim) pass. Only the 3.14t macOS job fails.
- The earlier run 41883598314 failed the same test on the 3.15t macOS job.
- The
Validate run on master (41277057784, 2026-11-01) passed every macOS job including 3.14t and 3.15t.
- Locally on macOS arm64 (system tzdata
2026e-rearguard), the test passes on this exact head with CPython 3.12.15 and with a free-threaded CPython 3.14.8 build.
So the failure appeared between 2026-11-01 and 2026-11-04 and correlates with the free-threaded 3.14.10 / 3.15 pre-release interpreter builds or a runner image update, not with this diff. Posting for transparency — nothing in this PR touches dateutil/tz/.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Note on CI: the macOS jobs in the last few runs were cancelled by the
runner queue, and the one that ran (test (3.14t, macos-latest)) failed in
tests/test_tzpath_data.py::test_dst_matches_tzdata_zi[tzpath] — the
system-zoneinfo vs bundled-tzdata consistency check (Africa/Casablanca and
El_Aaiun far-future DST entries), which doesn't touch rrule and passes
locally on macOS. macos-latest master runs from 2026-11-01 were green, so
this looks like runner image tzdata drift rather than something introduced
here. All non-macOS checks pass on the current head.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|