8000 Merge remote-tracking branch 'origin/master' into draw-frame-error-check · matplotlib/matplotlib@fbfff36 · GitHub
[go: up one dir, main page]

Skip to content

Commit fbfff36

Browse files
committed
Merge remote-tracking branch 'origin/master' into draw-frame-error-check
2 parents 2c15ab4 + 153813b commit fbfff36

File tree

156 files changed

+2457
-1710
lines changed

Some content is hidden

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

156 files changed

+2457
-1710
lines changed

.appveyor.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ environment:
2323
# In theory we could use a single CONDA_INSTALL_LOCN because we construct
2424
# the envs anyway. But using one for the right python version hopefully
2525
# making things faster due to package caching.
26-
- PYTHON_VERSION: "3.6"
27-
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
26+
- PYTHON_VERSION: "3.7"
27+
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
2828
TEST_ALL: "no"
2929
EXTRAREQS: "-r requirements/testing/travis_extra.txt"
30-
- PYTHON_VERSION: "3.7"
30+
- PYTHON_VERSION: "3.8"
3131
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
3232
TEST_ALL: "no"
33+
EXTRAREQS: "-r requirements/testing/travis_extra.txt"
3334

3435
# We always use a 64-bit machine, but can build x86 distributions
3536
# with the PYTHON_ARCH variable
@@ -55,19 +56,15 @@ install:
5556
# For building, use a new environment
5657
- conda create -q -n test-environment python=%PYTHON_VERSION% tk
5758
- activate test-environment
59+
# pull pywin32 from conda because on py38 there is something wrong with finding
60+
# the dlls when insalled from pip
61+
- conda install -c conda-forge pywin32
5862
- echo %PYTHON_VERSION% %TARGET_ARCH%
5963
# Install dependencies from PyPI.
6064
- python -mpip install --upgrade -r requirements/testing/travis_all.txt %EXTRAREQS% %PINNEDVERS%
6165
# Install optional dependencies from PyPI.
6266
# Sphinx is needed to run sphinxext tests
6367
- python -mpip install --upgrade sphinx
64-
65-
# Apply patch to `subprocess` on Python versions > 2 and < 3.6.3
66-
# https://github.com/matplotlib/matplotlib/issues/9176
67-
- python -c "import sys; sys.exit(not (3,) < sys.version_info < (3,6,3))" && (
68-
curl -sL https://github.com/python/cpython/pull/1224.patch |
69-
patch -fsup 1 -d %CONDA_PREFIX% ) || cmd /c "exit /b 0"
70-
7168
# Show the installed packages + versions
7269
- conda list
7370

.circleci/config.yml

Lines changed: 9 additions & 8 deletions
190
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ commands:
110110
#
111111

112112
jobs:
113-
docs-python36:
113+
docs-python37:
114114
docker:
115-
- image: circleci/python:3.6
115+
- image: circleci/python:3.7
116116
steps:
117117
- checkout
118118

119119
- apt-install
120120
- fonts-install
121121
- pip-install
122-
- deps-install:
123-
numpy_version: "==1.13.0"
122+
123+
- deps-install
124124
- mpl-install
125125

126126
- doc-build
@@ -130,17 +130,18 @@ jobs:
130130
- store_artifacts:
131131
path: doc/build/html
132132

133-
docs-python37:
133+
docs-python38-min:
134134
docker:
135-
- image: circleci/python:3.7
135+
- image: circleci/python:3.8
136136
steps:
137137
- checkout
138138

139139
- apt-install
140140
- fonts-install
141141
- pip-install
142142

143-
- deps-install
143+
- deps-install:
144+
numpy_version: "==1.16.0"
144145
- mpl-install
145146

146147
- doc-build
@@ -185,6 +186,6 @@ workflows:
185186
version: 2
186187
build:
187188
jobs:
188-
- docs-python36
189189
- docs-python37
190
- docs-python38
191+
- docs-python38-min

.circleci/deploy-docs.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
set -e
44

5-
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" -o "$CIRCLE_BRANCH" != "master" -o "$CIRCLE_PULL_REQUEST" != "" ]; then
6-
echo "Not uploading docs from non-master branch or non-Matplotlib org."
5+
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
6+
[ "$CIRCLE_BRANCH" != "master" ] || \
7+
[[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
8+
echo "Not uploading docs for ${CIRCLE_SHA1}"\
9+
"from non-master branch (${CIRCLE_BRANCH})"\
10+
"or pull request (${CIRCLE_PULL_REQUEST})"\
11+
"or non-Matplotlib org (${CIRCLE_PROJECT_USERNAME})."
712
exit
813
fi
914

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ per-file-ignores =
226226
examples/shapes_and_collections/ellipse_demo.py: E402
227227
examples/shapes_and_collections/fancybox_demo.py: E402
228228
examples/shapes_and_collections/hatch_demo.py: E402
229+
examples/shapes_and_collections/hatch_style_reference.py: E402
229230
examples/shapes_and_collections/line_collection.py: E402
230231
examples/shapes_and_collections/marker_path.py: E402
231232
examples/shapes_and_collections/patch_collection.py: E402

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- [ ] New features are documented, with examples if plot related
88
- [ ] Documentation is sphinx and numpydoc compliant
99
- [ ] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
10-
- [ ] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
10+
- [ ] Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way
1111

1212
<!--
1313
Thank you so much for your PR! To help us review your contribution, please

.mailmap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ Matthew Emmett <memmett@gmail.com>
161161
Matthew Emmett <memmett@gmail.com> <memmett@unc.edu>
162162

163163
Matthias Bussonnier <bussonniermatthias@gmail.com>
164+
Matthias Bussonnier <bussonniermatthias@gmail.com> <mbussonnier@ucmerced.edu>
164165

165166
Matthias Lüthi <maluethi@protonmail.ch>
166167
Matthias Lüthi <maluethi@protonmail.ch> <matthias.luethi@lhep.unibe.ch>
@@ -200,7 +201,9 @@ Paul Ganssle <pg@example.com>
200201
Paul Hobson <pmhobson@gmail.com>
201202
Paul Hobson <pmhobson@gmail.com> vagrant <vagrant@precise32.(none)>
202203

204+
Paul Ivanov <pivanov314@gmail.com>
203205
Paul Ivanov <pivanov314@gmail.com> <pi@berkeley.edu>
206+
Paul Ivanov <pivanov314@gmail.com> <pivanov5@bloomberg.net>
204207

205208
Per Parker <wisalam@live.com>
206209

@@ -218,13 +221,15 @@ Rishikesh <rishikksh20@gmail.com>
218221
RyanPan <ryanbelt1993129@hotmail.com>
219222

220223
Samesh Lakhotia <samesh.lakhotia@gmail.com>
224+
Samesh Lakhotia <43701530+sameshl@users.noreply.github.com> <samesh.lakhotia@gmail.com>'
221225

222226
Scott Lasley <selasley@me.com>
223227

224228
Sebastian Raschka <mail@sebastianraschka.com>
225229
Sebastian Raschka <mail@sebastianraschka.com> <se.raschka@me.com>
226230

227231
Sidharth Bansal <bansal.sidharth2996@gmail.com>
232+
Sidharth Bansal <20972099+SidharthBansal@users.noreply.github.com> <bansal.sidharth2996@gmail.com>
228233

229234
Simon Cross <hodgestar+github@gmail.com> <hodgestar@gmail.com>
230235

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ env:
7373

7474
matrix:
7575
include:
76-
- python: 3.6
76+
- python: 3.7
7777
env:
78-
- PINNEDVERS='-c requirements/testing/travis36minver.txt'
78+
- PINNEDVERS='-c requirements/testing/minver.txt'
7979
- DELETE_FONT_CACHE=1
8080
- python: 3.7
8181
env:
@@ -111,7 +111,7 @@ before_install: |
111111
ci/silence brew update
112112
brew uninstall numpy gdal postgis
113113
brew unlink python@2
114-
brew upgrade python
114+
brew install python || brew upgrade python
115115
brew install ffmpeg imagemagick mplayer ccache
116116
hash -r
117117
which python

INSTALL.rst

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,42 @@ Installing from source
9191

9292
If you are interested in contributing to Matplotlib development,
9393
running the latest source code, or just like to build everything
94-
yourself, it is not difficult to build Matplotlib from source. Grab
95-
the latest *tar.gz* release file from `the PyPI files page
96-
<https://pypi.org/project/matplotlib/>`_, or if you want to
97-
develop Matplotlib or just need the latest bugfixed version, grab the
98-
latest git version, and see :ref:`install-from-git`.
94+
yourself, it is not difficult to build Matplotlib from source.
9995

100-
Matplotlib can be installed from the source directory with a simple ::
96+
The easiest way to get the latest development version to start contributing
97+
is to go to the git `repository <https://github.com/matplotlib/matplotlib>`_
98+
and run::
99+
100+
git clone https://github.com/matplotlib/matplotlib.git
101+
102+
If you're developing, it's better to do it in editable mode. The reason why
103+
is that pytest's test discovery only works for Matplotlib
104+
if installation is done this way. Also, editable mode allows your code changes
105+
to be instantly propagated to your library code without reinstalling (though
106+
you will have to restart your python process / kernel)::
107+
108+
python -m pip install -e .
109+
110+
If you're not developing, it can be installed from the source directory with
111+
a simple::
101112

102113
python -m pip install .
103114

104-
We provide a setup.cfg_ file which you can use to customize the build
115+
To run the tests you will need to install some additional dependencies::
116+
117+
python -m pip install -r requirements/dev/dev-requirements.txt
118+
119+
.. warning::
120+
121+
The following instructions in this section are for very custom
122+
installations of Matplotlib. Proceed with caution because these instructions
123+
may result in your build producing unexpected behavior and/or causing
124+
local testing to fail.
125+
126+
If you would like to build from a tarball, grab the latest *tar.gz* release
127+
file from `the PyPI files page <https://pypi.org/project/matplotlib/>`_.
128+
129+
We provide a `setup.cfg`_ file which you can use to customize the build
105130
process. For example, which default backend to use, whether some of the
106131
optional libraries that Matplotlib ships with are installed, and so on. This
107132
file will be particularly useful to those packaging Matplotlib.
@@ -113,16 +138,19 @@ file will be particularly useful to those packaging Matplotlib.
113138
Dependencies
114139
------------
115140

141+
Matplotlib will automatically install dependencies when you install with
142+
``pip``, so this section is mostly for your reference.
143+
116144
Matplotlib requires the following dependencies:
117145

118-
* `Python <https://www.python.org/downloads/>`_ (>= 3.6)
119-
* `NumPy <https://numpy.org>`_ (>= 1.15)
146+
* `Python <https://www.python.org/downloads/>`_ (>= 3.7)
147+
* `NumPy <https://numpy.org>`_ (>= 1.16)
120148
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
121149
* `cycler <https://matplotlib.org/cycler/>`_ (>= 0.10.0)
122-
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.1)
123-
* `kiwisolver <https://github.com/nucleic/kiwi>`_ (>= 1.0.0)
150+
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.7)
151+
* `kiwisolver <https://github.com/nucleic/kiwi>`_ (>= 1.0.1)
124152
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>= 6.2)
125-
* `pyparsing <https://pypi.org/project/pyparsing/>`_ (>=2.0.3)
153+
* `pyparsing <https://pypi.org/project/pyparsing/>`_ (>=2.2.1)
126154

127155
Optionally, you can also install a number of packages to enable better user
128156
interface toolkits. See :ref:`what-is-a-backend` for more details on the
@@ -170,12 +198,13 @@ etc., you can install the following:
170198
FreeType and Qhull
171199
------------------
172200

173-
Matplotlib depends on `FreeType <https://www.freetype.org/>`_ (>= 2.3), a
174-
font rendering library, and on `Qhull <http://www.qhull.org/>`_ (>= 2015.2),
175-
a library for computing triangulations. By default, Matplotlib downloads and
176-
builds its own copy of FreeType (this is necessary to run the test suite,
177-
because different versions of FreeType rasterize characters differently), and
178-
uses its own copy of Qhull.
201+
Matplotlib depends on `FreeType <https://www.freetype.org/>`_ (>=
202+
2.3), a font rendering library, and on `Qhull
203+
<http://www.qhull.org/>`_ (>= 2015.2), a library for computing
204+
triangulations. By default (except on AIX) Matplotlib downloads and
205+
builds its own copy of FreeType (this is necessary to run the test
206+
suite, because different versions of FreeType rasterize characters
207+
differently), and uses its own copy of Qhull.
179208

180209
To force Matplotlib to use a copy of FreeType or Qhull already installed in
181210
your system, create a :file:`setup.cfg` file with the following contents:
@@ -240,6 +269,11 @@ and on Windows:
240269
- ``Agg``: the Anti-Grain Geometry C++ rendering engine;
241270
- ``ttconv``: a TrueType font utility.
242271

272+
If you go this route but need to reset and rebuild to change your settings,
273+
remember to clear your artifacts before re-building::
274+
275+
git clean -xfd
276+
243277
Building on Windows
244278
-------------------
245279

azure-pipelines.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,18 @@
55

66
strategy:
77
matrix:
8-
Linux_py36:
9-
vmImage: 'ubuntu-16.04'
10-
python.version: '3.6'
118
Linux_py37:
129
vmImage: 'ubuntu-16.04'
1310
python.version: '3.7'
1411
Linux_py38:
1512
vmImage: 'ubuntu-16.04'
1613
python.version: '3.8'
17-
macOS_py36:
18-
vmImage: 'macOS-10.14'
19-
python.version: '3.6'
2014
macOS_py37:
2115
vmImage: 'macOS-10.15'
2216
python.version: '3.7'
2317
macOS_py38:
2418
vmImage: 'macOS-latest'
2519
python.version: '3.8'
26-
Windows_py36:
27-
vmImage: 'vs2017-win2016'
28-
python.version: '3.6'
2920
Windows_py37:
3021
vmImage: 'vs2017-win2016'
3122
python.version: '3.7'

doc/_static/mpl.css

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,26 +1001,35 @@ figcaption {
10011001
}
10021002
}
10031003

1004+
.mpl-button {
1005+
background: #11557C;
1006+
font-weight: normal;
1007+
display: inline-block;
1008+
padding: 0 1em;
1009+
line-height: 2.8;
1010+
font-size: 16px;
1011+
text-align: center;
1012+
cursor: pointer;
1013+
color: #fff;
1014+
text-decoration: none;
1015+
border-radius: 6px;
1016+
z-index: 1;
1017+
transition: background .25s ease;
1018+
}
1019+
1020+
.mpl-button:hover, .mpl-button:active, .mpl-button:focus {
1021+
background: #003c63;
1022+
outline-color: #003c63;
1023+
}
1024+
10041025
#sidebar-donations {
10051026
margin-top: 40px;
10061027
}
10071028

10081029
.donate_button {
1009-
background:#11557C;
1010-
font-weight:normal;
10111030
clear: both;
10121031
display: block;
1013-
width:200px;
1014-
line-height:2.8;
1015-
font-size: 16px;
1016-
text-align: center;
1017-
cursor:pointer;
1018-
color:#fff;
1019-
text-decoration: none;
10201032
margin: 30px auto 0;
1021-
border-radius: 6px;
1022-
z-index:1;
1023-
transition: background .25s ease;
10241033
}
10251034

10261035
.donate_button:last-of-type {
@@ -1029,12 +1038,6 @@ figcaption {
10291038

10301039
}
10311040

1032-
.donate_button:hover, .donate_button:active, .donate_button:focus {
1033-
background: #003c63;
1034-
outline-color: #003c63;
1035-
}
1036-
1037-
10381041
div.responsive_screenshots {
10391042
/* Horizontally centered */
10401043
display: block;

doc/_templates/donate_sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33

44
<div id="sidebar-donations">
5-
<a href="https://numfocus.org/donate-to-matplotlib" target="_blank"> <div class="donate_button" >Support Matplotlib</div></a>
5+
<a href="https://numfocus.org/donate-to-matplotlib" target="_blank"> <span class="mpl-button donate_button" >Support Matplotlib</span></a>
66
</div>

doc/api/api_changes.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ added to Matplotlib, see :ref:`whats-new`.
3333
:glob:
3434
:maxdepth: 1
3535

36-
api_changes_3.4/*
36+
next_api_changes/behavior/*
37+
next_api_changes/deprecations/*
38+
next_api_changes/development/*
39+
next_api_changes/removals/*
3740

3841
.. include:: prev_api_changes/api_changes_3.3.0.rst

0 commit comments

Comments
 (0)
0