Repository navigation
Conversation
RajGahoi
requested review from
angatha,
niccokunzmann and
stevepiercy
as code owners
November 14, 2026 12:12
Contributor
|
Thanks for the pull request, @RajGahoi! A maintainer will review it shortly. |
Contributor
Mixed activityActivity patterns show a mix of organic and automated signals. Evidence
Last 5 PRs: This is an automated analysis by AgentScan |
Per RFC 5545 section 3.3.9, the start of a period MUST be strictly before the end of the period. Previously, identical start and end datetimes were accepted by vPeriod.
Validate that start and end are not equal when an explicit end datetime is provided in both vPeriod.__init__ and vPeriod.from_ical, raising ValueError('Start time is equal to end time').
Signed-off-by: Raj Gahoi <gahoiraj01@gmail.com>
RajGahoi
force-pushed
the
fix/period-reject-zero-length
branch
from
November 14, 2026 12:21
88f20bc to
d709e8c
Compare
Collaborator
|
Thank you for the contributeion. #2103 was created first. Can you please give it a review and maybe make some suggestions you did in another way? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2087.
Summary
Per RFC 5545 section 3.3.9:
Previously,
vPeriodaccepted periods whose start and end were identical or where duration was zero (timedelta(0)orPT0S), allowing zero-length periods to pass through construction and serialization.Changes
vPeriod.__init__, checkstart == endand raiseValueError("Start time is equal to end time").vPeriod.from_ical, validate that start and end are not equal, raisingValueErrorwhenstart == endor duration is zero.src/icalendar/tests/prop/test_vPeriod.pyand dedicated test coverage insrc/icalendar/tests/test_issue_2087_zero_length_period.py.news/2087.bugfix.