kopia lustrzana https://github.com/collective/icalendar
Merge branch 'master' into py38
commit
d81af0a3ad
|
@ -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]
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
24
README.rst
24
README.rst
|
@ -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/
|
||||
|
@ -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
|
||||
================
|
||||
|
|
|
@ -111,7 +111,7 @@ cmd = [sys.executable, '-c',
|
|||
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:
|
||||
|
|
|
@ -59,7 +59,7 @@ _marker = []
|
|||
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
|
||||
|
@ -90,7 +90,7 @@ class Component(CaselessDict):
|
|||
#
|
||||
# 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
|
||||
|
||||
|
@ -253,7 +253,7 @@ class Component(CaselessDict):
|
|||
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:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -150,7 +150,7 @@ END:VEVENT"""
|
|||
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
|
||||
"""
|
||||
|
|
|
@ -56,13 +56,13 @@ class IcalendarTestCase (unittest.TestCase):
|
|||
'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(
|
||||
|
|
|
@ -112,11 +112,11 @@ class TestPropertyParams(unittest.TestCase):
|
|||
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')
|
||||
|
||||
|
@ -124,7 +124,7 @@ class TestPropertyParams(unittest.TestCase):
|
|||
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:projectA@host.com',
|
||||
'MAILTO:projectB@host.com']})
|
||||
self.assertEqual(
|
||||
|
@ -172,7 +172,7 @@ class TestPropertyParams(unittest.TestCase):
|
|||
|
||||
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
|
||||
|
|
|
@ -106,7 +106,7 @@ class TestTimezoned(unittest.TestCase):
|
|||
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())
|
||||
|
|
|
@ -93,7 +93,7 @@ class TestCalComponent(unittest.TestCase):
|
|||
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'
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
|
@ -5,8 +5,8 @@ The data is taken from the unicode consortium [0], the proposal and rationale
|
|||
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 = {
|
||||
|
|
Ładowanie…
Reference in New Issue