Skip to content

API: only support python 3.5+ #10425

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 8 commits into from
Feb 14, 2018
Merged

Conversation

tacaswell
Copy link
Member

Matplotlib 3.0 will not support python2.7

@tacaswell tacaswell added this to the v3.0 milestone Feb 12, 2018
.travis.yml Outdated
@@ -111,7 +111,9 @@ before_install:
else
brew update
brew tap homebrew/gui
brew install python libpng ffmpeg imagemagick mplayer ccache
brew install python3 libpng ffmpeg imagemagick mplayer ccache
# make 'python' mean 'pyhon3'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would not be a PR from me with out a misspelling!

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

docs-python27:
docs-python3.5:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra dot.

@dstansby
Copy link
Member

Should we leave this until 2.2 is out? (otherwise PRs to fix stuff in 2.2 won't get run on py27 CI)

@tacaswell
Copy link
Member Author

The 2.2.x branch will still have the current CI set up. Either make PRs directly to 2.2.x or use the backport bot, either of which will run the CI before we merge.

@tacaswell
Copy link
Member Author

There seems to be an issue with py3.5 + np1.7.1 and there is a a sphinx issue in one of the docstrings....

@dstansby
Copy link
Member

Numpy 1.7 doesn't support py3.5, so I guess it needs bumping: https://docs.scipy.org/doc/numpy/release.html#numpy-1-7-2-release-notes

@dstansby
Copy link
Member

Looks like 1.10 was the first release to support python 3.5: https://docs.scipy.org/doc/numpy/release.html#numpy-1-10-0-release-notes

@tacaswell
Copy link
Member Author

Well, that is exciting!

@tacaswell
Copy link
Member Author

@QuLogic 's change also exposed that I failed to convince the OSX version to use the right python.

@QuLogic
Copy link
Member

QuLogic commented Feb 13, 2018

Looks like the file already exists:

ln: /usr/local/bin/python: File exists
/usr/local/bin/python
Python 2.7.12

@QuLogic
Copy link
Member

QuLogic commented Feb 13, 2018

This is working everywhere but doc builds. The 3.6 builds need a rebase to get the other fix. The 3.5 build is failing on examples/api/date.py due to some casting error in date2num on NumPy 1.10. It doesn't not work with any 1.10 micro release but works again with 1.11. That may be due to these changes.

If you rebase, please squash in those two fixup commits of mine (at least).

@QuLogic
Copy link
Member

QuLogic commented Feb 13, 2018

Last commit fixes the NumPy date problem, so we just need a rebase for the other doc problem.

@@ -126,10 +131,10 @@ install:
ccache -s
git describe
# Upgrade pip and setuptools and wheel to get as clean an install as possible
pip install --upgrade pip setuptools wheel
python -mpip install --upgrade pip setuptools wheel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of changing all calls to pip to python -mpip it would be easier to change all calls to python to be python3 and all calls to pip to be pip3. That would avoid the need for the symlink.

.travis.yml Outdated
@@ -111,7 +111,12 @@ before_install:
else
brew update
brew tap homebrew/gui
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line causes an error message (that doesn't stop the build): https://travis-ci.org/matplotlib/matplotlib/jobs/340786248#L1724

The line can simply be omitted.

INSTALL.rst Outdated
@@ -176,13 +147,9 @@ Matplotlib requires a large number of dependencies:
* `pytz <http://pytz.sourceforge.net/>`__
* FreeType (>= 2.3)
* `cycler <http://matplotlib.org/cycler/>`__ (>= 0.10.0)
* `six <https://pypi.python.org/pypi/six>`_
Copy link
Member

@jenshnielsen jenshnielsen Feb 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this stay until six is completely removed from the code base

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair, I was being optimistic.

@dstansby
Copy link
Member

I've just rebased and force pushed to hopefully fix the documentation errors.

@tacaswell
Copy link
Member Author

squashed the commits as @QuLogic asked, put six back as a dependency and force-pushed.

@tacaswell tacaswell mentioned this pull request Feb 13, 2018
6 tasks
@@ -99,6 +99,8 @@
to MATLAB&reg;, a registered trademark of The MathWorks, Inc.

"""
# NOTE: This file must remain Python 2 compatible for the forseeable future,
# to ensure that we error out properly for existing editable installs.
Copy link
Contributor

@anntzer anntzer Feb 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case it may be worth having a test entry that just tries to python2 -mcompileall matplotlib/__init__.py (or similar) to check that indeed the file is Py2-compatible (otherwise I'm sure it'll quickly break).

@@ -3,6 +3,9 @@
setup.cfg.template for more information.
"""

# NOTE: This file must remain Python 2 compatible for the forseeable future,
# to ensure that we error out properly for people with outdated setuptools
# and/or pip.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just move the version check here and allow setupext to use Py3.

@dstansby
Copy link
Member

Since me and @jkseppan have approved, I'm going to merge so this doesn't hold up other 3.0 PRs.

@dstansby dstansby merged commit b17c66f into matplotlib:master Feb 14, 2018
@tacaswell tacaswell deleted the API_py3_only branch February 14, 2018 14:40
@QuLogic QuLogic mentioned this pull request Feb 15, 2018
1 task
@QuLogic QuLogic added the Py3k label Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants