commit python-tz for openSUSE:Factory
Hello community, here is the log from the commit of package python-tz for openSUSE:Factory checked in at 2012-05-07 22:50:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tz (Old) and /work/SRC/openSUSE:Factory/.python-tz.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-tz", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/python-tz/python-tz.changes 2011-11-25 10:14:02.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-tz.new/python-tz.changes 2012-05-07 22:51:02.000000000 +0200 @@ -1,0 +2,15 @@ +Fri Apr 27 14:07:19 UTC 2012 - toddrme2178@gmail.com + +- Fix building python 3 package on openSUSE 11.4 x86_64 + +------------------------------------------------------------------- +Fri Apr 27 08:55:59 UTC 2012 - highwaystar.ru@gmail.com + +- update to 2012c + +------------------------------------------------------------------- +Thu Apr 26 11:34:14 UTC 2012 - toddrme2178@gmail.com + +- Add python 3 version + +------------------------------------------------------------------- New Changes file: --- /dev/null 2012-05-03 01:24:41.895590051 +0200 +++ /work/SRC/openSUSE:Factory/.python-tz.new/python3-tz.changes 2012-05-07 22:51:02.000000000 +0200 @@ -0,0 +1,16 @@ +------------------------------------------------------------------- +Fri Apr 27 14:07:19 UTC 2012 - toddrme2178@gmail.com + +- Fix building python 3 package on openSUSE 11.4 x86_64 + +------------------------------------------------------------------- +Fri Apr 27 08:56:19 UTC 2012 - highwaystar.ru@gmail.com + +- update to 2012c +- fixed building on openSUSE 11.4 + +------------------------------------------------------------------- +Thu Apr 26 11:34:14 UTC 2012 - toddrme2178@gmail.com + +- Add python 3 version + Old: ---- pytz-2011n.tar.bz2 New: ---- python3-tz.changes python3-tz.spec pytz-2012c.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tz.spec ++++++ --- /var/tmp/diff_new_pack.P87jAf/_old 2012-05-07 22:51:05.000000000 +0200 +++ /var/tmp/diff_new_pack.P87jAf/_new 2012-05-07 22:51:05.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-tz # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,14 +15,10 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: python-tz -Version: 2011n -Release: 1 -License: MIT -Group: Development/Libraries/Python +Version: 2012c +Release: 0 Url: http://pytz.sourceforge.net/ Source0: http://pypi.python.org/packages/source/p/pytz/pytz-%{version}.tar.bz2 %if 0%{?suse_version} > 1110 @@ -39,6 +35,8 @@ %endif %py_requires Summary: Olson timezone database for python +License: MIT +Group: Development/Libraries/Python %description pytz brings the Olson tz database into Python. This library allows ++++++ python3-tz.spec ++++++ # # spec file for package python3-tz # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: python3-tz Version: 2012c Release: 0 Summary: Olson timezone database for python License: MIT Group: Development/Libraries/Python Url: http://pytz.sourceforge.net/ Source0: http://pypi.python.org/packages/source/p/pytz/pytz-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python3 BuildRequires: python3-2to3 BuildRequires: python3-devel %if 0%{?suse_version} BuildRequires: fdupes %endif %if 0%{?suse_version} <= 1140 %{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?py3_ver: %global py3_ver %(python3 -c "import sys; version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)} %ifarch x86_64 BuildRequires: python3-32bit %endif %endif BuildArch: noarch Requires: python3 >= %{py3_ver} %description pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.3 or higher. It also solves the issue of ambiguous times at the end of daylight savings, which you can read more about in the Python Library Reference (datetime.tzinfo). %prep %setup -n pytz-%{version} %build python3 setup.py build %install python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} %if 0%{?suse_version} %fdupes %{buildroot} %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc CHANGES.txt LICENSE.txt README.txt %{python3_sitelib}/pytz/ %{python3_sitelib}/pytz-%{version}-py%{py3_ver}.egg-info %if 0%{?suse_version} <= 1140 %dir %{python3_sitelib} %endif %changelog ++++++ pytz-2011n.tar.bz2 -> pytz-2012c.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2011n/PKG-INFO new/pytz-2012c/PKG-INFO --- old/pytz-2011n/PKG-INFO 2011-11-04 11:53:47.000000000 +0100 +++ new/pytz-2012c/PKG-INFO 2012-04-16 06:46:02.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pytz -Version: 2011n +Version: 2012c Summary: World timezone definitions, modern and historical Home-page: http://pytz.sourceforge.net Author: Stuart Bishop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2011n/pytz/__init__.py new/pytz-2012c/pytz/__init__.py --- old/pytz-2011n/pytz/__init__.py 2011-11-04 11:53:25.000000000 +0100 +++ new/pytz-2012c/pytz/__init__.py 2012-04-16 06:42:39.000000000 +0200 @@ -9,7 +9,7 @@ ''' # The Olson database is updated several times a year. -OLSON_VERSION = '2011n' +OLSON_VERSION = '2012c' VERSION = OLSON_VERSION # Version format for a patch release - only one so far. #VERSION = OLSON_VERSION + '.2' @@ -199,12 +199,8 @@ class UTC(datetime.tzinfo): """UTC - Identical to the reference UTC implementation given in Python docs except - that it unpickles using the single module global instance defined beneath - this class declaration. - - Also contains extra attributes and methods to match other pytz tzinfo - instances. + Optimized UTC implementation. It unpickles using the single module global + instance defined beneath this class declaration. """ zone = "UTC" @@ -237,9 +233,11 @@ def normalize(self, dt, is_dst=False): '''Correct the timezone information on the given datetime''' + if dt.tzinfo is self: + return dt if dt.tzinfo is None: raise ValueError('Naive time - no tzinfo set') - return dt.replace(tzinfo=self) + return dt.astimezone(self) def __repr__(self): return "<UTC>" @@ -621,6 +619,7 @@ 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', + 'America/Creston', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', @@ -1192,6 +1191,7 @@ 'America/Chicago', 'America/Chihuahua', 'America/Costa_Rica', + 'America/Creston', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2011n/pytz/tests/test_tzinfo.py new/pytz-2012c/pytz/tests/test_tzinfo.py --- old/pytz-2011n/pytz/tests/test_tzinfo.py 2011-11-04 11:53:25.000000000 +0100 +++ new/pytz-2012c/pytz/tests/test_tzinfo.py 2012-04-16 06:42:39.000000000 +0200 @@ -21,7 +21,7 @@ # I test for expected version to ensure the correct version of pytz is # actually being tested. -EXPECTED_VERSION='2011n' +EXPECTED_VERSION='2012c' fmt = '%Y-%m-%d %H:%M:%S %Z%z' @@ -725,7 +725,7 @@ These tests are run for each type of tzinfo. ''' tz = None # override - tzclass = None # override + tz_class = None # override def test_expectedclass(self): self.assertTrue(isinstance(self.tz, self.tz_class)) @@ -750,12 +750,44 @@ dt3 = new_tz.localize(dt1) self.assertRaises(ValueError, self.tz.fromutc, dt3) + def test_normalize(self): + other_tz = pytz.timezone('Europe/Paris') + self.assertTrue(self.tz is not other_tz) -class UTCTestCase(unittest.TestCase, BaseTzInfoTestCase): + dt = datetime(2012, 3, 26, 12, 0) + other_dt = other_tz.localize(dt) + + local_dt = self.tz.normalize(other_dt) + + self.assertTrue(local_dt.tzinfo is not other_dt.tzinfo) + self.assertNotEqual( + local_dt.replace(tzinfo=None), other_dt.replace(tzinfo=None)) + + def test_astimezone(self): + other_tz = pytz.timezone('Europe/Paris') + self.assertTrue(self.tz is not other_tz) + + dt = datetime(2012, 3, 26, 12, 0) + other_dt = other_tz.localize(dt) + + local_dt = other_dt.astimezone(self.tz) + + self.assertTrue(local_dt.tzinfo is not other_dt.tzinfo) + self.assertNotEqual( + local_dt.replace(tzinfo=None), other_dt.replace(tzinfo=None)) + + +class OptimizedUTCTestCase(unittest.TestCase, BaseTzInfoTestCase): tz = pytz.utc tz_class = tz.__class__ +class LegacyUTCTestCase(unittest.TestCase, BaseTzInfoTestCase): + # Deprecated timezone, but useful for comparison tests. + tz = pytz.timezone('Etc/UTC') + tz_class = StaticTzInfo + + class StaticTzInfoTestCase(unittest.TestCase, BaseTzInfoTestCase): tz = pytz.timezone('GMT') tz_class = StaticTzInfo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2011n/pytz/tzinfo.py new/pytz-2012c/pytz/tzinfo.py --- old/pytz-2011n/pytz/tzinfo.py 2011-11-04 11:53:25.000000000 +0100 +++ new/pytz-2012c/pytz/tzinfo.py 2012-04-16 06:42:39.000000000 +0200 @@ -178,7 +178,8 @@ def fromutc(self, dt): '''See datetime.tzinfo.fromutc''' - if dt.tzinfo is not None and dt.tzinfo._tzinfos is not self._tzinfos: + if (dt.tzinfo is not None + and getattr(dt.tzinfo, '_tzinfos', None) is not self._tzinfos): raise ValueError('fromutc: dt.tzinfo is not self') dt = dt.replace(tzinfo=None) idx = max(0, bisect_right(self._utc_transition_times, dt) - 1) Files old/pytz-2011n/pytz/zoneinfo/Africa/Casablanca and new/pytz-2012c/pytz/zoneinfo/Africa/Casablanca differ Files old/pytz-2011n/pytz/zoneinfo/America/Atikokan and new/pytz-2012c/pytz/zoneinfo/America/Atikokan differ Files old/pytz-2011n/pytz/zoneinfo/America/Blanc-Sablon and new/pytz-2012c/pytz/zoneinfo/America/Blanc-Sablon differ Files old/pytz-2011n/pytz/zoneinfo/America/Coral_Harbour and new/pytz-2012c/pytz/zoneinfo/America/Coral_Harbour differ Files old/pytz-2011n/pytz/zoneinfo/America/Creston and new/pytz-2012c/pytz/zoneinfo/America/Creston differ Files old/pytz-2011n/pytz/zoneinfo/America/Dawson_Creek and new/pytz-2012c/pytz/zoneinfo/America/Dawson_Creek differ Files old/pytz-2011n/pytz/zoneinfo/America/Edmonton and new/pytz-2012c/pytz/zoneinfo/America/Edmonton differ Files old/pytz-2011n/pytz/zoneinfo/America/Glace_Bay and new/pytz-2012c/pytz/zoneinfo/America/Glace_Bay differ Files old/pytz-2011n/pytz/zoneinfo/America/Goose_Bay and new/pytz-2012c/pytz/zoneinfo/America/Goose_Bay differ Files old/pytz-2011n/pytz/zoneinfo/America/Halifax and new/pytz-2012c/pytz/zoneinfo/America/Halifax differ Files old/pytz-2011n/pytz/zoneinfo/America/Havana and new/pytz-2012c/pytz/zoneinfo/America/Havana differ Files old/pytz-2011n/pytz/zoneinfo/America/Moncton and new/pytz-2012c/pytz/zoneinfo/America/Moncton differ Files old/pytz-2011n/pytz/zoneinfo/America/Montreal and new/pytz-2012c/pytz/zoneinfo/America/Montreal differ Files old/pytz-2011n/pytz/zoneinfo/America/Nipigon and new/pytz-2012c/pytz/zoneinfo/America/Nipigon differ Files old/pytz-2011n/pytz/zoneinfo/America/Port-au-Prince and new/pytz-2012c/pytz/zoneinfo/America/Port-au-Prince differ Files old/pytz-2011n/pytz/zoneinfo/America/Rainy_River and new/pytz-2012c/pytz/zoneinfo/America/Rainy_River differ Files old/pytz-2011n/pytz/zoneinfo/America/Regina and new/pytz-2012c/pytz/zoneinfo/America/Regina differ Files old/pytz-2011n/pytz/zoneinfo/America/Santiago and new/pytz-2012c/pytz/zoneinfo/America/Santiago differ Files old/pytz-2011n/pytz/zoneinfo/America/St_Johns and new/pytz-2012c/pytz/zoneinfo/America/St_Johns differ Files old/pytz-2011n/pytz/zoneinfo/America/Swift_Current and new/pytz-2012c/pytz/zoneinfo/America/Swift_Current differ Files old/pytz-2011n/pytz/zoneinfo/America/Toronto and new/pytz-2012c/pytz/zoneinfo/America/Toronto differ Files old/pytz-2011n/pytz/zoneinfo/America/Vancouver and new/pytz-2012c/pytz/zoneinfo/America/Vancouver differ Files old/pytz-2011n/pytz/zoneinfo/America/Winnipeg and new/pytz-2012c/pytz/zoneinfo/America/Winnipeg differ Files old/pytz-2011n/pytz/zoneinfo/Antarctica/Casey and new/pytz-2012c/pytz/zoneinfo/Antarctica/Casey differ Files old/pytz-2011n/pytz/zoneinfo/Antarctica/Davis and new/pytz-2012c/pytz/zoneinfo/Antarctica/Davis differ Files old/pytz-2011n/pytz/zoneinfo/Antarctica/Palmer and new/pytz-2012c/pytz/zoneinfo/Antarctica/Palmer differ Files old/pytz-2011n/pytz/zoneinfo/Asia/Damascus and new/pytz-2012c/pytz/zoneinfo/Asia/Damascus differ Files old/pytz-2011n/pytz/zoneinfo/Asia/Gaza and new/pytz-2012c/pytz/zoneinfo/Asia/Gaza differ Files old/pytz-2011n/pytz/zoneinfo/Asia/Hebron and new/pytz-2012c/pytz/zoneinfo/Asia/Hebron differ Files old/pytz-2011n/pytz/zoneinfo/Asia/Yerevan and new/pytz-2012c/pytz/zoneinfo/Asia/Yerevan differ Files old/pytz-2011n/pytz/zoneinfo/Atlantic/Stanley and new/pytz-2012c/pytz/zoneinfo/Atlantic/Stanley differ Files old/pytz-2011n/pytz/zoneinfo/Canada/Atlantic and new/pytz-2012c/pytz/zoneinfo/Canada/Atlantic differ Files old/pytz-2011n/pytz/zoneinfo/Canada/Central and new/pytz-2012c/pytz/zoneinfo/Canada/Central differ Files old/pytz-2011n/pytz/zoneinfo/Canada/East-Saskatchewan and new/pytz-2012c/pytz/zoneinfo/Canada/East-Saskatchewan differ Files old/pytz-2011n/pytz/zoneinfo/Canada/Eastern and new/pytz-2012c/pytz/zoneinfo/Canada/Eastern differ Files old/pytz-2011n/pytz/zoneinfo/Canada/Mountain and new/pytz-2012c/pytz/zoneinfo/Canada/Mountain differ Files old/pytz-2011n/pytz/zoneinfo/Canada/Newfoundland and new/pytz-2012c/pytz/zoneinfo/Canada/Newfoundland differ Files old/pytz-2011n/pytz/zoneinfo/Canada/Pacific and new/pytz-2012c/pytz/zoneinfo/Canada/Pacific differ Files old/pytz-2011n/pytz/zoneinfo/Canada/Saskatchewan and new/pytz-2012c/pytz/zoneinfo/Canada/Saskatchewan differ Files old/pytz-2011n/pytz/zoneinfo/Chile/Continental and new/pytz-2012c/pytz/zoneinfo/Chile/Continental differ Files old/pytz-2011n/pytz/zoneinfo/Chile/EasterIsland and new/pytz-2012c/pytz/zoneinfo/Chile/EasterIsland differ Files old/pytz-2011n/pytz/zoneinfo/Cuba and new/pytz-2012c/pytz/zoneinfo/Cuba differ Files old/pytz-2011n/pytz/zoneinfo/Pacific/Easter and new/pytz-2012c/pytz/zoneinfo/Pacific/Easter differ Files old/pytz-2011n/pytz/zoneinfo/Pacific/Fakaofo and new/pytz-2012c/pytz/zoneinfo/Pacific/Fakaofo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2011n/pytz/zoneinfo/zone.tab new/pytz-2012c/pytz/zoneinfo/zone.tab --- old/pytz-2011n/pytz/zoneinfo/zone.tab 2011-11-04 11:53:24.000000000 +0100 +++ new/pytz-2012c/pytz/zoneinfo/zone.tab 2012-04-16 06:42:39.000000000 +0200 @@ -1,5 +1,5 @@ # <pre> -# @(#)zone.tab 8.52 +# @(#)zone.tab 8.55 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. # @@ -131,6 +131,7 @@ CA +690650-1050310 America/Cambridge_Bay Mountain Time - west Nunavut CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories CA +682059-1334300 America/Inuvik Mountain Time - west Northwest Territories +CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia CA +4916-12307 America/Vancouver Pacific Time - west British Columbia CA +6043-13503 America/Whitehorse Pacific Time - south Yukon @@ -333,7 +334,7 @@ RU +5443+02030 Europe/Kaliningrad Moscow-01 - Kaliningrad RU +5545+03735 Europe/Moscow Moscow+00 - west Russia RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea -RU +5312+05009 Europe/Samara Moscow - Samara, Udmurtia +RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2011n/pytz.egg-info/PKG-INFO new/pytz-2012c/pytz.egg-info/PKG-INFO --- old/pytz-2011n/pytz.egg-info/PKG-INFO 2011-11-04 11:53:39.000000000 +0100 +++ new/pytz-2012c/pytz.egg-info/PKG-INFO 2012-04-16 06:45:58.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pytz -Version: 2011n +Version: 2012c Summary: World timezone definitions, modern and historical Home-page: http://pytz.sourceforge.net Author: Stuart Bishop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytz-2011n/pytz.egg-info/SOURCES.txt new/pytz-2012c/pytz.egg-info/SOURCES.txt --- old/pytz-2011n/pytz.egg-info/SOURCES.txt 2011-11-04 11:53:39.000000000 +0100 +++ new/pytz-2012c/pytz.egg-info/SOURCES.txt 2012-04-16 06:45:58.000000000 +0200 @@ -149,6 +149,7 @@ pytz/zoneinfo/America/Coral_Harbour pytz/zoneinfo/America/Cordoba pytz/zoneinfo/America/Costa_Rica +pytz/zoneinfo/America/Creston pytz/zoneinfo/America/Cuiaba pytz/zoneinfo/America/Curacao pytz/zoneinfo/America/Danmarkshavn -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de