Skip to content

Commit 2bb91ce

Browse files
committed
Merge pull request matplotlib#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.

lib/pytz/zoneinfo/Africa/Juba

669 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Africa/Kampala

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Africa/Nairobi

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/America/Goose_Bay

-10 Bytes
Binary file not shown.

lib/pytz/zoneinfo/America/Havana

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/America/Kralendijk

194 Bytes
Binary file not shown.
194 Bytes
Binary file not shown.

lib/pytz/zoneinfo/America/Metlakatla

-1.51 KB
Binary file not shown.

lib/pytz/zoneinfo/America/Resolute

-6.48 KB
Binary file not shown.

lib/pytz/zoneinfo/America/Santiago

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/America/St_Johns

-10 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Anadyr

-748 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Gaza

-751 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Hebron

1.53 KB
Binary file not shown.

lib/pytz/zoneinfo/Asia/Irkutsk

-764 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Istanbul

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Kamchatka

-748 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Krasnoyarsk

-764 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Magadan

-764 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Novokuznetsk

-748 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Novosibirsk

-748 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Omsk

-764 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Sakhalin

-748 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Vladivostok

-764 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Yakutsk

-763 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Asia/Yekaterinburg

-748 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Atlantic/Stanley

-28 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Canada/Newfoundland

-10 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Chile/Continental

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Chile/EasterIsland

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Cuba

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Egypt

-7.29 KB
Binary file not shown.

lib/pytz/zoneinfo/Europe/Istanbul

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Kaliningrad

-739 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Kiev

-741 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Minsk

-739 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Moscow

-762 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Samara

-748 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Simferopol

-741 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Uzhgorod

-741 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Volgograd

-748 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Europe/Zaporozhye

-741 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Pacific/Apia

75 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Pacific/Easter

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/Turkey

0 Bytes
Binary file not shown.

lib/pytz/zoneinfo/W-SU

-762 Bytes
Binary file not shown.

lib/pytz/zoneinfo/iso3166.tab

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# <pre>
2-
# @(#)iso3166.tab 8.6
2+
# @(#)iso3166.tab 8.11
33
# This file is in the public domain, so clarified as of
44
# 2009-05-17 by Arthur David Olson.
55
# ISO 3166 alpha-2 country codes
@@ -21,6 +21,9 @@
2121
#
2222
# Lines beginning with `#' are comments.
2323
#
24+
# From Arthur David Olson (2011-08-17):
25+
# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
26+
#
2427
#country-
2528
#code country name
2629
AD Andorra
@@ -30,7 +33,6 @@ AG Antigua & Barbuda
3033
AI Anguilla
3134
AL Albania
3235
AM Armenia
33-
AN Netherlands Antilles
3436
AO Angola
3537
AQ Antarctica
3638
AR Argentina
@@ -53,6 +55,7 @@ BL St Barthelemy
5355
BM Bermuda
5456
BN Brunei
5557
BO Bolivia
58+
BQ Bonaire Sint Eustatius & Saba
5659
BR Brazil
5760
BS Bahamas
5861
BT Bhutan
@@ -75,6 +78,7 @@ CO Colombia
7578
CR Costa Rica
7679
CU Cuba
7780
CV Cape Verde
81+
CW Curacao
7882
CX Christmas Island
7983
CY Cyprus
8084
CZ Czech Republic
@@ -229,8 +233,10 @@ SM San Marino
229233
SN Senegal
230234
SO Somalia
231235
SR Suriname
236+
SS South Sudan
232237
ST Sao Tome & Principe
233238
SV El Salvador
239+
SX Sint Maarten
234240
SY Syria
235241
SZ Swaziland
236242
TC Turks & Caicos Is

lib/pytz/zoneinfo/zone.tab

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# <pre>
2-
# @(#)zone.tab 8.41
2+
# @(#)zone.tab 8.49
33
# This file is in the public domain, so clarified as of
44
# 2009-05-17 by Arthur David Olson.
55
#
@@ -32,7 +32,6 @@ AG +1703-06148 America/Antigua
3232
AI +1812-06304 America/Anguilla
3333
AL +4120+01950 Europe/Tirane
3434
AM +4011+04430 Asia/Yerevan
35-
AN +1211-06900 America/Curacao
3635
AO -0848+01314 Africa/Luanda
3736
AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island
3837
AQ -9000+00000 Antarctica/South_Pole Amundsen-Scott Station, South Pole
@@ -87,6 +86,7 @@ BL +1753-06251 America/St_Barthelemy
8786
BM +3217-06446 Atlantic/Bermuda
8887
BN +0456+11455 Asia/Brunei
8988
BO -1630-06809 America/La_Paz
89+
BQ +120903-0681636 America/Kralendijk
9090
BR -0351-03225 America/Noronha Atlantic islands
9191
BR -0127-04829 America/Belem Amapa, E Para
9292
BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB)
@@ -120,7 +120,7 @@ CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did
120120
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
121121
CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations
122122
CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut
123-
CA +744144-0944945 America/Resolute Eastern Standard Time - Resolute, Nunavut
123+
CA +744144-0944945 America/Resolute Central Standard Time - Resolute, Nunavut
124124
CA +484531-0913718 America/Atikokan Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
125125
CA +624900-0920459 America/Rankin_Inlet Central Time - central Nunavut
126126
CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario
@@ -155,6 +155,7 @@ CO +0436-07405 America/Bogota
155155
CR +0956-08405 America/Costa_Rica
156156
CU +2308-08222 America/Havana
157157
CV +1455-02331 Atlantic/Cape_Verde
158+
CW +1211-06900 America/Curacao
158159
CX -1025+10543 Indian/Christmas
159160
CY +3510+03322 Asia/Nicosia
160161
CZ +5005+01426 Europe/Prague
@@ -318,7 +319,8 @@ PL +5215+02100 Europe/Warsaw
318319
PM +4703-05620 America/Miquelon
319320
PN -2504-13005 Pacific/Pitcairn
320321
PR +182806-0660622 America/Puerto_Rico
321-
PS +3130+03428 Asia/Gaza
322+
PS +3130+03428 Asia/Gaza Gaza Strip
323+
PS +313200+0350542 Asia/Hebron West Bank
322324
PT +3843-00908 Europe/Lisbon mainland
323325
PT +3238-01654 Atlantic/Madeira Madeira Islands
324326
PT +3744-02540 Atlantic/Azores Azores
@@ -360,8 +362,10 @@ SM +4355+01228 Europe/San_Marino
360362
SN +1440-01726 Africa/Dakar
361363
SO +0204+04522 Africa/Mogadishu
362364
SR +0550-05510 America/Paramaribo
365+
SS +0451+03136 Africa/Juba
363366
ST +0020+00644 Africa/Sao_Tome
364367
SV +1342-08912 America/El_Salvador
368+
SX +180305-0630250 America/Lower_Princes
365369
SY +3330+03618 Asia/Damascus
366370
SZ -2618+03106 Africa/Mbabane
367371
TC +2128-07108 America/Grand_Turk

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import sys
2929
major, minor1, minor2, s, tmp = sys.version_info
3030

31-
if major==2 and minor1<4 or major<2:
32-
raise SystemExit("""matplotlib requires Python 2.4 or later.""")
31+
if major==2 and minor1<6 or major<2:
32+
raise SystemExit("""matplotlib requires Python 2.6 or later.""")
3333

3434
import glob
3535
from distutils.core import setup

0 commit comments

Comments
 (0)