Skip to content

Commit

Permalink
Merge branch 'master' into py38
Browse files Browse the repository at this point in the history
  • Loading branch information
niccokunzmann authored Aug 19, 2022
2 parents d4c1908 + ae7d35c commit d81af0a
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 24 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,9 @@ Fixes:
- created sphinx documentation and started documenting development and goals.
[garbas]

- hook out github repository to http://readthedocs.org service so sphinx
- hook out github repository to https://readthedocs.org service so sphinx
documentation is generated on each commit (for master). Documentation can be
visible on: http://readthedocs.org/docs/icalendar/en/latest/
visible on: https://icalendar.readthedocs.io/en/latest/
[garbas]


Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ These are some contribution examples

- Extending the documentation.

- Sponsor a Sprint (http://plone.org/events/sprints/whatis).
- Sponsor a Sprint (https://plone.org/events/sprints/whatis).


For pull requests, keep this in mind
Expand Down
24 changes: 20 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ files.
:target: https://pypi.org/project/icalendar/#files
:alt: Downloads from PyPI

.. image:: https://github.com/collective/icalendar/actions/workflows/tests.yml/badge.svg
:target: https://github.com/collective/icalendar/actions/workflows/tests.yml
.. image:: https://img.shields.io/github/workflow/status/collective/icalendar/tests/master?label=master&logo=github
:target: https://github.com/collective/icalendar/actions/workflows/tests.yml?query=branch%3Amaster
:alt: GitHub Actions build status for master

.. image:: https://github.com/collective/icalendar/actions/workflows/tests.yml/badge.svg?branch=4.x
:target: https://github.com/collective/icalendar/actions/workflows/tests.yml
.. image:: https://img.shields.io/github/workflow/status/collective/icalendar/tests/4.x?label=4.x&logo=github
:target: https://github.com/collective/icalendar/actions/workflows/tests.yml?query=branch%3A4.x++
:alt: GitHub Actions build status for 4.x

.. _`icalendar`: https://pypi.org/project/icalendar/
Expand All @@ -38,6 +38,22 @@ files.
.. _`pytz`: https://pypi.org/project/pytz/
.. _`BSD`: https://github.com/collective/icalendar/issues/2

Versions and Compatibility
--------------------------

``icalendar`` is a critical project used by many. It has been there for a long time and maintaining
long-term compatibility with projects conflicts partially with providing and using the features that
the latest Python versions bring.

Since we pour more `effort into maintaining and developing icalendar <https://github.com/collective/icalendar/discussions/360>`__,
we split the project into two:

- `Branch 4.x <https://github.com/collective/icalendar/tree/4.x>`__ with maximum compatibility to Python versions ``2.7`` and ``3.4+``, ``PyPy2`` and ``PyPy3``.
- `Branch master <https://github.com/collective/icalendar/>`__ with the compatibility to Python versions ``3.7+`` and ``PyPy3``.

We expect the ``master`` branch with versions ``5+`` receive the latest updates and features,
and the ``4.x`` branch the subset of security and bug fixes only.
We recomment migrating to later Python versions and also providing feedback if you depend on the ``4.x`` features.

Related projects
================
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
find_links = os.environ.get(
'bootstrap-testing-find-links',
options.find_links or
('http://downloads.buildout.org/'
('https://downloads.buildout.org/'
if options.accept_buildout_test_releases else None)
)
if find_links:
Expand Down
6 changes: 3 additions & 3 deletions src/icalendar/cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, *args, **kwargs):
class Component(CaselessDict):
"""Component is the base object for calendar, Event and the other
components defined in RFC 2445. normally you will not use this class
directy, but rather one of the subclasses.
directly, but rather one of the subclasses.
"""

name = None # should be defined in each component
Expand Down Expand Up @@ -90,7 +90,7 @@ def __init__(self, *args, **kwargs):
#
# If the parser is too strict it might prevent parsing erroneous but
# otherwise compliant properties. So the parser is pretty lax, but it is
# possible to test for non-complience by calling this method.
# possible to test for non-compliance by calling this method.
# """
# return name in not_compliant

Expand Down Expand Up @@ -253,7 +253,7 @@ def get_inline(self, name, decode=1):
return vals

def set_inline(self, name, values, encode=1):
"""Converts a list of values into comma seperated string and sets value
"""Converts a list of values into comma separated string and sets value
to that.
"""
if encode:
Expand Down
2 changes: 1 addition & 1 deletion src/icalendar/parser_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def data_encode(data, encoding=DEFAULT_ENCODING):
"""Encode all datastructures to the given encoding.
Currently unicode strings, dicts and lists are supported.
"""
# http://stackoverflow.com/questions/1254454/fastest-way-to-convert-a-dicts-keys-values-from-unicode-to-str
# https://stackoverflow.com/questions/1254454/fastest-way-to-convert-a-dicts-keys-values-from-unicode-to-str
if isinstance(data, compat.unicode_type):
return data.encode(encoding)
elif isinstance(data, dict):
Expand Down
2 changes: 1 addition & 1 deletion src/icalendar/tests/test_fixed_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_issue_100(self):
icalendar.Event.from_ical(ical_content).to_ical()

def test_issue_101(self):
"""Issue #101 - icalender is choking on umlauts in ORGANIZER
"""Issue #101 - icalendar is choking on umlauts in ORGANIZER
https://github.com/collective/icalendar/issues/101
"""
Expand Down
4 changes: 2 additions & 2 deletions src/icalendar/tests/test_icalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ def test_contentline_class(self):
'123456789 123456789 123456789 123456789 ')
)

# http://tools.ietf.org/html/rfc5545#section-3.3.11
# https://tools.ietf.org/html/rfc5545#section-3.3.11
# An intentional formatted text line break MUST only be included in
# a "TEXT" property value by representing the line break with the
# character sequence of BACKSLASH, followed by a LATIN SMALL LETTER
# N or a LATIN CAPITAL LETTER N, that is "\n" or "\N".

# Newlines are not allwoed in content lines
# Newlines are not allowed in content lines
self.assertRaises(AssertionError, Contentline, b'1234\r\n\r\n1234')

self.assertEqual(
Expand Down
8 changes: 4 additions & 4 deletions src/icalendar/tests/test_property_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ def test_parameters_class(self):
self.assertEqual(p['parameter1'], 'Value1')
self.assertEqual(p['PARAMETER1'], 'Value1')

# Parameter with list of values must be seperated by comma
# Parameter with list of values must be separated by comma
p = Parameters({'parameter1': ['Value1', 'Value2']})
self.assertEqual(p.to_ical(), b'PARAMETER1=Value1,Value2')

# Multiple parameters must be seperated by a semicolon
# Multiple parameters must be separated by a semicolon
p = Parameters({'RSVP': 'TRUE', 'ROLE': 'REQ-PARTICIPANT'})
self.assertEqual(p.to_ical(), b'ROLE=REQ-PARTICIPANT;RSVP=TRUE')

# Parameter values containing ',;:' must be double quoted
p = Parameters({'ALTREP': 'http://www.wiz.org'})
self.assertEqual(p.to_ical(), b'ALTREP="http://www.wiz.org"')

# list items must be quoted seperately
# list items must be quoted separately
p = Parameters({'MEMBER': ['MAILTO:[email protected]',
'MAILTO:[email protected]']})
self.assertEqual(
Expand Down Expand Up @@ -172,7 +172,7 @@ def test_parameters_class(self):

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 recieved per email.
This is a follow-up of a question received per email.
"""
ics = """BEGIN:VCALENDAR
Expand Down
2 changes: 1 addition & 1 deletion src/icalendar/tests/test_timezoned.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_create_to_ical(self):
event.add('attendee', 'franz')
event.add('attendee', 'sepp')
event.add('contact', 'Max Mustermann, 1010 Wien')
event.add('url', 'http://plone.org')
event.add('url', 'https://plone.org')
cal.add_component(event)

test_out = b'|'.join(cal.to_ical().splitlines())
Expand Down
2 changes: 1 addition & 1 deletion src/icalendar/tests/test_unit_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_cal_Component(self):
b'BEGIN:VCALENDAR\r\nATTENDEE:Max M\r\nEND:VCALENDAR\r\n'
)

# Components can be nested, so You can add a subcompont. Eg a calendar
# Components can be nested, so You can add a subcomponent. Eg a calendar
# holds events.
e = Component(summary='A brief history of time')
e.name = 'VEVENT'
Expand Down
2 changes: 1 addition & 1 deletion src/icalendar/timezone_cache.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# we save all timezone with TZIDs unknow to the TZDB in here
# we save all timezone with TZIDs unknown to the TZDB in here
_timezone_cache = {}
4 changes: 2 additions & 2 deletions src/icalendar/windows_to_olson.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
for this mapping is also available at the unicode consortium [1].
[0] http://www.unicode.org/cldr/charts/29/supplemental/zone_tzid.html
[1] http://cldr.unicode.org/development/development-process/design-proposals/extended-windows-olson-zid-mapping # noqa
[0] https://www.unicode.org/cldr/cldr-aux/charts/29/supplemental/zone_tzid.html
[1] https://cldr.unicode.org/development/development-process/design-proposals/extended-windows-olson-zid-mapping # noqa
"""

WINDOWS_TO_OLSON = {
Expand Down

0 comments on commit d81af0a

Please sign in to comment.