8000 Merge remote-tracking branch 'upstream/master' into bug-fix/line3d · matplotlib/matplotlib@bd8723b · GitHub
[go: up one dir, main page]

Skip to content

Commit bd8723b

Browse files
committed
Merge remote-tracking branch 'upstream/master' into bug-fix/line3d
2 parents 43d7b6f + 2898bfa commit bd8723b

File tree

348 files changed

+6104
-10834
lines changed

Some content is hidden

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

348 files changed

+6104
-10834
lines changed

.appveyor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ environment:
1919
# theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit,
2020
# one for 64bit because we construct envs anyway. But using one for the
2121
# right python version is hopefully making it fast due to package caching.
22-
- PYTHON_VERSION: "2.7"
23-
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
24-
TEST_ALL: "no"
2522
- PYTHON_VERSION: "3.5"
2623
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
2724
TEST_ALL: "no"
@@ -62,7 +59,7 @@ install:
6259
#
6360
- conda create -q -n test-environment python=%PYTHON_VERSION%
6461
msinttypes freetype=2.6 "libpng>=1.6.21,<1.7" zlib=1.2 tk=8.5
65-
pip setuptools numpy mock pandas sphinx tornado
62+
pip setuptools numpy pandas sphinx tornado
6663
- activate test-environment
6764
- echo %PYTHON_VERSION% %TARGET_ARCH%
6865
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124

.circleci/config.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ doc-bundle-run: &doc-bundle
8282
#
8383

8484
jobs:
85-
docs-python35:
85+
docs-python36:
8686
docker:
87-
- image: circleci/python:3.5
87+
- image: circleci/python:3.6
8888
steps:
8989
- checkout
9090

@@ -115,9 +115,9 @@ jobs:
115115
name: "Deploy new docs"
116116
command: ./.circleci/deploy-docs.sh
117117

118-
docs-python27:
118+
docs-python35:
119119
docker:
120-
- image: circleci/python:2.7
120+
- image: circleci/python:3.5
121121
steps:
122122
- checkout
123123

@@ -128,23 +128,14 @@ jobs:
128128
- run:
129129
<<: *deps-install
130130
environment:
131-
NUMPY_VERSION: "==1.7.1"
132-
# Linkchecker only works with python 2.7 for the time being.
133-
# Linkchecker is currently broken with requests 2.10.0 so force an earlier version.
134-
- run: pip install --user $PRE requests==2.9.2 linkchecker
131+
NUMPY_VERSION: "==1.10.0"
135132
- run: *mpl-install
136133

137134
- run: *doc-build
138135

139136
# We don't build the LaTeX docs here, so linkchecker will complain
140137
- run: touch doc/build/html/Matplotlib.pdf
141138

142-
# Linkchecker only works with python 2.7 for the time being
143-
- run:
144-
name: linkchecker
145-
command: ~/.local/bin/linkchecker build/html/index.html
146-
working_directory: doc
147-
148139
- run: *doc-bundle
149140
- store_artifacts:
150141
path: doc/build/sphinx-gallery-files.tar.gz
@@ -166,4 +157,4 @@ workflows:
166157
build:
167158
jobs:
168159
- docs-python35
169-
- docs-python27
160+
- docs-python36

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ result_images
8080

8181
# Nose/Pytest generated files #
8282
###############################
83+
.pytest_cache/
8384
.cache/
8485
.coverage
8586
.coverage.*
@@ -91,3 +92,8 @@ cover/
9192
__conda_version__.txt
9293
lib/png.lib
9394
lib/z.lib
95+
96+
# Jupyter files #
97+
#################
98+
99+
.ipynb_checkpoints/

.travis.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ addons:
3737
- texlive-latex-extra
3838
- texlive-latex-recommended
3939
- texlive-xetex
40+
- texlive-luatex
4041

4142
env:
4243
global:
@@ -47,7 +48,6 @@ env:
4748
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
4849
- CYCLER=cycler
4950
- DATEUTIL=python-dateutil
50-
- MOCK=
5151
- NOSE=
5252
- NUMPY=numpy
5353
- PANDAS=
@@ -65,29 +65,26 @@ env:
6565

6666
matrix:
6767
include:
68-
- python: 2.7
68+
- python: 3.5
6969
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124.
7070
env:
7171
- CYCLER=cycler==0.10
7272
- DATEUTIL=python-dateutil==2.1
73-
- MOCK=mock
7473
- NOSE=nose
75-
- NUMPY=numpy==1.7.1
74+
- NUMPY=numpy==1.10.0
7675
- PANDAS='pandas<0.21.0'
7776
- PYPARSING=pyparsing==2.0.1
7877
- PYTEST=pytest==3.1.0
7978
- PYTEST_COV=pytest-cov==2.3.1
8079
- SPHINX=sphinx==1.3
81-
- python: 3.4
80+
- python: 3.5
8281
env: PYTHON_ARGS=-OO
8382
- python: 3.6
8483
env: DELETE_FONT_CACHE=1 PANDAS='pandas<0.21.0' PYTEST_PEP8=pytest-pep8 RUN_PEP8=--pep8
8584
- python: "nightly"
8685
env: PRE=--pre
8786
- os: osx
88-
osx_image: xcode7.3
8987
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
90-
env: MOCK=mock
9188
only: master
9289
cache:
9390
# As for now travis caches only "$HOME/.cache/pip"
@@ -109,31 +106,31 @@ before_install:
109106
export PATH=$PATH:/tmp/λ
110107
export PATH=/usr/lib/ccache:$PATH
111108
else
112-
brew update
113-
brew tap homebrew/gui
114-
brew install python libpng ffmpeg imagemagick mplayer ccache
109+
ci/travis/silence brew update
110+
brew upgrade python
111+
brew install ffmpeg imagemagick mplayer ccache
112+
hash -r
113+
which python
114+
python --version
115115
# We could install ghostscript and inkscape here to test svg and pdf
116116
# but this makes the test time really long.
117117
# brew install ghostscript inkscape
118118
export PATH=/usr/local/opt/ccache/libexec:$PATH
119119
fi
120120
121121
install:
122-
# Upgrade pip and setuptools. Mock has issues with the default version of
123-
# setuptools
124122
- |
125-
# Setup environment
123+
# Setup environment.
126124
ccache -s
127125
git describe
128-
# Upgrade pip and setuptools and wheel to get as clean an install as possible
129-
pip install --upgrade pip setuptools wheel
126+
# Upgrade pip and setuptools and wheel to get as clean an install as possible.
127+
python -mpip install --upgrade pip setuptools wheel
130128
- |
131-
# Install dependencies from PyPI
132-
pip install --upgrade $PRE \
129+
# Install dependencies from PyPI.
130+
python -mpip install --upgrade $PRE \
133131
codecov \
134132
coverage \
135133
$CYCLER \
136-
$MOCK \
137134
$NOSE \
138135
$NUMPY \
139136
$PANDAS \
@@ -148,22 +145,22 @@ install:
148145
# install was successful by trying to import the toolkit (sometimes, the
149146
# install appears to be successful but shared libraries cannot be loaded at
150147
# runtime, so an actual import is a better check).
151-
pip install cairocffi pgi &&
148+
python -mpip install cairocffi pgi &&
152149
python -c 'import pgi as gi; gi.require_version("Gtk", "3.0"); from pgi.repository import Gtk' &&
153150
echo 'pgi is available' ||
154151
echo 'pgi is not available'
155-
pip install pyqt5==5.9 &&
152+
python -mpip install pyqt5==5.9 &&
156153
python -c 'import PyQt5.QtCore' &&
157154
echo 'PyQt5 is available' ||
158155
echo 'PyQt5 is not available'
159-
pip install -U --pre \
156+
python -mpip install -U --pre \
160157
--no-index -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 \
161158
wxPython &&
162159
python -c 'import wx' &&
163160
echo 'wxPython is available' ||
164161
echo 'wxPython is not available'
165162
166-
pip install $PRE \
163+
python -mpip install $PRE \
167164
$PYTEST \
168165
$PYTEST_COV \
169166
pytest-faulthandler \
@@ -176,7 +173,7 @@ install:
176173
cp ci/travis/setup.cfg .
177174
- |
178175
# Install matplotlib
179-
pip install -ve .
176+
python -mpip install -ve .
180177
181178
before_script:
182179
- |

INSTALL.rst

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -32,43 +32,14 @@ Although not required, we suggest also installing ``IPython`` for
3232
interactive use. To easily install a complete Scientific Python
3333
stack, see :ref:`install_scipy_dists` below.
3434

35-
.. _installing_windows:
36-
37-
Windows
38-
-------
39-
40-
In case Python 2.7 or 3.4 are not installed for all users,
41-
the Microsoft Visual C++ 2008
42-
(`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=15336>`__
43-
or
44-
`32 bit <https://www.microsoft.com/en-us/download/details.aspx?id=29>`__
45-
for Python 2.7) or Microsoft Visual C++ 2010
46-
(`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=14632>`__
47-
or
48-
`32 bit <https://www.microsoft.com/en-us/download/details.aspx?id=5555>`__
49-
for Python 3.4) redistributable packages need to be installed.
5035

5136
macOS
5237
-----
5338

54-
If you are using Python 2.7 on a Mac you may need to do::
55-
56-
xcode-select --install
57-
58-
so that *subprocess32*, a dependency, may be compiled.
59-
6039
To use the native OSX backend you will need :ref:`a framework build
6140
<osxframework-faq>` build of Python.
6241

6342

64-
Linux
65-
-----
66-
67-
On extremely old versions of Linux and Python 2.7 you may need to
68-
install the master version of *subprocess32* (`see comments
69-
<https://github.com/google/python-subprocess32/issues/12#issuecomment-304724113>`__).
70-
71-
7243
Test Data
7344
---------
7445

@@ -83,9 +54,9 @@ To run the test suite:
8354
* extract the :file:`lib\\matplotlib\\tests` or
8455
:file:`lib\\mpl_toolkits\\tests` directories from the source distribution;
8556
* install test dependencies: `pytest <https://pypi.python.org/pypi/pytest>`_,
86-
`mock <https://pypi.python.org/pypi/mock>`_, Pillow, MiKTeX, GhostScript,
87-
ffmpeg, avconv, ImageMagick, and `Inkscape <https://inkscape.org/>`_;
88-
* run ``py.test path\to\tests\directory``.
57+
Pillow, MiKTeX, GhostScript, ffmpeg, avconv, ImageMagick, and `Inkscape
58+
<https://inkscape.org/>`_;
59+
* run ``pytest path\to\tests\directory``.
8960

9061

9162
Third-party distributions of Matplotlib
@@ -96,12 +67,13 @@ Third-party distributions of Matplotlib
9667
Scientific Python Distributions
9768
-------------------------------
9869

99-
Both `Anaconda <https://www.continuum.io/downloads/>`_ and `Canopy
100-
<https://www.enthought.com/products/canopy/>`_ are both excellent
70+
`Anaconda <https://www.continuum.io/downloads/>`_ and `Canopy
71+
<https://www.enthought.com/products/canopy/>`_ and `ActiveState
72+
<https://www.activestate.com/activepython/downloads>`_ are excellent
10173
choices that "just work" out of the box for Windows, macOS and common
10274
Linux platforms. `WinPython <https://winpython.github.io/>`__ is an
10375
option for windows users. All of these distributions include
104-
Matplotlib and *lots* of other useful tools.
76+
Matplotlib and *lots* of other useful (data) science tools.
10577

10678

10779
Linux : using your package manager
@@ -167,7 +139,7 @@ Dependencies
167139

168140
Matplotlib requires a large number of dependencies:
169141

170-
* `Python <https://www.python.org/downloads/>`_ (>= 2.7 or >= 3.4)
142+
* `Python <https://www.python.org/downloads/>`_ (>= 3.5)
171143
* `NumPy <http://www.numpy.org>`_ (>= |minimum_numpy_version|)
172144
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__
173145
* `dateutil <https://pypi.python.org/pypi/python-dateutil>`_ (>= 2.1)
@@ -177,10 +149,6 @@ Matplotlib requires a large number of dependencies:
177149
* FreeType (>= 2.3)
178150
* `cycler <http://matplotlib.org/cycler/>`__ (>= 0.10.0)
179151
* `six <https://pypi.python.org/pypi/six>`_
180-
* `backports.functools_lru_cache <https://pypi.python.org/pypi/backports.functools_lru_cache>`_
181-
(for Python 2.7 only)
182-
* `subprocess32 <https://pypi.python.org/pypi/subprocess32/>`_ (for Python
183-
2.7 only, on Linux and macOS only)
184152
* `kiwisolver <https://github.com/nucleic/kiwi>`__ (>= 1.0.0)
185153

186154
Optionally, you can also install a number of packages to enable better user
@@ -191,7 +159,6 @@ optional Matplotlib backends and the capabilities they provide.
191159
* `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_ (>= 4.4) or
192160
`PySide <https://pypi.python.org/pypi/PySide>`_: for the Qt4Agg backend;
193161
* `PyQt5 <https://pypi.python.org/pypi/PyQt5>`_: for the Qt5Agg backend;
194-
* :term:`pygtk` (>= 2.4): for the GTK and the GTKAgg backend;
195162
* :term:`wxpython` (>= 2.9 or later): for the WX or WXAgg backend;
196163
* `cairocffi <https://cairocffi.readthedocs.io/en/latest/>`__ (>=
197164
v0.8): for cairo based backends;
@@ -325,8 +292,6 @@ without fiddling with environment variables::
325292
conda install pyqt
326293
# this package is only available in the conda-forge channel
327294
conda install -c conda-forge msinttypes
328-
# for Python 2.7
329-
conda install -c conda-forge backports.functools_lru_cache
330295

331296
# copy the libs which have "wrong" names
332297
set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ include pytest.ini
44
include Makefile MANIFEST.in
55
include matplotlibrc.template setup.cfg.template
66
include setupext.py setup.py distribute_setup.py
7-
include lib/matplotlib/mpl-data/lineprops.glade
87
include lib/matplotlib/mpl-data/matplotlibrc
98
include lib/matplotlib/mpl-data/images/*
109
include lib/matplotlib/mpl-data/fonts/ttf/*

README.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ platforms. Matplotlib can be used in Python scripts, the Python and IPython
3333
shell (à la MATLAB or Mathematica), web application servers, and various
3434
graphical user interface toolkits.
3535

36+
NOTE: The current master branch is now Python 3 only. Python 2 support is
37+
being dropped.
38+
3639
`Home page <http://matplotlib.org/>`_
3740

3841
Installation
@@ -49,16 +52,16 @@ Testing
4952

5053
After installation, you can launch the test suite::
5154

52-
py.test
55+
pytest
5356

5457
Or from the Python interpreter::
5558

5659
import matplotlib
5760
matplotlib.test()
5861

59-
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for
60-
more information. Note that the test suite requires pytest and, on Python 2.7,
61-
mock. Please install with pip or your package manager of choice.
62+
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for more
63+
information. Note that the test suite requires pytest. Please install with pip
64+
or your package manager of choice.
6265

6366
Contact
6467
=======

build_alllocal.cmd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
:: conda install pyqt
77
:: # this package is only available in the conda-forge channel
88
:: conda install -c conda-forge msinttypes
9-
:: if you build on py2.7:
10-
:: conda install -c conda-forge backports.functools_lru_cache
119

1210
set TARGET=bdist_wheel
1311
IF [%1]==[] (

ci/travis/silence

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# Run a command, hiding its standard output and error if its exit
4+
# status is zero.
5+
6+
stdout=$(mktemp -t stdout) || exit 1
7+
stderr=$(mktemp -t stderr) || exit 1
8+
"$@" >$stdout 2>$stderr
9+
code=$?
10+
if [[ $code != 0 ]]; then
11+
cat $stdout
12+
cat $stderr >&2
13+
exit $code
14+
fi

ci/travis/test_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ fi
1717

1818
echo The following args are passed to pytest $PYTEST_ARGS $RUN_PEP8
1919

20-
pytest $PYTEST_ARGS $RUN_PEP8
20+
python -mpytest $PYTEST_ARGS $RUN_PEP8

0 commit comments

Comments
 (0)
0