GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Normalize bare dates in rruleset.rdate/exdate by 0718lol · Pull Request #1663 · dateutil/dateutil

Conversation

@0718lol

@0718lol 0718lol commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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

  • Changes have tests
  • Authors have been added to AUTHORS.md
  • News fragment added in changelog.d. See CONTRIBUTING.md for details

Assisted-by: ZCode agent:GLM-5.3-Flash

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
0718lol added 4 commits November 5, 2026 01:00
@0718lol
Normalize bare dates in rruleset.rdate/exdate
3e61546
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
@0718lol
Add changelog fragment for dateutil#1663
c1cac8a
@0718lol
Format changed lines per darker/black CI check
b2f3d54
@0718lol
Re-trigger CI (two macOS jobs cancelled by runner queue, no code chan…
184b27e
…ges)
@0718lol 0718lol closed this Nov 4, 2026
@0718lol 0718lol reopened this Nov 4, 2026
@0718lol 0718lol closed this Nov 4, 2026
@0718lol 0718lol reopened this Nov 4, 2026
@0718lol

0718lol commented Nov 4, 2026

Copy link
Copy Markdown
Author

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/.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@0718lol

0718lol commented Nov 4, 2026

Copy link
Copy Markdown
Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

exdate and rdate fail if passed a date object, but dtstart does not.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@0718lol
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.