8000 Upgrades master by jdh2358 · Pull Request #518 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Upgrades master #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions EDBE INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Next, we need to get matplotlib installed. We provide prebuilt
binaries for OS X and Windows on the matplotlib `download
<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on
the latest release of the "matplotlib" package, choose your python
version (e.g., 2.5, 2.6 or 2.7) and your platform (macosx or win32).
version (e.g., 2.6 or 2.7) and your platform (macosx or win32).
If you have any problems, please check the :ref:`installing-faq`,
search using Google, and/or post a question to the `mailing list
<http://sourceforge.net/project/showfiles.php?group_id=80706>`_.
Expand Down Expand Up @@ -179,8 +179,8 @@ libraries themselves.
This does not build matplotlib, but it does get the install the
build dependencies, which will make building from source easier.

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

:term:`numpy` 1.1 (or later)
array support for python (`download
Expand Down
3 changes: 1 addition & 2 deletions doc/devel/coding_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ in mind.
and consider posting to `matplotlib-devel
<http://lists.sourceforge.net/mailman/listinfo/matplotlib-devel>`_

* Are your changes python2.4 compatible? We still support 2.4, so
avoid features new to 2.5
* Are your changes python2.6 compatible? We support python2.6 and later

* Can you pass :file:`examples/tests/backend_driver.py`? This is our
poor man's unit test.
Expand Down
2 changes: 1 addition & 1 deletion doc/users/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This page just covers the highlights -- for the full story, see the

.. note::
Matplotlib version 1.1 is the last major release compatible with Python
versions 2.4 to 2.7. The next major release will support
versions 2.4 to 2.7. matplotlib 1.2 and later require
versions 2.6, 2.7, and 3.1 and higher.

.. _whats-new-1-1:
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"""
from __future__ import generators

__version__ = '1.1.x'
__version__ = '1.2.x'

import os, re, shutil, subprocess, sys, warnings
import distutils.sysconfig
Expand Down
10 changes: 9 additions & 1 deletion lib/pytz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'''

# The Olson database is updated several times a year.
OLSON_VERSION = '2011c'
OLSON_VERSION = '2011k'
VERSION = OLSON_VERSION
# Version format for a patch release - only one so far.
#VERSION = OLSON_VERSION + '.2'
Expand Down Expand Up @@ -544,6 +544,7 @@ def _test():
'Africa/Gaborone',
'Africa/Harare',
'Africa/Johannesburg',
'Africa/Juba',
'Africa/Kampala',
'Africa/Khartoum',
'Africa/Kigali',
Expand Down Expand Up @@ -658,10 +659,12 @@ def _test():
'America/Kentucky/Louisville',
'America/Kentucky/Monticello',
'America/Knox_IN',
'America/Kralendijk',
'America/La_Paz',
'America/Lima',
'America/Los_Angeles',
'America/Louisville',
'America/Lower_Princes',
'America/Maceio',
'America/Managua',
'America/Manaus',
Expand Down Expand Up @@ -772,6 +775,7 @@ def _test():
'Asia/Dushanbe',
'Asia/Gaza',
'Asia/Harbin',
'Asia/Hebron',
'Asia/Ho_Chi_Minh',
'Asia/Hong_Kong',
'Asia/Hovd',
Expand Down Expand Up @@ -1118,6 +1122,7 @@ def _test():
'Africa/Gaborone',
'Africa/Harare',
'Africa/Johannesburg',
'Africa/Juba',
'Africa/Kampala',
'Africa/Khartoum',
'Africa/Kigali',
Expand Down Expand Up @@ -1220,9 +1225,11 @@ def _test():
'America/Juneau',
'America/Kentucky/Louisville',
'America/Kentucky/Monticello',
'America/Kralendijk',
'America/La_Paz',
'America/Lima',
'America/Los_Angeles',
'America/Lower_Princes',
'America/Maceio',
'America/Managua',
'America/Manaus',
Expand Down Expand Up @@ -1325,6 +1332,7 @@ def _test():
'Asia/Dushanbe',
'Asia/Gaza',
'Asia/Harbin',
'Asia/Hebron',
'Asia/Ho_Chi_Minh',
'Asia/Hong_Kong',
'Asia/Hovd',
Expand Down
2 changes: 1 addition & 1 deletion lib/pytz/tests/test_tzinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# I test for expected version to ensure the correct version of pytz is
# actually being tested.
EXPECTED_VERSION='2011c'
EXPECTED_VERSION='2011k'

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

Expand Down
37 changes: 35 additions & 2 deletions lib/pytz/tzinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,33 @@ def localize(self, dt, is_dst=False):
return dt.replace(tzinfo=self)

def normalize(self, dt, is_dst=False):
'''Correct the timezone information on the given datetime'''
'''Correct the timezone information on the given datetime.

This is normally a no-op, as StaticTzInfo timezones never have
ambiguous cases to correct:

>>> from pytz import timezone
>>> gmt = timezone('GMT')
>>> isinstance(gmt, StaticTzInfo)
True
>>> dt = datetime(2011, 5, 8, 1, 2, 3, tzinfo=gmt)
>>> gmt.normalize(dt) is dt
True

The supported method of converting between timezones is to use
datetime.astimezone(). Currently normalize() also works:

>>> la = timezone('America/Los_Angeles')
>>> dt = la.localize(datetime(2011, 5, 7, 1, 2, 3))
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
>>> gmt.normalize(dt).strftime(fmt)
'2011-05-07 08:02:03 GMT (+0000)'
'''
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 '<StaticTzInfo %r>' % (self.zone,)
Expand Down Expand Up @@ -192,6 +215,16 @@ def normalize(self, dt):
>>> before = eastern.normalize(before)
>>> before.strftime(fmt)
'2002-10-27 01:50:00 EDT (-0400)'

The supported method of converting between timezones is to use
datetime.astimezone(). Currently, normalize() also works:

>>> th = timezone('Asia/Bangkok')
>>> am = timezone('Europe/Amsterdam')
>>> dt = th.localize(datetime(2011, 5, 7, 1, 2, 3))
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
>>> am.normalize(dt).strftime(fmt)
'2011-05-06 20:02:03 CEST (+0200)'
'''
if dt.tzinfo is None:
raise ValueError('Naive time - no tzinfo set')
Expand Down
Binary file modified lib/pytz/zoneinfo/Africa/Cairo
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Africa/Casablanca
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Africa/Dar_es_Salaam
Binary file not shown.
Binary file added lib/pytz/zoneinfo/Africa/Juba
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Africa/Kampala
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Africa/Nairobi
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/America/Goose_Bay
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/America/Havana
Binary file not shown.
Binary file added lib/pytz/zoneinfo/America/Kralendijk
Binary file not shown.
Binary file added lib/pytz/zoneinfo/America/Lower_Princes
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/America/Metlakatla
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/America/Resolute
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/America/Santiago
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/America/St_Johns
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Anadyr
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Gaza
Binary file not shown.
Binary file added lib/pytz/zoneinfo/Asia/Hebron
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Irkutsk
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Istanbul
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Kamchatka
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Krasnoyarsk
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Magadan
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Novokuznetsk
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Novosibirsk
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Omsk
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Sakhalin
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Vladivostok
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Yakutsk
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Asia/Yekaterinburg
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Atlantic/Stanley
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Canada/Newfoundland
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Chile/Continental
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Chile/EasterIsland
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Cuba
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Egypt
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Istanbul
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Kaliningrad
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Kiev
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Minsk
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Moscow
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Samara
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Simferopol
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Uzhgorod
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Volgograd
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Europe/Zaporozhye
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Pacific/Apia
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Pacific/Easter
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/Turkey
Binary file not shown.
Binary file modified lib/pytz/zoneinfo/W-SU
Binary file not shown.
10 changes: 8 additions & 2 deletions lib/pytz/zoneinfo/iso3166.tab
57AE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# <pre>
# @(#)iso3166.tab 8.6
# @(#)iso3166.tab 8.11
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# ISO 3166 alpha-2 country codes
Expand All @@ -21,6 +21,9 @@
#
# Lines beginning with `#' are comments.
#
# From Arthur David Olson (2011-08-17):
# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
#
#country-
#code country name
AD Andorra
Expand All @@ -30,7 +33,6 @@ AG Antigua & Barbuda
AI Anguilla
AL Albania
AM Armenia
AN Netherlands Antilles
AO Angola
AQ Antarctica
AR Argentina
Expand All @@ -53,6 +55,7 @@ BL St Barthelemy
BM Bermuda
BN Brunei
BO Bolivia
BQ Bonaire Sint Eustatius & Saba
BR Brazil
BS Bahamas
BT Bhutan
Expand All @@ -75,6 +78,7 @@ CO Colombia
CR Costa Rica
CU Cuba
CV Cape Verde
CW Curacao
CX Christmas Island
CY Cyprus
CZ Czech Republic
Expand Down Expand Up @@ -229,8 +233,10 @@ SM San Marino
SN Senegal
SO Somalia
SR Suriname
SS South Sudan
ST Sao Tome & Principe
SV El Salvador
SX Sint Maarten
SY Syria
SZ Swaziland
TC Turks & Caicos Is
Expand Down
12 changes: 8 additions & 4 deletions lib/pytz/zoneinfo/zone.tab
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# <pre>
# @(#)zone.tab 8.41
# @(#)zone.tab 8.49
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
Expand Down Expand Up @@ -32,7 +32,6 @@ AG +1703-06148 America/Antigua
AI +1812-06304 America/Anguilla
AL +4120+01950 Europe/Tirane
AM +4011+04430 Asia/Yerevan
AN +1211-06900 America/Curacao
AO -0848+01314 Africa/Luanda
AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island
AQ -9000+00000 Antarctica/South_Pole Amundsen-Scott Station, South Pole
Expand Down Expand Up @@ -87,6 +86,7 @@ BL +1753-06251 America/St_Barthelemy
BM +3217-06446 Atlantic/Bermuda
BN +0456+11455 Asia/Brunei
BO -1630-06809 America/La_Paz
BQ +120903-0681636 America/Kralendijk
BR -0351-03225 America/Noronha Atlantic islands
BR -0127-04829 America/Belem Amapa, E Para
BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB)
Expand Down Expand Up @@ -120,7 +120,7 @@ CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations
CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut
CA +744144-0944945 America/Resolute Eastern Standard Time - Resolute, Nunavut
CA +744144-0944945 America/Resolute Central Standard Time - Resolute, Nunavut
CA +484531-0913718 America/Atikokan Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
CA +624900-0920459 America/Rankin_Inlet Central Time - central Nunavut
CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario
Expand Down Expand Up @@ -155,6 +155,7 @@ CO +0436-07405 America/Bogota
CR +0956-08405 America/Costa_Rica
CU +2308-08222 America/Havana
CV +1455-02331 Atlantic/Cape_Verde
CW +1211-06900 America/Curacao
CX -1025+10543 Indian/Christmas
CY +3510+03322 Asia/Nicosia
CZ +5005+01426 Europe/Prague
Expand Down Expand Up @@ -318,7 +319,8 @@ PL +5215+02100 Europe/Warsaw
PM +4703-05620 America/Miquelon
PN -2504-13005 Pacific/Pitcairn
PR +182806-0660622 America/Puerto_Rico
PS +3130+03428 Asia/Gaza
PS +3130+03428 Asia/Gaza Gaza Strip
PS +313200+0350542 Asia/Hebron West Bank
PT +3843-00908 Europe/Lisbon mainland
PT +3238-01654 Atlantic/Madeira Madeira Islands
PT +3744-02540 Atlantic/Azores Azores
Expand Down Expand Up @@ -360,8 +362,10 @@ SM +4355+01228 Europe/San_Marino
SN +1440-01726 Africa/Dakar
SO +0204+04522 Africa/Mogadishu
SR +0550-05510 America/Paramaribo
SS +0451+03136 Africa/Juba
ST +0020+00644 Africa/Sao_Tome
SV +1342-08912 America/El_Salvador
SX +180305-0630250 America/Lower_Princes
SY +3330+03618 Asia/Damascus
SZ -2618+03106 Africa/Mbabane
TC +2128-07108 America/Grand_Turk
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import sys
major, minor1, minor2, s, tmp = sys.version_info

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

import glob
from distutils.core import setup
Expand Down
0