Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-icalendar for
openSUSE:Factory checked in at 2024-07-01 11:21:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-icalendar (Old)
and /work/SRC/openSUSE:Factory/.python-icalendar.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-icalendar"
Mon Jul 1 11:21:43 2024 rev:37 rq:1184136 version:5.0.13
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-icalendar/python-icalendar.changes
2024-03-25 21:09:46.868670261 +0100
+++
/work/SRC/openSUSE:Factory/.python-icalendar.new.18349/python-icalendar.changes
2024-07-01 11:22:33.907852831 +0200
@@ -1,0 +2,13 @@
+Sun Jun 30 20:33:27 UTC 2024 - Dirk Müller <[email protected]>
+
+- update to 5.0.13:
+ * Guide to delete the build folder before running tests
+ * Make documentation build with Python 3.12
+ * Update windows to olson conversion for Greenland Standard
+ Time
+ * Extend examples in Usage with alarm and recurrence
+ * Document how to serve the built documentation to view with
+ the browser
+ * Improve test coverage
+
+-------------------------------------------------------------------
Old:
----
icalendar-5.0.12.tar.gz
New:
----
icalendar-5.0.13.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-icalendar.spec ++++++
--- /var/tmp/diff_new_pack.FjU0sH/_old 2024-07-01 11:22:34.527875270 +0200
+++ /var/tmp/diff_new_pack.FjU0sH/_new 2024-07-01 11:22:34.531875414 +0200
@@ -21,7 +21,7 @@
%define modname icalendar
%{?sle15_python_module_pythons}
Name: python-%{modname}
-Version: 5.0.12
+Version: 5.0.13
Release: 0
Summary: Python parser/generator of iCalendar files package
License: BSD-2-Clause
++++++ icalendar-5.0.12.tar.gz -> icalendar-5.0.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/CHANGES.rst
new/icalendar-5.0.13/CHANGES.rst
--- old/icalendar-5.0.12/CHANGES.rst 2024-03-19 23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/CHANGES.rst 2024-06-20 15:14:34.000000000 +0200
@@ -1,11 +1,38 @@
Changelog
=========
+5.0.13 (2024-06-20)
+-------------------
+
+Minor changes:
+
+- Guide to delete the build folder before running tests
+- Add funding information
+- Make documentation build with Python 3.12
+- Update windows to olson conversion for Greenland Standard Time
+- Extend examples in Usage with alarm and recurrence
+- Document how to serve the built documentation to view with the browser
+- Improve test coverage
+
+Breaking changes:
+
+- ...
+
+New features:
+
+- Create GitHub releases for each tag.
+
+Bug fixes:
+
+- Parse calendars with X-COMMENT properties at the end the file by ignoring
these properites
+
+
5.0.12 (2024-03-19)
-------------------
Minor changes:
+- Analyse code coverage of test files
- Added corpus to fuzzing directory
- Added exclusion of fuzzing corpus in MANIFEST.in
- Augmented fuzzer to optionally convert multiple calendars from a source
string
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/PKG-INFO
new/icalendar-5.0.13/PKG-INFO
--- old/icalendar-5.0.12/PKG-INFO 2024-03-19 23:10:41.881808500 +0100
+++ new/icalendar-5.0.13/PKG-INFO 2024-06-20 15:14:42.737296600 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: icalendar
-Version: 5.0.12
+Version: 5.0.13
Summary: iCalendar parser/generator
Home-page: https://github.com/collective/icalendar
Author: Plone Foundation
@@ -148,11 +148,38 @@
Changelog
=========
+5.0.13 (2024-06-20)
+-------------------
+
+Minor changes:
+
+- Guide to delete the build folder before running tests
+- Add funding information
+- Make documentation build with Python 3.12
+- Update windows to olson conversion for Greenland Standard Time
+- Extend examples in Usage with alarm and recurrence
+- Document how to serve the built documentation to view with the browser
+- Improve test coverage
+
+Breaking changes:
+
+- ...
+
+New features:
+
+- Create GitHub releases for each tag.
+
+Bug fixes:
+
+- Parse calendars with X-COMMENT properties at the end the file by ignoring
these properites
+
+
5.0.12 (2024-03-19)
-------------------
Minor changes:
+- Analyse code coverage of test files
- Added corpus to fuzzing directory
- Added exclusion of fuzzing corpus in MANIFEST.in
- Augmented fuzzer to optionally convert multiple calendars from a source
string
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/docs/credits.rst
new/icalendar-5.0.13/docs/credits.rst
--- old/icalendar-5.0.12/docs/credits.rst 2024-03-19 23:10:33.000000000
+0100
+++ new/icalendar-5.0.13/docs/credits.rst 2024-06-20 15:14:34.000000000
+0200
@@ -68,10 +68,11 @@
- MichaŠGórny <[email protected]>
- Pronoy <[email protected]>
- Abe Hanoka <[email protected]>
-- `Natasha Mattson <https://github.com/natashamm`_
+- `Natasha Mattson <https://github.com/natashamm>`_
- `NikEasY <https://github.com/NikEasY>`_
- Matt Lewis <[email protected]>
- Felix Stupp <[email protected]>
+- Bastian Wegge <[email protected]>
Find out who contributed::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/docs/install.rst
new/icalendar-5.0.13/docs/install.rst
--- old/icalendar-5.0.12/docs/install.rst 2024-03-19 23:10:33.000000000
+0100
+++ new/icalendar-5.0.13/docs/install.rst 2024-06-20 15:14:34.000000000
+0200
@@ -112,10 +112,10 @@
Type "help", "copyright", "credits" or "license" for more information.
>>> import icalendar
>>> icalendar.__version__
- '5.0.12'
+ '5.0.13'
-Building the documentation locally
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Building the documentation
+--------------------------
To build the documentation follow these steps:
@@ -136,3 +136,10 @@
cd icalendar
tox -e docs
+
+If you would like to serve the documentation and access it from your browser,
+you can run the HTTP server:
+
+.. code-block:: bash
+
+ python3 -m http.server -d docs/_build/html/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/docs/usage.rst
new/icalendar-5.0.13/docs/usage.rst
--- old/icalendar-5.0.12/docs/usage.rst 2024-03-19 23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/docs/usage.rst 2024-06-20 15:14:34.000000000 +0200
@@ -309,18 +309,38 @@
>>> cal.add_component(event)
+By extending the event with subcomponents, you can create multiple alarms::
+
+ >>> from icalendar import Alarm
+ >>> from datetime import timedelta
+ >>> alarm_1h_before = Alarm()
+ >>> alarm_1h_before.add('action', 'DISPLAY')
+ >>> alarm_1h_before.add('trigger', timedelta(hours=-1))
+ >>> alarm_1h_before.add('description', 'Reminder: Event in 1 hour')
+ >>> event.add_component(alarm_1h_before)
+
+ >>> alarm_24h_before = Alarm()
+ >>> alarm_24h_before.add('action', 'DISPLAY')
+ >>> alarm_24h_before.add('trigger', timedelta(hours=-24))
+ >>> alarm_24h_before.add('description', 'Reminder: Event in 24 hours')
+ >>> event.add_component(alarm_24h_before)
+
+Or even recurrence::
+
+ >>> event.add('rrule', {'freq': 'daily'})
+
Write to disk::
>>> import tempfile, os
>>> directory = tempfile.mkdtemp()
>>> f = open(os.path.join(directory, 'example.ics'), 'wb')
>>> f.write(cal.to_ical())
- 522
+ 733
>>> f.close()
Print out the calendar::
- >>> print(cal.to_ical().decode("utf-8")) # doctest: +NORMALIZE_WHITESPACE
+ >>> print(cal.to_ical().decode('utf-8')) # doctest: +NORMALIZE_WHITESPACE
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//My calendar product//mxm.dk//
@@ -330,11 +350,22 @@
DTEND:20050404T100000Z
DTSTAMP:20050404T001000Z
UID:20050115T101010/[email protected]
+ RRULE:FREQ=DAILY
ATTENDEE;CN="Max Rasmussen";ROLE=REQ-PARTICIPANT:MAILTO:[email protected]
ATTENDEE;CN="The Dude";ROLE=REQ-PARTICIPANT:MAILTO:[email protected]
LOCATION:Odense\, Denmark
ORGANIZER;CN="Max Rasmussen";ROLE=CHAIR:MAILTO:[email protected]
PRIORITY:5
+ BEGIN:VALARM
+ ACTION:DISPLAY
+ DESCRIPTION:Reminder: Event in 1 hour
+ TRIGGER:-PT1H
+ END:VALARM
+ BEGIN:VALARM
+ ACTION:DISPLAY
+ DESCRIPTION:Reminder: Event in 24 hours
+ TRIGGER:-P1D
+ END:VALARM
END:VEVENT
END:VCALENDAR
<BLANKLINE>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/src/icalendar/__init__.py
new/icalendar-5.0.13/src/icalendar/__init__.py
--- old/icalendar-5.0.12/src/icalendar/__init__.py 2024-03-19
23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/__init__.py 2024-06-20
15:14:34.000000000 +0200
@@ -1,4 +1,4 @@
-__version__ = '5.0.12'
+__version__ = '5.0.13'
from icalendar.cal import (
Calendar,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/src/icalendar/cal.py
new/icalendar-5.0.13/src/icalendar/cal.py
--- old/icalendar-5.0.12/src/icalendar/cal.py 2024-03-19 23:10:33.000000000
+0100
+++ new/icalendar-5.0.13/src/icalendar/cal.py 2024-06-20 15:14:34.000000000
+0200
@@ -377,7 +377,12 @@
factory = types_factory.for_property(name)
component = stack[-1] if stack else None
if not component:
- raise ValueError(f'Property "{name}" does not have a
parent component.')
+ # only accept X-COMMENT at the end of the .ics file
+ # ignore these components in parsing
+ if uname == 'X-COMMENT':
+ break
+ else:
+ raise ValueError(f'Property "{name}" does not have a
parent component.')
datetime_names = ('DTSTART', 'DTEND', 'RECURRENCE-ID', 'DUE',
'RDATE', 'EXDATE')
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/icalendar-5.0.12/src/icalendar/tests/calendars/issue_350.ics
new/icalendar-5.0.13/src/icalendar/tests/calendars/issue_350.ics
--- old/icalendar-5.0.12/src/icalendar/tests/calendars/issue_350.ics
1970-01-01 01:00:00.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/tests/calendars/issue_350.ics
2024-06-20 15:14:34.000000000 +0200
@@ -0,0 +1,36 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Podio API//EN//view-exporter//52593453
+METHOD:REQUEST
+X-WR-CALNAME:view52593586
+X-WR-TIMEZONE:Europe/Berlin
+CALSCALE:GREGORIAN
+X-COMMENT-USAGE:This calendar does not contain recurring events!
+X-COMMENT-GENERATOR:PHP Version 8.0.16
+BEGIN:VEVENT
+STATUS:CONFIRMED
+SEQUENCE:0
+TRANSP:OPAQUE
+CLASS:PUBLIC
+UID:20055546456446
+SUMMARY:Termin 4353 und"so"
+DESCRIPTION;ALTREP="data:text/html,%3Cbody%3E%3Cp%3EToller%20%3Cstron
+ g%20class%3D%22text-bold%22%3ETermin%3C%2Fstrong%3E%20f%C3%BCr%3C%2Fp
+ %3E%3Cblockquote%3E%3Cp%3Emal%20%3Cem%20class%3D%22text-italic%22%3Ez
+ u%22gucken%22%3C%2Fem%3E%3C%2Fp%3E%3C%2Fblockquote%3E%3Cp%3E%3Cu%20cl
+ ass%3D%22text-underline%22%3Eund%3C%2Fu%3E%20%3Cdel%3Eso%3C%2Fdel%3E%
+ 3Cbr%2F%3E%3C%2Fp%3E%3C%2Fbody%3E":Toller Termin fürmal zu\"gucken\"
+ und so
+X-ALT-DESC;FMTTYPE=text/html:<html><head></head><body><p>Toller <stro
+ ng class="text-bold">Termin</strong> für</p><blockquote><p>mal <em c
+ lass="text-italic">zu"gucken"</em></p></blockquote><p><u class="text-
+ underline">und</u> <del>so</del><br/></p></body></html>
+URL:https://podio.com/xxxxxxyyyyyy/zpodio-testgelande/apps/calen
+ dar/items/5
+LOCATION:online
+DTSTART:20220222T183000Z
+DTEND:20220222T193000Z
+DTSTAMP:20220220T142821Z
+END:VEVENT
+END:VCALENDAR
+X-COMMENT:Cached from 2022-02-20 14:28:21 - new at most every 1800sec.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/icalendar-5.0.12/src/icalendar/tests/calendars/property_params.ics
new/icalendar-5.0.13/src/icalendar/tests/calendars/property_params.ics
--- old/icalendar-5.0.12/src/icalendar/tests/calendars/property_params.ics
1970-01-01 01:00:00.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/tests/calendars/property_params.ics
2024-06-20 15:14:34.000000000 +0200
@@ -0,0 +1,21 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID://RESEARCH IN MOTION//BIS 3.0
+METHOD:REQUEST
+BEGIN:VEVENT
+SEQUENCE:2
+X-RIM-REVISION:0
+SUMMARY:Test meeting from BB
+X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
+CLASS:PUBLIC
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="RembrandXS":MAILTO:[email protected]
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="RembrandDX":MAILTO:[email protected]
+ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="RembrandSB":MAILTO:[email protected]
+UID:XRIMCAL-628059586-522954492-9750559
+DTSTART;VALUE=DATE:20120814
+DTEND;VALUE=DATE:20120815
+DESCRIPTION:Test meeting from BB
+DTSTAMP:20120813T151458Z
+ORGANIZER:mailto:[email protected]
+END:VEVENT
+END:VCALENDAR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/src/icalendar/tests/conftest.py
new/icalendar-5.0.13/src/icalendar/tests/conftest.py
--- old/icalendar-5.0.12/src/icalendar/tests/conftest.py 2024-03-19
23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/tests/conftest.py 2024-06-20
15:14:34.000000000 +0200
@@ -110,6 +110,14 @@
@pytest.fixture()
+def x_sometime():
+ """Map x_sometime to time"""
+ icalendar.cal.types_factory.types_map['X-SOMETIME'] = 'time'
+ yield
+ icalendar.cal.types_factory.types_map.pop('X-SOMETIME')
+
+
[email protected]()
def factory():
"""Return a new component factory."""
return icalendar.ComponentFactory()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/icalendar-5.0.12/src/icalendar/tests/test_issue_350.py
new/icalendar-5.0.13/src/icalendar/tests/test_issue_350.py
--- old/icalendar-5.0.12/src/icalendar/tests/test_issue_350.py 1970-01-01
01:00:00.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/tests/test_issue_350.py 2024-06-20
15:14:34.000000000 +0200
@@ -0,0 +1,9 @@
+'''Issue #350 - Ignore X-... properties also at end of file?
+
+ https://github.com/collective/icalendar/issues/350
+'''
+from icalendar import Calendar
+
+def test_issue_350(calendars):
+ calendar = list(calendars.issue_350.walk('X-COMMENT'))
+ assert len(calendar) == 0, "X-COMMENT at the end of the file was parsed"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/icalendar-5.0.12/src/icalendar/tests/test_property_params.py
new/icalendar-5.0.13/src/icalendar/tests/test_property_params.py
--- old/icalendar-5.0.12/src/icalendar/tests/test_property_params.py
2024-03-19 23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/tests/test_property_params.py
2024-06-20 15:14:34.000000000 +0200
@@ -38,17 +38,21 @@
assert parameter.to_ical() == expected
assert Parameters.from_ical(expected.decode('utf-8')) == parameter
+
def test_parse_parameter_string_without_quotes():
assert Parameters.from_ical('PARAM1=Value 1;PARA2=Value 2') ==
Parameters({'PARAM1': 'Value 1', 'PARA2': 'Value 2'})
+
def test_parametr_is_case_insensitive():
parameter = Parameters(parameter1='Value1')
assert parameter['parameter1'] == parameter['PARAMETER1'] ==
parameter['PaRaMeTer1']
+
def test_parameter_keys_are_uppercase():
parameter = Parameters(parameter1='Value1')
assert list(parameter.keys()) == ['PARAMETER1']
+
@pytest.mark.parametrize('cn_param, cn_quoted', [
# not double-quoted
('Aramis', 'Aramis'),
@@ -67,68 +71,41 @@
event.add('ATTENDEE', attendee)
assert f'ATTENDEE;CN={cn_quoted}:[email protected]' in
event.to_ical().decode('utf-8')
-class TestPropertyParams(unittest.TestCase):
- def test_property_params(self):
- # Property parameters with values containing a COLON character, a
- # SEMICOLON character or a COMMA character MUST be placed in quoted
- # text.
- cal_address = vCalAddress('mailto:[email protected]')
- cal_address.params["CN"] = "Doe, John"
- ical = Calendar()
- ical.add('organizer', cal_address)
-
- ical_str = Calendar.to_ical(ical)
- exp_str = b"""BEGIN:VCALENDAR\r\nORGANIZER;CN="Doe, John":"""\
- b"""mailto:[email protected]\r\nEND:VCALENDAR\r\n"""
-
- self.assertEqual(ical_str, exp_str)
-
- # other way around: ensure the property parameters can be restored from
- # an icalendar string.
- ical2 = Calendar.from_ical(ical_str)
- self.assertEqual(ical2.get('ORGANIZER').params.get('CN'), 'Doe, John')
-
- def test_parse_and_access_property_params(self):
- """Parse an ics string and access some property parameters then.
- This is a follow-up of a question received per email.
-
- """
- ics = """BEGIN:VCALENDAR
-VERSION:2.0
-PRODID://RESEARCH IN MOTION//BIS 3.0
-METHOD:REQUEST
-BEGIN:VEVENT
-SEQUENCE:2
-X-RIM-REVISION:0
-SUMMARY:Test meeting from BB
-X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
-CLASS:PUBLIC
-ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="RembrandXS":MAILTO:[email protected]
-ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="RembrandDX":MAILTO:[email protected]
-ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="RembrandSB":MAILTO:[email protected]
-UID:XRIMCAL-628059586-522954492-9750559
-DTSTART;VALUE=DATE:20120814
-DTEND;VALUE=DATE:20120815
-DESCRIPTION:Test meeting from BB
-DTSTAMP:20120813T151458Z
-ORGANIZER:mailto:[email protected]
-END:VEVENT
-END:VCALENDAR"""
-
- cal = icalendar.Calendar.from_ical(ics)
- event = cal.walk("VEVENT")[0]
- event['attendee'][0]
- self.assertEqual(event['attendee'][0].to_ical(),
- b'MAILTO:[email protected]')
- self.assertEqual(event['attendee'][0].params.to_ical(),
- b'CN=RembrandXS;PARTSTAT=NEEDS-ACTION;RSVP=TRUE')
- self.assertEqual(event['attendee'][0].params['cn'], 'RembrandXS')
-
- def test_repr(self):
- """Test correct class representation.
- """
- it = Parameters(parameter1='Value1')
- self.assertTrue(
- re.match(r"Parameters\({u?'PARAMETER1': u?'Value1'}\)", str(it))
- )
+def test_property_params():
+ """Property parameters with values containing a COLON character, a
+ SEMICOLON character or a COMMA character MUST be placed in quoted
+ text."""
+ cal_address = vCalAddress('mailto:[email protected]')
+ cal_address.params["CN"] = "Doe, John"
+ ical = Calendar()
+ ical.add('organizer', cal_address)
+
+ ical_str = Calendar.to_ical(ical)
+ exp_str = b"""BEGIN:VCALENDAR\r\nORGANIZER;CN="Doe, John":"""\
+ b"""mailto:[email protected]\r\nEND:VCALENDAR\r\n"""
+
+ assert ical_str == exp_str
+
+ # other way around: ensure the property parameters can be restored from
+ # an icalendar string.
+ ical2 = Calendar.from_ical(ical_str)
+ assert ical2.get('ORGANIZER').params.get('CN') == 'Doe, John'
+
+
+def test_parse_and_access_property_params(calendars):
+ """Parse an ics string and access some property parameters then.
+ This is a follow-up of a question received per email.
+
+ """
+ event = calendars.property_params.walk("VEVENT")[0]
+ attendee = event['attendee'][0]
+ assert attendee.to_ical() == b'MAILTO:[email protected]'
+ assert attendee.params.to_ical() ==
b'CN=RembrandXS;PARTSTAT=NEEDS-ACTION;RSVP=TRUE'
+ assert attendee.params['cn'] == 'RembrandXS'
+
+def test_repr():
+ """Test correct class representation.
+ """
+ it = Parameters(parameter1='Value1')
+ assert re.match(r"Parameters\({u?'PARAMETER1': u?'Value1'}\)", str(it))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/src/icalendar/tests/test_time.py
new/icalendar-5.0.13/src/icalendar/tests/test_time.py
--- old/icalendar-5.0.12/src/icalendar/tests/test_time.py 2024-03-19
23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/tests/test_time.py 2024-06-20
15:14:34.000000000 +0200
@@ -1,29 +1,28 @@
-import unittest
-
import datetime
import icalendar
import os
+def test_value_type_is_not_mapped():
+ """Usually, the value should be absent."""
+ assert 'X-SOMETIME' not in icalendar.cal.types_factory.types_map
+
+
+def test_value_type_is_mapped(x_sometime):
+ """The value is mapped for the test."""
+ assert 'X-SOMETIME' in icalendar.cal.types_factory.types_map
+
-class TestTime(unittest.TestCase):
+def test_create_from_ical(x_sometime):
+ directory = os.path.dirname(__file__)
+ ics = open(os.path.join(directory, 'calendars', 'time.ics'), 'rb')
+ cal = icalendar.Calendar.from_ical(ics.read())
+ ics.close()
- def setUp(self):
- icalendar.cal.types_factory.types_map['X-SOMETIME'] = 'time'
+ assert cal['X-SOMETIME'].dt == datetime.time(17, 20, 10)
+ assert cal['X-SOMETIME'].to_ical() == '172010'
- def tearDown(self):
- icalendar.cal.types_factory.types_map.pop('X-SOMETIME')
- def test_create_from_ical(self):
- directory = os.path.dirname(__file__)
- ics = open(os.path.join(directory, 'calendars', 'time.ics'), 'rb')
- cal = icalendar.Calendar.from_ical(ics.read())
- ics.close()
-
- self.assertEqual(cal['X-SOMETIME'].dt, datetime.time(17, 20, 10))
- self.assertEqual(cal['X-SOMETIME'].to_ical(), '172010')
-
- def test_create_to_ical(self):
- cal = icalendar.Calendar()
- cal.add('X-SOMETIME', datetime.time(17, 20, 10))
- self.assertTrue(b'X-SOMETIME;VALUE=TIME:172010' in
- cal.to_ical().splitlines())
+def test_create_to_ical(x_sometime):
+ cal = icalendar.Calendar()
+ cal.add('X-SOMETIME', datetime.time(17, 20, 10))
+ assert b'X-SOMETIME;VALUE=TIME:172010' in cal.to_ical().splitlines()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/icalendar-5.0.12/src/icalendar/tests/test_unit_prop.py
new/icalendar-5.0.13/src/icalendar/tests/test_unit_prop.py
--- old/icalendar-5.0.12/src/icalendar/tests/test_unit_prop.py 2024-03-19
23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/tests/test_unit_prop.py 2024-06-20
15:14:34.000000000 +0200
@@ -49,6 +49,9 @@
self.assertEqual(vBoolean.from_ical(vBoolean(True).to_ical()), True)
self.assertEqual(vBoolean.from_ical('true'), True)
+ # Error: key not exists
+ self.assertRaises(ValueError, vBoolean.from_ical, 'ture')
+
def test_prop_vCalAddress(self):
from ..prop import vCalAddress
txt = b'MAILTO:[email protected]'
@@ -65,6 +68,7 @@
self.assertEqual(vFloat(1.0).to_ical(), b'1.0')
self.assertEqual(vFloat.from_ical('42'), 42.0)
self.assertEqual(vFloat(42).to_ical(), b'42.0')
+ self.assertRaises(ValueError, vFloat.from_ical, '1s3')
def test_prop_vInt(self):
from ..prop import vInt
@@ -107,10 +111,16 @@
self.assertTrue(isinstance(vDDDTypes.from_ical('20010101'), date))
+ self.assertEqual(vDDDTypes.from_ical('123000'), time(12, 30))
+ self.assertIsInstance(vDDDTypes.from_ical('123000'), time)
+
self.assertEqual(vDDDTypes.from_ical('P31D'), timedelta(31))
self.assertEqual(vDDDTypes.from_ical('-P31D'), timedelta(-31))
+ invalid_period = (datetime(2000, 1, 1), datetime(2000, 1, 2),
datetime(2000, 1, 2))
+ self.assertRaises(ValueError, vDDDTypes(invalid_period).to_ical)
+
# Bad input
self.assertRaises(ValueError, vDDDTypes, 42)
@@ -123,6 +133,7 @@
self.assertEqual(vDate.from_ical('20010102'), date(2001, 1, 2))
self.assertRaises(ValueError, vDate, 'd')
+ self.assertRaises(ValueError, vDate.from_ical, '200102')
def test_prop_vDatetime(self):
from ..prop import vDatetime
@@ -205,6 +216,17 @@
self.assertEqual(vPeriod(per).to_ical(),
b'20000101T000000/20000102T000000')
+ # Error: one of the params is not instance of date/datetime
+ per = ('20000101T000000', datetime(2000, 1, 2))
+ self.assertRaises(ValueError, vPeriod, per)
+
+ per = (datetime(2000, 1, 1), '20000102T000000')
+ self.assertRaises(ValueError, vPeriod, per)
+
+ # Error: first params > second params
+ per = (datetime(2000, 1, 2), datetime(2000, 1, 1))
+ self.assertRaises(ValueError, vPeriod, per)
+
per = (datetime(2000, 1, 1), timedelta(days=31))
self.assertEqual(vPeriod(per).to_ical(), b'20000101T000000/P31D')
@@ -397,6 +419,8 @@
# We should also fail, right?
self.assertRaises(ValueError, vTime.from_ical, '263000')
+ self.assertRaises(ValueError, vTime, '263000')
+
def test_prop_vUri(self):
from ..prop import vUri
@@ -420,6 +444,7 @@
self.assertEqual(vGeo(g).to_ical(), '37.386013;-122.082932')
self.assertRaises(ValueError, vGeo, 'g')
+ self.assertRaises(ValueError, vGeo.from_ical, '1s3;1s3')
def test_prop_vUTCOffset(self):
from ..prop import vUTCOffset
@@ -461,10 +486,13 @@
self.assertRaises(ValueError, vUTCOffset.from_ical, '+2400')
+ self.assertRaises(ValueError, vUTCOffset, '0:00:00')
+
def test_prop_vInline(self):
from ..prop import vInline
self.assertEqual(vInline('Some text'), 'Some text')
+ self.assertEqual(vInline('Some text').to_ical(), b'Some text')
self.assertEqual(vInline.from_ical('Some text'), 'Some text')
t2 = vInline('other text')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/icalendar-5.0.12/src/icalendar/tests/test_with_doctest.py
new/icalendar-5.0.13/src/icalendar/tests/test_with_doctest.py
--- old/icalendar-5.0.12/src/icalendar/tests/test_with_doctest.py
2024-03-19 23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/tests/test_with_doctest.py
2024-06-20 15:14:34.000000000 +0200
@@ -1,6 +1,6 @@
"""This file tests the source code provided by the documentation.
-See
+See
- doctest documentation: https://docs.python.org/3/library/doctest.html
- Issue 443: https://github.com/collective/icalendar/issues/443
@@ -43,12 +43,15 @@
# This collection needs to exclude .tox and other subdirectories
DOCUMENTATION_PATH = os.path.join(HERE, "../../../")
-DOCUMENT_PATHS = [
- os.path.join(DOCUMENTATION_PATH, subdir, filename)
- for subdir in ["docs", "."]
- for filename in os.listdir(os.path.join(DOCUMENTATION_PATH, subdir))
- if filename.lower().endswith(".rst")
-]
+try:
+ DOCUMENT_PATHS = [
+ os.path.join(DOCUMENTATION_PATH, subdir, filename)
+ for subdir in ["docs", "."]
+ for filename in os.listdir(os.path.join(DOCUMENTATION_PATH, subdir))
+ if filename.lower().endswith(".rst")
+ ]
+except FileNotFoundError:
+ raise EnvironmentError("Could not find the documentation - remove the
build folder and try again.")
@pytest.mark.parametrize("filename", [
"README.rst",
@@ -62,6 +65,3 @@
"""This test runs doctest on a documentation file."""
test_result = doctest.testfile(document, module_relative=False)
assert test_result.failed == 0, f"{test_result.failed} errors in
{os.path.basename(document)}"
-
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/src/icalendar/windows_to_olson.py
new/icalendar-5.0.13/src/icalendar/windows_to_olson.py
--- old/icalendar-5.0.12/src/icalendar/windows_to_olson.py 2024-03-19
23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar/windows_to_olson.py 2024-06-20
15:14:34.000000000 +0200
@@ -51,7 +51,7 @@
'GMT Standard Time': 'Europe/London',
'GTB Standard Time': 'Europe/Bucharest',
'Georgian Standard Time': 'Asia/Tbilisi',
- 'Greenland Standard Time': 'America/Godthab',
+ 'Greenland Standard Time': 'America/Nuuk',
'Greenwich Standard Time': 'Atlantic/Reykjavik',
'Hawaiian Standard Time': 'Pacific/Honolulu',
'India Standard Time': 'Asia/Kolkata',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/src/icalendar.egg-info/PKG-INFO
new/icalendar-5.0.13/src/icalendar.egg-info/PKG-INFO
--- old/icalendar-5.0.12/src/icalendar.egg-info/PKG-INFO 2024-03-19
23:10:41.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar.egg-info/PKG-INFO 2024-06-20
15:14:42.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: icalendar
-Version: 5.0.12
+Version: 5.0.13
Summary: iCalendar parser/generator
Home-page: https://github.com/collective/icalendar
Author: Plone Foundation
@@ -148,11 +148,38 @@
Changelog
=========
+5.0.13 (2024-06-20)
+-------------------
+
+Minor changes:
+
+- Guide to delete the build folder before running tests
+- Add funding information
+- Make documentation build with Python 3.12
+- Update windows to olson conversion for Greenland Standard Time
+- Extend examples in Usage with alarm and recurrence
+- Document how to serve the built documentation to view with the browser
+- Improve test coverage
+
+Breaking changes:
+
+- ...
+
+New features:
+
+- Create GitHub releases for each tag.
+
+Bug fixes:
+
+- Parse calendars with X-COMMENT properties at the end the file by ignoring
these properites
+
+
5.0.12 (2024-03-19)
-------------------
Minor changes:
+- Analyse code coverage of test files
- Added corpus to fuzzing directory
- Added exclusion of fuzzing corpus in MANIFEST.in
- Augmented fuzzer to optionally convert multiple calendars from a source
string
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/src/icalendar.egg-info/SOURCES.txt
new/icalendar-5.0.13/src/icalendar.egg-info/SOURCES.txt
--- old/icalendar-5.0.12/src/icalendar.egg-info/SOURCES.txt 2024-03-19
23:10:41.000000000 +0100
+++ new/icalendar-5.0.13/src/icalendar.egg-info/SOURCES.txt 2024-06-20
15:14:42.000000000 +0200
@@ -52,6 +52,7 @@
src/icalendar/tests/test_issue_318_skip_default_parameters.py
src/icalendar/tests/test_issue_322_single_strings_characters_split_into_multiple_categories.py
src/icalendar/tests/test_issue_348_exception_parsing_value.py
+src/icalendar/tests/test_issue_350.py
src/icalendar/tests/test_issue_500_vboolean_for_parameter.py
src/icalendar/tests/test_issue_557_encode_native_parameters.py
src/icalendar/tests/test_multiple.py
@@ -88,6 +89,7 @@
src/icalendar/tests/calendars/issue_27_multiple_periods_in_freebusy_one_freebusy.ics
src/icalendar/tests/calendars/issue_322_expected_calendar.ics
src/icalendar/tests/calendars/issue_348_exception_parsing_value.ics
+src/icalendar/tests/calendars/issue_350.ics
src/icalendar/tests/calendars/issue_466_convert_tzid_with_slash.ics
src/icalendar/tests/calendars/issue_466_respect_unique_timezone.ics
src/icalendar/tests/calendars/issue_526_calendar_with_different_events.ics
@@ -100,6 +102,7 @@
src/icalendar/tests/calendars/parsing_error_in_UTC_offset.ics
src/icalendar/tests/calendars/period_with_timezone.ics
src/icalendar/tests/calendars/pr_480_summary_with_colon.ics
+src/icalendar/tests/calendars/property_params.ics
src/icalendar/tests/calendars/small_bad_calendar.ics
src/icalendar/tests/calendars/time.ics
src/icalendar/tests/calendars/timezone_rdate.ics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/icalendar-5.0.12/tox.ini new/icalendar-5.0.13/tox.ini
--- old/icalendar-5.0.12/tox.ini 2024-03-19 23:10:33.000000000 +0100
+++ new/icalendar-5.0.13/tox.ini 2024-06-20 15:14:34.000000000 +0200
@@ -12,13 +12,14 @@
coverage
hypothesis
commands =
- coverage run --source=src/icalendar --omit=*/tests/* --module pytest []
+ coverage run --source=src/icalendar --omit=*/tests/hypothesis/*
--omit=*/tests/fuzzed/* --module pytest []
coverage report
coverage html
[testenv:docs]
deps =
-r {toxinidir}/requirements_docs.txt
+ setuptools
changedir = docs
allowlist_externals = make
commands =