diff --git a/caldav-0.10.0.tar.gz b/caldav-0.10.0.tar.gz deleted file mode 100644 index 7393010..0000000 --- a/caldav-0.10.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:42e6995e573736d85b75f3f7d8e2a9cb077d92e40fc2ca8ecddba6ebdf2b6816 -size 234028 diff --git a/caldav-1.3.9.tar.gz b/caldav-1.3.9.tar.gz new file mode 100644 index 0000000..b6bd1c5 --- /dev/null +++ b/caldav-1.3.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0eaf7537145383d89cf5b5802dea7d5669570741148fc572c53b70f286f1094a +size 106392 diff --git a/drop-python2-support.patch b/drop-python2-support.patch deleted file mode 100644 index 1878c9b..0000000 --- a/drop-python2-support.patch +++ /dev/null @@ -1,274 +0,0 @@ -Index: caldav-0.10.0/caldav/davclient.py -=================================================================== ---- caldav-0.10.0.orig/caldav/davclient.py -+++ caldav-0.10.0/caldav/davclient.py -@@ -4,7 +4,6 @@ import logging - import re - - import requests --import six - from caldav.elements import cdav - from caldav.elements import dav - from caldav.elements import ical -@@ -21,10 +20,7 @@ from caldav.objects import ScheduleInbox - from caldav.objects import ScheduleOutbox - from lxml import etree - --if six.PY3: -- from urllib.parse import unquote --else: -- from urlparse import unquote -+from urllib.parse import unquote - - - class DAVResponse: -Index: caldav-0.10.0/caldav/elements/base.py -=================================================================== ---- caldav-0.10.0.orig/caldav/elements/base.py -+++ caldav-0.10.0/caldav/elements/base.py -@@ -3,7 +3,6 @@ - from caldav.lib.namespace import nsmap - from caldav.lib.python_utilities import to_unicode - from lxml import etree --from six import PY3 - - - class BaseElement(object): -@@ -30,9 +29,7 @@ class BaseElement(object): - utf8 = etree.tostring( - self.xmlelement(), encoding="utf-8", xml_declaration=True, pretty_print=True - ) -- if PY3: -- return str(utf8, "utf-8") -- return utf8 -+ return str(utf8, "utf-8") - - def xmlelement(self): - root = etree.Element(self.tag, nsmap=nsmap) -Index: caldav-0.10.0/caldav/lib/python_utilities.py -=================================================================== ---- caldav-0.10.0.orig/caldav/lib/python_utilities.py -+++ caldav-0.10.0/caldav/lib/python_utilities.py -@@ -1,53 +1,31 @@ --from six import PY3 --from six import string_types -- -- --def isPython3(): -- """Deprecated. Use six.PY3""" -- return PY3 -- -- - def to_wire(text): -- if text is not None and isinstance(text, string_types) and PY3: -+ if text is not None and isinstance(text, str): - text = bytes(text, "utf-8") -- elif not PY3: -- text = to_unicode(text).encode("utf-8") - return text - - - def to_local(text): -- if text is not None and not isinstance(text, string_types): -+ if text is not None and not isinstance(text, str): - text = text.decode("utf-8") - return text - - - def to_str(text): -- if text and not isinstance(text, string_types): -+ if text and not isinstance(text, str): - text = text.decode("utf-8") - return text - - - def to_normal_str(text): - """ -- A str object is a unicode on python3 and a byte string on python2. -- Make sure we return a normal string, no matter what version of -- python ... -+ Make sure we return a normal string - """ -- if PY3 and text and not isinstance(text, str): -+ if text and not isinstance(text, str): - text = text.decode("utf-8") -- elif not PY3 and text and not isinstance(text, str): -- text = text.encode("utf-8") - return text - - - def to_unicode(text): -- if ( -- text -- and isinstance(text, string_types) -- and not PY3 -- and not isinstance(text, unicode) -- ): -- return unicode(text, "utf-8") -- if PY3 and text and isinstance(text, bytes): -+ if text and isinstance(text, bytes): - return text.decode("utf-8") - return text -Index: caldav-0.10.0/caldav/lib/url.py -=================================================================== ---- caldav-0.10.0.orig/caldav/lib/url.py -+++ caldav-0.10.0/caldav/lib/url.py -@@ -2,29 +2,15 @@ - # -*- encoding: utf-8 -*- - from caldav.lib.python_utilities import to_normal_str - from caldav.lib.python_utilities import to_unicode --from six import PY3 - --if PY3: -- from urllib.parse import ( -- ParseResult, -- SplitResult, -- urlparse, -- unquote, -- quote, -- urlunparse, -- ) --else: -- from urlparse import ParseResult, SplitResult -- from urlparse import urlparse, urlunparse -- from urllib import unquote, quote -- -- --def uc2utf8(input): -- # argh! this feels wrong, but seems to be needed. -- if not PY3 and type(input) == unicode: -- return input.encode("utf-8") -- else: -- return input -+from urllib.parse import ( -+ ParseResult, -+ SplitResult, -+ urlparse, -+ unquote, -+ quote, -+ urlunparse, -+) - - - class URL: -@@ -195,12 +181,12 @@ class URL: - raise ValueError("%s can't be joined with %s" % (self, path)) - - if path.path[0] == "/": -- ret_path = uc2utf8(path.path) -+ ret_path = path.path - else: - sep = "/" - if self.path.endswith("/"): - sep = "" -- ret_path = "%s%s%s" % (self.path, sep, uc2utf8(path.path)) -+ ret_path = "%s%s%s" % (self.path, sep, path.path) - return URL( - ParseResult( - self.scheme or path.scheme, -Index: caldav-0.10.0/setup.py -=================================================================== ---- caldav-0.10.0.orig/setup.py -+++ caldav-0.10.0/setup.py -@@ -66,7 +66,7 @@ if __name__ == "__main__": - packages=find_packages(exclude=["tests"]), - include_package_data=True, - zip_safe=False, -- install_requires=["vobject", "lxml", "requests", "six", "icalendar"] -+ install_requires=["vobject", "lxml", "requests", "icalendar"] - + extra_packages, - tests_require=test_packages + extra_test_packages, - extras_require={ -Index: caldav-0.10.0/tests/proxy.py -=================================================================== ---- caldav-0.10.0.orig/tests/proxy.py -+++ caldav-0.10.0/tests/proxy.py -@@ -28,18 +28,11 @@ from types import FrameType - - from caldav.lib.python_utilities import to_local - from caldav.lib.python_utilities import to_wire --from six import PY3 - --if PY3: -- from urllib import parse -- from urllib.parse import urlparse, urlunparse -- from http.server import BaseHTTPRequestHandler, HTTPServer -- from socketserver import ThreadingMixIn --else: -- from urlparse import urlparse as parse -- from urlparse import urlparse, urlunparse -- from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer -- from SocketServer import ThreadingMixIn -+from urllib import parse -+from urllib.parse import urlparse, urlunparse -+from http.server import BaseHTTPRequestHandler, HTTPServer -+from socketserver import ThreadingMixIn - - __version__ = "0.3.1" - -Index: caldav-0.10.0/tests/test_caldav.py -=================================================================== ---- caldav-0.10.0.orig/tests/test_caldav.py -+++ caldav-0.10.0/tests/test_caldav.py -@@ -41,7 +41,6 @@ from caldav.objects import Principal - from caldav.objects import Todo - from nose.plugins.skip import SkipTest - from requests.packages import urllib3 --from six import PY3 - - from . import compatibility_issues - from .conf import caldav_servers -@@ -70,10 +69,7 @@ if test_radicale: - import radicale.server - import socket - --if PY3: -- from urllib.parse import urlparse --else: -- from urlparse import urlparse -+from urllib.parse import urlparse - - log = logging.getLogger("caldav") - -Index: caldav-0.10.0/tests/test_caldav_unit.py -=================================================================== ---- caldav-0.10.0.orig/tests/test_caldav_unit.py -+++ caldav-0.10.0/tests/test_caldav_unit.py -@@ -37,15 +37,10 @@ from caldav.objects import FreeBusy - from caldav.objects import Journal - from caldav.objects import Principal - from caldav.objects import Todo --from six import PY3 - - --if PY3: -- from urllib.parse import urlparse -- from unittest import mock --else: -- from urlparse import urlparse -- import mock -+from urllib.parse import urlparse -+from unittest import mock - - ## Some example icalendar data copied from test_caldav.py - ev1 = """BEGIN:VCALENDAR -@@ -165,14 +160,11 @@ class TestCalDAV: - assert response.status == 200 - assert response.tree is None - -- if PY3: -- response = client.put( -- "/foo/møøh/bar".encode("utf-8"), -- "bringebærsyltetøy 北京 пиво".encode("utf-8"), -- {}, -- ) -- else: -- response = client.put(u"/foo/møøh/bar", "bringebærsyltetøy 北京 пиво", {}) # fmt: skip -+ response = client.put( -+ "/foo/møøh/bar".encode("utf-8"), -+ "bringebærsyltetøy 北京 пиво".encode("utf-8"), -+ {}, -+ ) - assert response.status == 200 - assert response.tree is None - diff --git a/python-caldav.changes b/python-caldav.changes index 52b1773..fb7cfc2 100644 --- a/python-caldav.changes +++ b/python-caldav.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Thu Dec 14 11:08:18 UTC 2023 - pgajdos@suse.com + +- deleted patches + - drop-python2-support.patch (upstreamed) + +------------------------------------------------------------------- +Thu Dec 14 09:17:55 UTC 2023 - Petr Gajdos + +- update to 1.3.9 + [1.3.9] - 2023-12-12 + * Some bugfixes. + [1.3.6] - 2023-07-20 + * One of the tests has been partially disabled, ref #300 , #320 and #321 + [1.3.3] - 2023-07-19 + * Support for very big events, credits to github user @aaujon in #301 + * Custom HTTP headers was added in v1.2, but documentation and unit test is added in v1.3 + * More test code in #308 + * Add props parameter to search function, credits to github user @ge-lem in #315 + * Set an id field in calendar objects when populated through CalendarSet.calendars() + * get_relatives-method, #294 + * get_dtend-method + ------------------------------------------------------------------- Thu Nov 3 17:38:12 UTC 2022 - Daniel Garcia diff --git a/python-caldav.spec b/python-caldav.spec index 58c79f7..a13e3ae 100644 --- a/python-caldav.spec +++ b/python-caldav.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,21 +18,20 @@ %global modname caldav Name: python-%{modname} -Version: 0.10.0 +Version: 1.3.9 Release: 0 Summary: CalDAV (RFC4791) client library for Python License: Apache-2.0 AND GPL-3.0-or-later Group: Development/Languages/Python URL: https://pypi.python.org/pypi/%{modname} Source: https://files.pythonhosted.org/packages/source/c/caldav/%{modname}-%{version}.tar.gz -# PATCH-FIX-UPSTREAM drop-python2-support.patch gh#python-caldav/caldav#228 -Patch1: drop-python2-support.patch BuildRequires: %{python_module lxml} BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module vobject} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-icalendar Requires: python-lxml Requires: python-requests Requires: python-vobject