Skip to content

Commit 2bb91ce

Browse files
committed
Merge pull request #518 from jdh2358/upgrades-master
Upgrades master
2 parents b2ceced + aad1d26 commit 2bb91ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+69
-19
lines changed

INSTALL

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Next, we need to get matplotlib installed. We provide prebuilt
5454
binaries for OS X and Windows on the matplotlib `download
5555
<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on
5656
the latest release of the "matplotlib" package, choose your python
57-
version (e.g., 2.5, 2.6 or 2.7) and your platform (macosx or win32).
57+
version (e.g., 2.6 or 2.7) and your platform (macosx or win32).
5858
If you have any problems, please check the :ref:`installing-faq`,
5959
search using Google, and/or post a question to the `mailing list
6060
<http://sourceforge.net/project/showfiles.php?group_id=80706>`_.
@@ -179,8 +179,8 @@ libraries themselves.
179179
This does not build matplotlib, but it does get the install the
180180
build dependencies, which will make building from source easier.
181181

182-
:term:`python` 2.4 (or later but not python3)
183-
matplotlib requires python 2.4 or later (`download <http://www.python.org/download/>`__)
182+
:term:`python` 2.6 (or later but not python3)
183+
matplotlib requires python 2.6 or later (`download <http://www.python.org/download/>`__)
184184

185185
:term:`numpy` 1.1 (or later)
186186
array support for python (`download

doc/devel/coding_guide.rst

Lines changed: 1 addition & 2 deletions

doc/users/whats_new.rst

Lines changed: 1 addition & 1 deletion

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"""
100100
from __future__ import generators
101101

102-
__version__ = '1.1.x'
102+
__version__ = '1.2.x'
103103

104104
import os, re, shutil, subprocess, sys, warnings
105105
import distutils.sysconfig

lib/pytz/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'''
1010

1111
# The Olson database is updated several times a year.
12-
OLSON_VERSION = '2011c'
12+
OLSON_VERSION = '2011k'
1313
VERSION = OLSON_VERSION
1414
# Version format for a patch release - only one so far.
1515
#VERSION = OLSON_VERSION + '.2'
@@ -544,6 +544,7 @@ def _test():
544544
'Africa/Gaborone',
545545
'Africa/Harare',
546546
'Africa/Johannesburg',
547+
'Africa/Juba',
547548
'Africa/Kampala',
548549
'Africa/Khartoum',
549550
'Africa/Kigali',
@@ -658,10 +659,12 @@ def _test():
658659
'America/Kentucky/Louisville',
659660
'America/Kentucky/Monticello',
660661
'America/Knox_IN',
662+
'America/Kralendijk',
661663
'America/La_Paz',
662664
'America/Lima',
663665
'America/Los_Angeles',
664666
'America/Louisville',
667+
'America/Lower_Princes',
665668
'America/Maceio',
666669
'America/Managua',
667670
'America/Manaus',
@@ -772,6 +775,7 @@ def _test():
772775
'Asia/Dushanbe',
773776
'Asia/Gaza',
774777
'Asia/Harbin',
778+
'Asia/Hebron',
775779
'Asia/Ho_Chi_Minh',
776780
'Asia/Hong_Kong',
777781
'Asia/Hovd',
@@ -1118,6 +1122,7 @@ def _test():
11181122
'Africa/Gaborone',
11191123
'Africa/Harare',
11201124
'Africa/Johannesburg',
1125+
'Africa/Juba',
11211126
'Africa/Kampala',
11221127
'Africa/Khartoum',
11231128
'Africa/Kigali',
@@ -1220,9 +1225,11 @@ def _test():
12201225
'America/Juneau',
12211226
'America/Kentucky/Louisville',
12221227
'America/Kentucky/Monticello',
1228+
'America/Kralendijk',
12231229
'America/La_Paz',
12241230
'America/Lima',
12251231
'America/Los_Angeles',
1232+
'America/Lower_Princes',
12261233
'America/Maceio',
12271234
'America/Managua',
12281235
'America/Manaus',
@@ -1325,6 +1332,7 @@ def _test():
13251332
'Asia/Dushanbe',
13261333
'Asia/Gaza',
13271334
'Asia/Harbin',
1335+
'Asia/Hebron',
13281336
'Asia/Ho_Chi_Minh',
13291337
'Asia/Hong_Kong',
13301338
'Asia/Hovd',

lib/pytz/tests/test_tzinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
# I test for expected version to ensure the correct version of pytz is
2323
# actually being tested.
24-
EXPECTED_VERSION='2011c'
24+
EXPECTED_VERSION='2011k'
2525

2626
fmt = '%Y-%m-%d %H:%M:%S %Z%z'
2727

lib/pytz/tzinfo.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,33 @@ def localize(self, dt, is_dst=False):
107107
return dt.replace(tzinfo=self)
108108

109109
def normalize(self, dt, is_dst=False):
110-
'''Correct the timezone information on the given datetime'''
110+
'''Correct the timezone information on the given datetime.
111+
112+
This is normally a no-op, as StaticTzInfo timezones never have
113+
ambiguous cases to correct:
114+
115+
>>> from pytz import timezone
116+
>>> gmt = timezone('GMT')
117+
>>> isinstance(gmt, StaticTzInfo)
118+
True
119+
>>> dt = datetime(2011, 5, 8, 1, 2, 3, tzinfo=gmt)
120+
>>> gmt.normalize(dt) is dt
121+
True
122+
123+
The supported method of converting between timezones is to use
124+
datetime.astimezone(). Currently normalize() also works:
125+
126+
>>> la = timezone('America/Los_Angeles')
127+
>>> dt = la.localize(datetime(2011, 5, 7, 1, 2, 3))
128+
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
129+
>>> gmt.normalize(dt).strftime(fmt)
130+
'2011-05-07 08:02:03 GMT (+0000)'
131+
'''
132+
if dt.tzinfo is self:
133+
return dt
111134
if dt.tzinfo is None:
112135
raise ValueError('Naive time - no tzinfo set')
113-
return dt.replace(tzinfo=self)
136+
return dt.astimezone(self)
114137

115138
def __repr__(self):
116139
return '<StaticTzInfo %r>' % (self.zone,)
@@ -192,6 +215,16 @@ def normalize(self, dt):
192215
>>> before = eastern.normalize(before)
193216
>>> before.strftime(fmt)
194217
'2002-10-27 01:50:00 EDT (-0400)'
218+
219+
The supported method of converting between timezones is to use
220+
datetime.astimezone(). Currently, normalize() also works:
221+
222+
>>> th = timezone('Asia/Bangkok')
223+
>>> am = timezone('Europe/Amsterdam')
224+
>>> dt = th.localize(datetime(2011, 5, 7, 1, 2, 3))
225+
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
226+
>>> am.normalize(dt).strftime(fmt)
227+
'2011-05-06 20:02:03 CEST (+0200)'
195228
'''
196229
if dt.tzinfo is None:
197230
raise ValueError('Naive time - no tzinfo set')

lib/pytz/zoneinfo/Africa/Cairo

-7.29 KB
Binary file not shown.

lib/pytz/zoneinfo/Africa/Casablanca

28 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)