Skip to content

Commit 29d4ad8

Browse files
Merge pull request #258 from niccokunzmann/issue-257
make compatible with icalendar 6.* and 7.*
2 parents 37a0e02 + 23dc90e commit 29d4ad8

11 files changed

Lines changed: 107 additions & 31 deletions

File tree

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
- ["3.12", "py312", "Europe/London"]
2323
- ["3.12", "build", "Europe/Moscow"]
2424
- ["3.13", "py313", "America/Dawson"]
25-
- ["3.13", "docs", "Europe/Berlin"]
25+
- ["3.14", "py314", "Africa/Tunis"]
26+
- ["3.14", "docs", "Europe/Berlin"]
2627

2728
runs-on: ubuntu-latest
2829
name: ${{ matrix.config[1] }}

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ venv:
2222
pwd
2323
git fetch --tags
2424
python -m venv venv
25-
venv/bin/pip install -r requirements.txt
25+
venv/bin/pip install -r requirements.txt -e ..
2626

2727
help:
2828
@echo "Please use \`make <target>' where <target> is one of"

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ To avoid breaking changes breaking your code, install this library fixed to a sp
1818
## v3.8.1
1919

2020
- Fix: License identifier in pyproject.toml
21+
- Mark as compatible with `icalendar` versions `6.*` and `7.*`. See [Issue 257](https://github.com/niccokunzmann/python-recurring-ical-events/issues/257).
2122

2223
## v3.8.0
2324

docs/reference/api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ For the most common cases, you do not need to look any further.
3434
### list from `at()` and `between()`
3535

3636
The result of both {py:meth}`recurring_ical_events.CalendarQuery.between` and
37-
{py:meth}`recurring_ical_events.CalendarQuery.at` is a list of {py:class}`icalendar.cal.Component`
38-
objects like {py:class}`icalendar.cal.Event`.
37+
{py:meth}`recurring_ical_events.CalendarQuery.at` is a list of {py:class}`icalendar.cal.component.Component`
38+
objects like {py:class}`icalendar.cal.event.Event`.
3939
By default, all attributes of the event with repetitions are copied, like ``UID`` and ``SUMMARY``.
4040
However, these attributes may differ from the source event:
4141

@@ -75,7 +75,7 @@ Examples:
7575
you query that day it will appear regardless of the timezone of the query.
7676
Which is at different times in different timezones.
7777

78-
* {py:class}`icalendar.cal.Alarm` has a `TRIGGER` which is in UTC.
78+
* {py:class}`icalendar.cal.alarm.Alarm` has a `TRIGGER` which is in UTC.
7979
The timezone to compute that for alarms relative to floating events will be taken
8080
from the start and stop arguments.
8181

docs/requirements.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Sphinx>=7
2+
pydata-sphinx-theme
3+
sphinx-autobuild
4+
sphinx-copybutton
5+
sphinx-sitemap
6+
sphinx-autoapi>=3.0.0
7+
# For examples section
8+
myst-parser
9+
sphinx-autodoc-typehints
10+
sphinx-toolbox
11+
sphinx-tabs

docs/requirements.txt

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,72 @@
1-
Sphinx>=7
2-
pydata-sphinx-theme
3-
sphinx-autobuild
4-
sphinx-copybutton
5-
..
6-
sphinx-sitemap
7-
sphinx-autoapi>=3.0.0
8-
# For examples section
9-
myst-parser
10-
sphinx-autodoc-typehints
11-
sphinx-toolbox
12-
sphinx-tabs
1+
2+
Jinja2==3.1.6
3+
MarkupSafe==3.0.3
4+
PyYAML==6.0.3
5+
Pygments==2.19.2
6+
Sphinx==8.2.3
7+
accessible-pygments==0.0.5
8+
alabaster==1.0.0
9+
anyio==4.12.0
10+
apeye==1.4.1
11+
apeye-core==1.1.5
12+
astroid==4.0.2
13+
autodocsumm==0.2.14
14+
babel==2.17.0
15+
beautifulsoup4==4.14.3
16+
cachecontrol==0.14.4
17+
certifi==2025.11.12
18+
charset_normalizer==3.4.4
19+
click==8.3.1
20+
colorama==0.4.6
21+
cssutils==2.11.1
22+
dict2css==0.3.0.post1
23+
docutils==0.21.2
24+
domdf-python-tools==3.10.0
25+
filelock==3.20.1
26+
h11==0.16.0
27+
html5lib==1.1
28+
idna==3.11
29+
imagesize==1.4.1
30+
markdown-it-py==3.0.0
31+
mdit-py-plugins==0.5.0
32+
mdurl==0.1.2
33+
more-itertools==10.8.0
34+
msgpack==1.1.2
35+
myst-parser==4.0.1
36+
natsort==8.4.0
37+
packaging==25.0
38+
platformdirs==4.5.1
39+
pydata-sphinx-theme==0.16.1
40+
requests==2.32.5
41+
roman==5.2
42+
roman-numerals==4.1.0
43+
roman-numerals-py==4.1.0
44+
ruamel.yaml==0.18.17
45+
ruamel.yaml.clib==0.2.15
46+
six==1.17.0
47+
snowballstemmer==3.0.1
48+
soupsieve==2.8
49+
sphinx-autoapi==3.6.1
50+
sphinx-autobuild==2025.8.25
51+
sphinx-autodoc-typehints==3.5.2
52+
sphinx-copybutton==0.5.2
53+
sphinx-jinja2-compat==0.4.1
54+
sphinx-last-updated-by-git==0.3.8
55+
sphinx-prompt==1.10.2
56+
sphinx-sitemap==2.9.0
57+
sphinx-tabs==3.4.5
58+
sphinx-toolbox==4.1.0
59+
sphinxcontrib-applehelp==2.0.0
60+
sphinxcontrib-devhelp==2.0.0
61+
sphinxcontrib-htmlhelp==2.1.0
62+
sphinxcontrib-jsmath==1.0.1
63+
sphinxcontrib-qthelp==2.0.0
64+
sphinxcontrib-serializinghtml==2.0.0
65+
standard-imghdr==3.10.14
66+
starlette==0.50.0
67+
tabulate==0.9.0
68+
urllib3==2.6.2
69+
uvicorn==0.38.0
70+
watchfiles==1.1.1
71+
webencodings==0.5.1
72+
websockets==15.0.1

docs/user-guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ If not listed, this library is available as a package on the following platforms
5454
## Usage
5555

5656
The [icalendar] module is responsible for parsing files with a calendar specification in it.
57-
This library takes such a {py:class}`icalendar.cal.Calendar` and computes the occurrences.
57+
This library takes such a {py:class}`icalendar.cal.calendar.Calendar` and computes the occurrences.
5858

5959
To import this module, write
6060

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ classifiers = [
3636
"Programming Language :: Python :: 3.11",
3737
"Programming Language :: Python :: 3.12",
3838
"Programming Language :: Python :: 3.13",
39+
"Programming Language :: Python :: 3.14",
3940
]
4041

4142
# install requirements depending on python version
4243
# see https://www.python.org/dev/peps/pep-0508/#environment-markers
4344
dependencies = [
44-
'icalendar >= 6.1.0, < 7.0.0',
45+
'icalendar >= 6.1.0, < 8.0.0',
4546
'python-dateutil >= 2.8.1, < 3.0.0',
4647
'x-wr-timezone >= 1.0.0, < 3.0.0; python_version >= "3.9"',
4748
'x-wr-timezone == 0.*; python_version <= "3.8"',

recurring_ical_events/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def of(
6565
times according to ``X-WR-TIMEZONE``.
6666
6767
Arguments:
68-
a_calendar: an :class:`icalendar.cal.Calendar` component like
69-
:class:`icalendar.cal.Calendar`.
68+
a_calendar: an :class:`icalendar.cal.calendar.Calendar` component like
69+
:class:`icalendar.cal.calendar.Calendar`.
7070
keep_recurrence_attributes: Whether to keep attributes that are only used
7171
to calculate the recurrence (``RDATE``, ``EXDATE``, ``RRULE``).
7272
components: A list of component type names of which the recurrences

recurring_ical_events/query.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from recurring_ical_events.util import compare_greater
2929

3030
if TYPE_CHECKING:
31-
from icalendar.cal import Component
31+
from icalendar import Component
3232

3333
from recurring_ical_events.occurrence import Occurrence
3434
from recurring_ical_events.series import Series
@@ -38,10 +38,10 @@
3838
)
3939

4040
if sys.version_info >= (3, 10):
41-
T_COMPONENTS : TypeAlias = Sequence[str | type[ComponentAdapter] | SelectComponents]
41+
T_COMPONENTS: TypeAlias = Sequence[str | type[ComponentAdapter] | SelectComponents]
4242
else:
4343
# see https://github.com/python/cpython/issues/86399#issuecomment-1093889925
44-
T_COMPONENTS : TypeAlias = Sequence[str]
44+
T_COMPONENTS: TypeAlias = Sequence[str]
4545

4646

4747
class CalendarQuery:
@@ -58,7 +58,7 @@ class CalendarQuery:
5858
skip_bad_series is True
5959
"""
6060

61-
suppressed_errors : ClassVar[type[Exception]] = [
61+
suppressed_errors: ClassVar[type[Exception]] = [
6262
BadRuleStringFormat,
6363
PeriodEndBeforeStart,
6464
icalendar.InvalidCalendar,
@@ -111,7 +111,7 @@ def to_datetime(date: DateArgument):
111111
date: A date specification.
112112
113113
Date Specification:
114-
114+
115115
- a year like ``(2019,)`` or ``2019`` (:class:`int`)
116116
- a month like ``(2019, 1)`` for January of 2019
117117
- a day like ``(2019, 1, 19)`` for the first of January 2019

0 commit comments

Comments
 (0)