Skip to content
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

Python2 is broken after 41.5.0 [Windows] #1891

Closed
jgsogo opened this issue Oct 28, 2019 · 4 comments · Fixed by #1892
Closed

Python2 is broken after 41.5.0 [Windows] #1891

jgsogo opened this issue Oct 28, 2019 · 4 comments · Fixed by #1892

Comments

@jgsogo
Copy link

jgsogo commented Oct 28, 2019

In PR #1811 a non-python2 statement was introduced (encoding argument is not available in Python2):

with open(state_path, 'rt', encoding='utf-8') as state_file:

This breaks any installation in Windows py2 that requires to generate a package

@benoit-pierre
Copy link
Member

Does it work with this patch:

setuptools/msvc.py | 1 +
 1 file changed, 1 insertion(+)

diff --git i/setuptools/msvc.py w/setuptools/msvc.py
index ffa7053b..2ffe1c81 100644
--- i/setuptools/msvc.py
+++ w/setuptools/msvc.py
@@ -20,6 +20,7 @@
 """
 
 import json
+from io import open
 from os import listdir, pathsep
 from os.path import join, isfile, isdir, dirname
 import sys

?

@jgsogo
Copy link
Author

jgsogo commented Oct 28, 2019

Yes, it will, that's one of the classic workarounds. I'd submit the PR... but I'm not sure how to add a test for that :S

@benoit-pierre
Copy link
Member

To clarify, the issue only occurs when building a package with a C extension?

@benoit-pierre
Copy link
Member

41.5.1 should be available shortly.

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 a pull request may close this issue.

2 participants