Skip to content

Ignore invalid calendar X-WR-TIMEZONE - #37

Open
RasputinKaiser wants to merge 1 commit into
pycalendar:mainfrom
RasputinKaiser:codex/openpledge-x-wr-timezone-31-invalid-tz
Open

Ignore invalid calendar X-WR-TIMEZONE#37
RasputinKaiser wants to merge 1 commit into
pycalendar:mainfrom
RasputinKaiser:codex/openpledge-x-wr-timezone-31-invalid-tz

Conversation

@RasputinKaiser

Copy link
Copy Markdown
Contributor

Fixes #31

Summary

  • Treat invalid X-WR-TIMEZONE values from the input calendar as absent instead of raising during conversion.
  • Preserve strict behavior for an explicitly passed invalid timezone= argument.
  • Add regression coverage for the invalid calendar field and explicit-argument cases.

Duplicate check

Tests

  • PATH="$PWD/.venv/bin:$PATH" .venv/bin/python -m pytest test/test_convert_examples.py test/test_copy.py test/test_command_line.py -q
  • PATH="$PWD/.venv/bin:$PATH" .venv/bin/python -m pytest -q
  • sh test/test_code_quality.sh
  • git diff --check

Note: CONTRIBUTING.md asks for changelog entries except trivial changes, but I could not find a changelog/news file in this repository to update.

@niccokunzmann niccokunzmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contributions! Would you like to co-maintain this project?

DTEND:20260101T130000Z
SUMMARY:Invalid X-WR-TIMEZONE
END:VEVENT
END:VCALENDAR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR!

I think, we have calendar files for the tests. Please put this in there to make sure that the other tests pick them up.

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.

Invalid X-WR-TIMEZONE should not fail

2 participants