# ChangeLog for dev-python/icalendar
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/ChangeLog,v 1.6 2010/02/08 08:48:54 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/ChangeLog,v 1.7 2010/04/25 17:58:12 nixphoeni Exp $
+
+*icalendar-2.1_p20100409 (25 Apr 2010)
+
+ 25 Apr 2010; Joe Sapp <nixphoeni@gentoo.org>
+ +files/01_all_UIDGenerator-fix.patch, icalendar-2.0.1.ebuild,
+ +files/02_all_vDatetime-tzinfo-fix.patch, icalendar-2.1-r1.ebuild,
+ +files/03_all_duration-fix.patch, +icalendar-2.1_p20100409.ebuild,
+ +files/04_all_date-type-test-in-vDDDTypes.patch,
+ +files/05_all_utf8-multi-octet-fix.patch,
+ +files/06_all_test.py-use-set.patch:
+ Added an ebuild to include patches flying across the mailing list. It's
+ unknown when upstream will release a version incorporating these fixes.
08 Feb 2010; Peter Volkov <pva@gentoo.org> icalendar-2.0.1.ebuild,
icalendar-2.1-r1.ebuild:
+AUX 01_all_UIDGenerator-fix.patch 735 RMD160 a340b12c4342714f92c2e14a9d3850a4c62de059 SHA1 0a5159915cfb0c0bb687932d270b2690a1b53ba6 SHA256 da06c4912bb91c9c425ee5b6a225de81d40c52bba00680a67d4b4cd596518f5b
+AUX 02_all_vDatetime-tzinfo-fix.patch 1378 RMD160 7dfb616525f3f99015127659a832ab47f885e1ef SHA1 95c27325c97566b772527d9f026531f4c4f04d19 SHA256 184dc5255a1755c2265a1993b9458ecdaad5caebbd99c171dd4a4178547a3fdb
+AUX 03_all_duration-fix.patch 1486 RMD160 c540c5b7bce91a1fe4b9df50addb13d119b3b4ec SHA1 6a907c2418d980fd9c4c88f86ca9e7e48c771502 SHA256 9b670789872f6e7a504120b728eea5215e09510111de10b7f8f2a3b5c7599662
+AUX 04_all_date-type-test-in-vDDDTypes.patch 1034 RMD160 413c0a44985ba225d42c45cccf4d3b799d148447 SHA1 7f13c43f980d39a029b06fc5e82152442de1d723 SHA256 1d707c0b64a04a79bdcbb6a26596bd8217a71a872a4436f3105511ce0b59ccfb
+AUX 05_all_utf8-multi-octet-fix.patch 1013 RMD160 7fc786364d6302583776d78fe1a134d56c6a1170 SHA1 024ae30d0e97fd3f0c9c87081673d96949e8c8ca SHA256 bbe200075696f88119900423552cfcf3ab2d4b312433d60c29d234195ad74285
+AUX 06_all_test.py-use-set.patch 1372 RMD160 42a0cef15a8e18db583296f21bf51d3c3a3fe17e SHA1 1b7c41f8af7721a2e56615c40c53af422a3786ad SHA256 2ec2d2a8f9774de2c66b407f0fa88343fa49628441b0aaf3d404044ab3d2419c
AUX icalendar-2.0.1-UIDGenerator-fix.patch 735 RMD160 a340b12c4342714f92c2e14a9d3850a4c62de059 SHA1 0a5159915cfb0c0bb687932d270b2690a1b53ba6 SHA256 da06c4912bb91c9c425ee5b6a225de81d40c52bba00680a67d4b4cd596518f5b
AUX icalendar-2.1-vDatetime-tzinfo-fix.patch 1378 RMD160 7dfb616525f3f99015127659a832ab47f885e1ef SHA1 95c27325c97566b772527d9f026531f4c4f04d19 SHA256 184dc5255a1755c2265a1993b9458ecdaad5caebbd99c171dd4a4178547a3fdb
DIST icalendar-2.0.1.tar.gz 73338 RMD160 e377c8591c0a014c0d84e5a8ebd072dd49839bf9 SHA1 aae1f3e67eceba9d06461f5eccdb7560194dc58f SHA256 2b0d6fbede8360bb8db13e72e25fd3c5de26ca7fb811be61ece7d29b947c9100
DIST icalendar-2.1.tar.gz 73180 RMD160 a62548dcabe8657d0445e2b810ff6f3c49fdec0f SHA1 be1104db8853e3e0746a6f7bc3bb8103c79d5edb SHA256 7e0080cd5fbbdbe084087a5863c5419bbb889fcd3f5988f436c5b94b4fba4641
-EBUILD icalendar-2.0.1.ebuild 790 RMD160 fed380d4e888cdd130bf6b0a185e52f36c9a7dfc SHA1 37c46acc3e2abca4a5c8ea612b2d18c27d98e87e SHA256 5f6d4911db5a85513dc2c269dacdd541e0911515ec58cd5324f0c6cc11501f4c
-EBUILD icalendar-2.1-r1.ebuild 939 RMD160 bbb2f093cd1ee4949c708a95251497fed696b68f SHA1 67e99f414e7ce072ca28364d12d6fc58a519a8bc SHA256 640639ec6f353b280c791c2e270f3b64ded2be7d47adc945c009a353eb61215d
-MISC ChangeLog 1215 RMD160 0b2f87d778567b09e945b89701bf9346a89b890b SHA1 a1cdb790a894783844d6110c4647bdcbcec2e19d SHA256 3d5553edfbf350cd4674cc8fa1fab6a97c4dbfae4705458feed9a0a160b50eb0
+EBUILD icalendar-2.0.1.ebuild 798 RMD160 eb29b2ae4e0c15a8e19b5885b69034013b8c9b86 SHA1 f8a9ab3e774ee430b0cfd633b193ef2be62a908c SHA256 8ae7eb7596eec51b52821893687769a03ba34fcd11187ddcb2d1f5b13baca9b3
+EBUILD icalendar-2.1-r1.ebuild 942 RMD160 f625aefdb7389f0e113f12e714ca1bccbbc08b98 SHA1 c58684ea01dfa12c8697ca6419e32d8e80c59a1a SHA256 8dbb6fc3fa18fdeaf15d88fb8355edb6a231d322acd196413eb89a532210385e
+EBUILD icalendar-2.1_p20100409.ebuild 979 RMD160 e07ebefd387e4d84e61d1a08417d784da0435eef SHA1 2a756a04cea67db3d37789c090f2ed510fb25fb4 SHA256 34a275755e43304af60ec469e62a5f99cb54c362a7b90eba0745781acd4b63b5
+MISC ChangeLog 1793 RMD160 03cde909c5437a485e5a98452fde0c264557ad0e SHA1 d6d2b31da0d7727ec279acf34ff18d729fecc0b4 SHA256 38acab0e3bbff72644f1eed016b7875d2f440f0a0576d07fa3d212f6d4663c6c
MISC metadata.xml 227 RMD160 1894e37fc7a39800814a947626e65e25e1f42c95 SHA1 051cb5d5c36289036c5bbe516b53468f1939c1d4 SHA256 d8d77205406c986c326acafaca4af656e99982720ccd6461bb3e60ea897a600f
--- /dev/null
+--- src/icalendar/tools.py
++++ src/icalendar/tools.py
+@@ -1,5 +1,6 @@
+ from string import ascii_letters, digits
+ import random
++from datetime import datetime
+
+ """
+ This module contains non-essential tools for iCalendar. Pretty thin so far eh?
+@@ -42,9 +43,9 @@
+ datetime-uniquevalue at host. Like:
+ 20050105T225746Z-HKtJMqUgdO0jDUwm at example.com
+ """
+- from PropertyValues import vText, vDatetime
++ from icalendar.prop import vText, vDatetime
+ unique = unique or self.rnd_string()
+- return vText('%s-%s@%s' % (vDatetime.today().ical(), unique, host_name))
++ return vText('%s-%s@%s' % (vDatetime(datetime.today()).ical(), unique, host_name))
+
+
+ if __name__ == "__main__":
+
--- /dev/null
+From http://codespeak.net/pipermail/icalendar-dev/2009-July/000139.html:
+
+SUMMARY: The encoding mechanism of vDatetime handles tzinfo fields
+incorrectly (specifically with respect to daylight savings time).
+Attached is a simple patch that makes it work.
+
+DETAILS: Currently vDatetime.ical() tries to compute the utcoffset of
+the tzinfo, and then subtract that offset. This approach is valid,
+but the computation of the utcoffset is wrong, because it's done relative
+to datetime.now() instead of the actual datetime object (self.dt)
+to be converted. This is an issue for timezones whose utcoffset varies
+throughout the year, e.g., from daylight savings time.
+Replacing datetime.now() with self.dt would fix the code,
+but I opted to use the builtin 'asttimezone' method
+because it's slightly simpler.
+
+Submitted by Erik Demaine.
+===================================================================
+--- src/icalendar/prop.py.orig 2009-12-14 08:43:50.000000000 -0500
++++ src/icalendar/prop.py 2009-12-20 12:41:28.000000000 -0500
+@@ -309,8 +309,7 @@
+
+ def ical(self):
+ if self.dt.tzinfo:
+- utc_time = self.dt - self.dt.tzinfo.utcoffset(datetime.now())
+- return utc_time.strftime("%Y%m%dT%H%M%SZ")
++ return self.dt.astimezone (UTC).strftime("%Y%m%dT%H%M%SZ")
+ return self.dt.strftime("%Y%m%dT%H%M%S")
+
+ def from_ical(ical):
--- /dev/null
+--- src/icalendar/prop.py.old Mon Dec 14 13:43:50 2009
++++ src/icalendar/prop.py Tue Jan 19 15:09:58 2010
+@@ -57,7 +57,7 @@
+ TIME_PART = r'T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?'
+ DATETIME_PART = '(?:%s)?(?:%s)?' % (DATE_PART, TIME_PART)
+ WEEKS_PART = r'(\d+)W'
+-DURATION_REGEX = re.compile(r'([-+]?)P(?:%s|%s)$'
++DURATION_REGEX = re.compile(r'([-+]?)P(?:%s)?(?:%s)?$'
+ % (WEEKS_PART, DATETIME_PART))
+ WEEKDAY_RULE = re.compile('(?P<signal>[+-]?)(?P<relative>[\d]?)'
+ '(?P<weekday>[\w]{2})$')
+@@ -467,14 +467,14 @@
+ """
+ try:
+ match = DURATION_REGEX.match(ical)
++ if not any(match.groups()):
++ raise ValueError()
+ sign, weeks, days, hours, minutes, seconds = match.groups()
+- if weeks:
+- value = timedelta(weeks=int(weeks))
+- else:
+- value = timedelta(days=int(days or 0),
+- hours=int(hours or 0),
+- minutes=int(minutes or 0),
+- seconds=int(seconds or 0))
++ value = timedelta(weeks=int(weeks or 0),
++ days=int(days or 0),
++ hours=int(hours or 0),
++ minutes=int(minutes or 0),
++ seconds=int(seconds or 0))
+ if sign == '-':
+ value = -value
+ return value
--- /dev/null
+--- src/icalendar/prop.py.orig 2010-03-29 21:05:47.000000000 -0400
++++ src/icalendar/prop.py 2010-03-29 21:01:47.000000000 -0400
+@@ -585,7 +585,7 @@
+ wrong_type_used = 0
+ if wrong_type_used:
+ raise ValueError ('You must use datetime, date or timedelta')
+- if isinstance(dt, date):
++ if type(dt) is date:
+ self.params = Parameters(dict(value='DATE'))
+
+ self.dt = dt
+--- src/icalendar/cal.py.orig 2009-12-14 08:43:50.000000000 -0500
++++ src/icalendar/cal.py 2010-04-25 09:11:44.000000000 -0400
+@@ -520,7 +520,7 @@
+ >>> event.set('dtstart', datetime(2005,4,4,8,0,0))
+ >>> cal.add_component(event)
+ >>> cal.subcomponents[0].as_string()
+- 'BEGIN:VEVENT\\r\\nDTSTART;VALUE=DATE:20050404T080000\\r\\nSUMMARY:Python meeting about calendaring\\r\\nUID:42\\r\\nEND:VEVENT\\r\\n'
++ 'BEGIN:VEVENT\\r\\nDTSTART:20050404T080000\\r\\nSUMMARY:Python meeting about calendaring\\r\\nUID:42\\r\\nEND:VEVENT\\r\\n'
+
+ Write to disc
+ >>> import tempfile, os
--- /dev/null
+From http://codespeak.net/pipermail/icalendar-dev/2010-April/000152.html:
+
+Lines get folded in the middle of multi-octet sequences (checked out
+code from svn today). Consider this case:
+import icalendar
+ical = icalendar.Calendar()
+ical.add('summary', u'a' + u'ą'*100)
+ical.as_string().decode('utf-8')
+...
+UnicodeDecodeError: 'utf8' codec can't decode bytes in position 90-91:
+invalid data
+
+I have attached a diff of a simple one-line fix.
+
+As I see in the code you actually try not to split a multi-octet
+character but you don't recalculate the slice after finding the new
+end position. Could you confirm this?
+
+Submitted by Rimvydas Naktinis.
+===================================================================
+--- src/icalendar/parser.py (revision 73587)
++++ src/icalendar/parser.py (working copy)
+@@ -456,6 +456,7 @@
+ else:
+ end -= 1
+
++ slice = self[start:end]
+ new_lines.append(slice)
+ if end == l_line:
+ # Done
--- /dev/null
+--- test.py.orig 2010-04-25 09:19:36.000000000 -0400
++++ test.py 2010-04-25 09:26:23.000000000 -0400
+@@ -77,7 +77,6 @@
+ import traceback
+ import linecache
+ import pdb
+-from sets import Set
+
+ __metaclass__ = type
+
+@@ -261,7 +260,7 @@
+ """Returns a set of test case classes used in a test suite."""
+ if not isinstance(suite, unittest.TestSuite):
+ raise TypeError('not a TestSuite', suite)
+- results = Set()
++ results = set()
+ for test in suite._tests:
+ if isinstance(test, unittest.TestCase):
+ results.add(test.__class__)
+@@ -293,7 +292,7 @@
+ if test_suite is None:
+ continue
+ if cfg.warn_omitted:
+- all_classes = Set(get_all_test_cases(module))
++ all_classes = set(get_all_test_cases(module))
+ classes_in_suite = get_test_classes_from_testsuite(test_suite)
+ difference = all_classes - classes_in_suite
+ for test_class in difference:
+@@ -320,7 +319,7 @@
+ def get_test_hooks(test_files, cfg, tracer=None):
+ """Returns a list of test hooks from a given list of test modules."""
+ results = []
+- dirs = Set(map(os.path.dirname, test_files))
++ dirs = set(map(os.path.dirname, test_files))
+ for dir in list(dirs):
+ if os.path.basename(dir) == 'ftests':
+ dirs.add(os.path.join(os.path.dirname(dir), 'tests'))
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/icalendar-2.0.1.ebuild,v 1.4 2010/02/08 08:48:54 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/icalendar-2.0.1.ebuild,v 1.5 2010/04/25 17:58:12 nixphoeni Exp $
EAPI=2
inherit eutils distutils
DOCS="CHANGES.txt CREDITS.txt doc/* HISTORY.txt README.txt TODO.txt"
src_prepare() {
- epatch "${FILESDIR}/${P}-UIDGenerator-fix.patch"
+ epatch "${FILESDIR}/01_all_UIDGenerator-fix.patch"
}
src_test() {
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/icalendar-2.1-r1.ebuild,v 1.3 2010/02/08 08:48:54 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/icalendar-2.1-r1.ebuild,v 1.4 2010/04/25 17:58:12 nixphoeni Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
DOCS="CHANGES.txt CREDITS.txt doc/* HISTORY.txt README.txt TODO.txt"
src_prepare() {
- epatch "${FILESDIR}/${PN}-2.0.1-UIDGenerator-fix.patch"
- epatch "${FILESDIR}/${P}-vDatetime-tzinfo-fix.patch"
+ epatch "${FILESDIR}/01_all_UIDGenerator-fix.patch"
+ epatch "${FILESDIR}/02_all_vDatetime-tzinfo-fix.patch"
}
src_test() {
--- /dev/null
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/icalendar-2.1_p20100409.ebuild,v 1.1 2010/04/25 17:58:12 nixphoeni Exp $
+
+EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_DEPEND="2"
+
+inherit eutils distutils
+
+MY_P="${PN}-${PV%%_p*}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Package used for parsing and generating iCalendar files (RFC 2445)."
+HOMEPAGE="http://codespeak.net/icalendar/ http://pypi.python.org/pypi/icalendar"
+SRC_URI="http://pypi.python.org/packages/source/${PN:0:1}/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="dev-python/setuptools"
+RESTRICT_PYTHON_ABIS="3.*"
+
+DOCS="CHANGES.txt CREDITS.txt doc/* HISTORY.txt README.txt TODO.txt"
+EPATCH_SUFFIX="patch"
+
+src_prepare() {
+ epatch "${FILESDIR}"
+ distutils_src_prepare
+}
+
+src_test() {
+ testing() {
+ "$(PYTHON)" test.py
+ }
+ python_execute_function testing
+}