forked from pool/python-vobject
Compare commits
7 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| b825758cb2 | |||
| b8f31aeab8 | |||
| fbacdc5439 | |||
| 06c12611ef | |||
| 516c1e0d5f | |||
| 5f3f04cf68 | |||
| 39185a4cf5 |
126
no-six.patch
Normal file
126
no-six.patch
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
diff -rU 3 a/vobject/base.py b/vobject/base.py
|
||||||
|
--- a/vobject/base.py 2024-12-16 08:15:20.000000000 +0100
|
||||||
|
+++ b/vobject/base.py 2025-05-08 10:54:19.517509757 +0200
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
import codecs
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
|
-import six
|
||||||
|
+import io
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Package version
|
||||||
|
@@ -858,7 +858,7 @@
|
||||||
|
Quoted-printable data will be decoded in the Behavior decoding phase.
|
||||||
|
|
||||||
|
# We're leaving this test in for awhile, because the unittest was ugly and dumb.
|
||||||
|
- >>> from six import StringIO
|
||||||
|
+ >>> from io import StringIO
|
||||||
|
>>> f=StringIO(testLines)
|
||||||
|
>>> for n, l in enumerate(getLogicalLines(f)):
|
||||||
|
... print("Line %s: %s" % (n, l[0]))
|
||||||
|
@@ -881,7 +881,7 @@
|
||||||
|
|
||||||
|
else:
|
||||||
|
quotedPrintable = False
|
||||||
|
- newbuffer = six.StringIO
|
||||||
|
+ newbuffer = io.StringIO
|
||||||
|
logicalLine = newbuffer()
|
||||||
|
lineNumber = 0
|
||||||
|
lineStartNumber = 0
|
||||||
|
@@ -996,7 +996,7 @@
|
||||||
|
"""
|
||||||
|
Encode and fold obj and its children, write to buf or return a string.
|
||||||
|
"""
|
||||||
|
- outbuf = buf or six.StringIO()
|
||||||
|
+ outbuf = buf or io.StringIO()
|
||||||
|
|
||||||
|
if isinstance(obj, Component):
|
||||||
|
if obj.group is None:
|
||||||
|
@@ -1018,7 +1018,7 @@
|
||||||
|
if obj.behavior and not startedEncoded:
|
||||||
|
obj.behavior.encode(obj)
|
||||||
|
|
||||||
|
- s = six.StringIO()
|
||||||
|
+ s = io.StringIO()
|
||||||
|
|
||||||
|
if obj.group is not None:
|
||||||
|
s.write(obj.group + '.')
|
||||||
|
@@ -1082,7 +1082,7 @@
|
||||||
|
Generate one Component at a time from a stream.
|
||||||
|
"""
|
||||||
|
if isinstance(streamOrString, basestring):
|
||||||
|
- stream = six.StringIO(streamOrString)
|
||||||
|
+ stream = io.StringIO(streamOrString)
|
||||||
|
else:
|
||||||
|
stream = streamOrString
|
||||||
|
|
||||||
|
diff -rU 3 a/vobject/hcalendar.py b/vobject/hcalendar.py
|
||||||
|
--- a/vobject/hcalendar.py 2024-10-01 16:46:45.000000000 +0200
|
||||||
|
+++ b/vobject/hcalendar.py 2025-05-08 10:55:12.047890349 +0200
|
||||||
|
@@ -28,7 +28,7 @@
|
||||||
|
</span>
|
||||||
|
"""
|
||||||
|
|
||||||
|
-import six
|
||||||
|
+import io
|
||||||
|
|
||||||
|
from datetime import date, datetime, timedelta
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@
|
||||||
|
Serialize iCalendar to HTML using the hCalendar microformat (http://microformats.org/wiki/hcalendar)
|
||||||
|
"""
|
||||||
|
|
||||||
|
- outbuf = buf or six.StringIO()
|
||||||
|
+ outbuf = buf or io.StringIO()
|
||||||
|
level = 0 # holds current indentation level
|
||||||
|
tabwidth = 3
|
||||||
|
|
||||||
|
diff -rU 3 a/vobject/icalendar.py b/vobject/icalendar.py
|
||||||
|
--- a/vobject/icalendar.py 2024-12-16 08:09:54.000000000 +0100
|
||||||
|
+++ b/vobject/icalendar.py 2025-05-08 10:57:12.542858557 +0200
|
||||||
|
@@ -10,7 +10,7 @@
|
||||||
|
import base64
|
||||||
|
|
||||||
|
from dateutil import rrule, tz
|
||||||
|
-import six
|
||||||
|
+import io
|
||||||
|
|
||||||
|
try:
|
||||||
|
import pytz
|
||||||
|
@@ -56,7 +56,7 @@
|
||||||
|
"""
|
||||||
|
Take a string or unicode, turn it into unicode, decoding as utf-8
|
||||||
|
"""
|
||||||
|
- if isinstance(s, six.binary_type):
|
||||||
|
+ if isinstance(s, bytes):
|
||||||
|
s = s.decode('utf-8')
|
||||||
|
return s
|
||||||
|
|
||||||
|
@@ -135,7 +135,7 @@
|
||||||
|
good_lines = ('rdate', 'rrule', 'dtstart', 'tzname', 'tzoffsetfrom',
|
||||||
|
'tzoffsetto', 'tzid')
|
||||||
|
# serialize encodes as utf-8, cStringIO will leave utf-8 alone
|
||||||
|
- buffer = six.StringIO()
|
||||||
|
+ buffer = io.StringIO()
|
||||||
|
# allow empty VTIMEZONEs
|
||||||
|
if len(self.contents) == 0:
|
||||||
|
return None
|
||||||
|
@@ -569,7 +569,7 @@
|
||||||
|
self.add(name).value = setlist
|
||||||
|
elif name in RULENAMES:
|
||||||
|
for rule in setlist:
|
||||||
|
- buf = six.StringIO()
|
||||||
|
+ buf = io.StringIO()
|
||||||
|
buf.write('FREQ=')
|
||||||
|
buf.write(FREQUENCIES[rule._freq])
|
||||||
|
|
||||||
|
@@ -1010,7 +1010,7 @@
|
||||||
|
transformed = obj
|
||||||
|
undoTransform = False
|
||||||
|
out = None
|
||||||
|
- outbuf = buf or six.StringIO()
|
||||||
|
+ outbuf = buf or io.StringIO()
|
||||||
|
if obj.group is None:
|
||||||
|
groupString = ''
|
||||||
|
else:
|
||||||
@@ -1,3 +1,30 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 8 09:04:57 UTC 2025 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
- verion 0.9.9
|
||||||
|
* Added product version to PRODID tag in iCalendar headers
|
||||||
|
* Added support for GEO tags in vCards
|
||||||
|
* radicale-1587.vcf added (missing in release tarball)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 19 09:35:46 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
- Use regular %%pynittest macro instead of running the test
|
||||||
|
script directly.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 18 13:50:35 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- add patch no-six.patch to get rid of six
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 5 15:07:32 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Update to 0.9.8
|
||||||
|
* Accumulated bug fixes
|
||||||
|
- Move %python_uninstall_alternative from %preun to %postun
|
||||||
|
- Update BuildRequires and Requires from setup.py
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 2 22:20:21 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Thu May 2 22:20:21 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-vobject
|
# spec file for package python-vobject
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -19,21 +19,26 @@
|
|||||||
%global modname vobject
|
%global modname vobject
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-vobject
|
Name: python-vobject
|
||||||
Version: 0.9.7
|
Version: 0.9.9
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python package for parsing and creating iCalendar and vCard files
|
Summary: Python package for parsing and creating iCalendar and vCard files
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/py-vobject/vobject/
|
URL: https://github.com/py-vobject/vobject/
|
||||||
Source: https://files.pythonhosted.org/packages/source/v/vobject/%{modname}-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/v/vobject/%{modname}-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM https://github.com/py-vobject/vobject/pull/87 remove six
|
||||||
|
# file missiing in release
|
||||||
|
Source1: radicale-1587.vcf
|
||||||
|
Patch0: no-six.patch
|
||||||
BuildRequires: %{python_module PyICU}
|
BuildRequires: %{python_module PyICU}
|
||||||
BuildRequires: %{python_module devel >= 2.7}
|
BuildRequires: %{python_module devel >= 2.7}
|
||||||
BuildRequires: %{python_module python-dateutil >= 2.4.0}
|
BuildRequires: %{python_module python-dateutil >= 2.7.0}
|
||||||
|
BuildRequires: %{python_module pytz}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-python-dateutil >= 2.4.0
|
Requires: python-python-dateutil >= 2.7.0
|
||||||
Requires: python-six
|
Requires: python-pytz
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
Recommends: python-PyICU
|
Recommends: python-PyICU
|
||||||
@@ -49,10 +54,12 @@ structures to iCalendar, vCard, or (experimentally) hCalendar
|
|||||||
unicode strings.
|
unicode strings.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{modname}-%{version}
|
%autosetup -p1 -n %{modname}-%{version}
|
||||||
# Fix wrong-file-end-of-line-encoding
|
# Fix wrong-file-end-of-line-encoding
|
||||||
sed -i 's/\r$//' ACKNOWLEDGEMENTS.txt
|
sed -i 's/\r$//' ACKNOWLEDGEMENTS.txt
|
||||||
|
|
||||||
|
cp %{S:1} test_files/.
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
@@ -64,13 +71,13 @@ done
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_exec tests.py
|
%pyunittest -v tests.py
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative change_tz
|
%python_install_alternative change_tz
|
||||||
%python_install_alternative ics_diff
|
%python_install_alternative ics_diff
|
||||||
|
|
||||||
%preun
|
%postun
|
||||||
%python_uninstall_alternative change_tz
|
%python_uninstall_alternative change_tz
|
||||||
%python_uninstall_alternative ics_diff
|
%python_uninstall_alternative ics_diff
|
||||||
|
|
||||||
|
|||||||
6
radicale-1587.vcf
Normal file
6
radicale-1587.vcf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
BEGIN:VCARD
|
||||||
|
VERSION:3.0
|
||||||
|
FN:Given Family
|
||||||
|
N:Family;Given;Additional;Prefix;Suffix
|
||||||
|
GEO:37.386013;-122.082932
|
||||||
|
END:VCARD
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ab727bf81de88984ada5c11f066f1e1649903d3e3d7ec91f1ce968172afd5256
|
|
||||||
size 58657
|
|
||||||
3
vobject-0.9.9.tar.gz
Normal file
3
vobject-0.9.9.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ac44e5d7e2079d84c1d52c50a615b9bec4b1ba958608c4c7fe40cbf33247b38e
|
||||||
|
size 1208905
|
||||||
Reference in New Issue
Block a user