Skip to content

Merge pull request #11786 from timhoffm/collections-abc #15191

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

Conversation

tacaswell
Copy link
Member

Fix collections import warnings for Python 3.7

Put try...except blocks in to support py27

Fix collections import warnings for Python 3.7

Put try...except blocks in to support py27
@tacaswell tacaswell added this to the v2.2.5 milestone Sep 5, 2019
MAINT: use collections.abc for 3.7
Conflicts:
   lib/matplotlib/cbook/__init__.py

Added try-except block to handle py2 case
@tacaswell
Copy link
Member Author

 C:\Users\appveyor\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Miniconda-x64\envs\test-environment\Library\lib /LIBPATH:.\lib /LIBPATH:C:\Miniconda-x64\envs\test-environment\libs /LIBPATH:C:\Miniconda-x64\envs\test-environment\PCbuild\amd64 /LIBPATH:C:\Miniconda-x64\envs\test-environment\PC\VS9.0\amd64 png.lib z.lib /EXPORT:init_png build\temp.win-amd64-2.7\Release\src/_png.obj build\temp.win-amd64-2.7\Release\src/mplutils.obj /OUT:build\lib.win-amd64-2.7\matplotlib\_png.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\src\_png.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\src\_png.pyd.manifest
961    fatal error C1900: Il mismatch between 'P1' version '20150812' and 'P2' version '20080116'
962    LINK : fatal error LNK1257: code generation failed
963    error: command 'C:\\Users\\appveyor\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1257

It looks like building Matplotlib on python2 an appveyor has bit-rotted.

The first SO result for this error is https://stackoverflow.com/questions/8959973/il-mismatch-between-p1-version-20080116-and-p2-version-20070207 which suggests we have miss-matched versions of visual studio.

@jklymak
Copy link
Member

jklymak commented Sep 6, 2019

Do we really want to worry about MPL 2.x compatibility with py3.7? Like fine if we do, but maybe 2.x should just have a maximum python version it supports?

@tacaswell
Copy link
Member Author

Yes, because we want to make the python2 -> python3 transition as smooth as possible for people just doing this now. There will be people jumping from py27 -> py37 so not making them jump from mpl 2.2.x -> 3.2.x in the same go.

Also, as a general principle, any branch we are still supporting should support all released versions of Python per https://numpy.org/neps/nep-0029-deprecation_policy.html

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Thats fine, this seems to work fine on 2.7 for travis, so I imagine its fine for appveyor...

@NelleV
Copy link
Member

NelleV commented Sep 7, 2019

I restarted the failure on appveyor, and it fails consistently.

@jklymak
Copy link
Member

jklymak commented Sep 8, 2019

Yes I don’t doubt that apveyor isn’t building just that it’s not the fault of this PR

@QuLogic
Copy link
Member

QuLogic commented Sep 8, 2019

AppVeyor has been broken for a very long time. I tried to fix some of it, but don't really understand the Py2 errors.

Since this works on Py3 (which is the point) on master and Py2 on Travis, I'm inclined to merge and just fix AppVeyor later.

@QuLogic QuLogic merged commit 5e63281 into matplotlib:v2.2.x Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants