-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
TypeError: 'output_dir' must be a string or None since setuptools 40.7.0 #1653
Comments
This is probably due to #1180. |
I think something similar is the cause of a zc.buildout test error. It only fails on 2.7 (pypy and python 3 are file) and it happens when we test a package with an extension. It has to do with
I haven't myself contributed to that part of the buildout tests, but from looking at it, we're passing the result of an |
I've looked at my local 2.7 distutils, and in
That Now the value is a unicode instance, so this is another case where I did a bit of grepping, and there are some 25 cases where I see Brainstorming: would it be an idea to stick with old-style strings on 2.7? I don't know exactly what #1180 fixes, but perhaps encoding it as byte strings again (only on 2.7) could be OK? |
Or revert the change, postpone it for v41 and make that release py3-only? isittimeyet? |
I'm seeing this for pypy as well, installing packages such as grpcio |
I don't yet understand which part of the change in #1180 led to these failures. Reading through the code, it seems to me the only place that unicode would appear where previously str would be present is in the .cfg file parsing, and I don't see those config values set in setup.cfg... unless maybe the build tools are setting those values. Yes, that must be it... Confirmed. As can be seen from the trace, the following is being set in setup.cfg:
And tracing the distutils code, I can see where output_dir is derived from build_temp and build_temp is derived from build_base. |
In the aforementioned commit, I have what I think is a suitable workaround. @hsoft or @reinout Can you possibly test with setuptools from https://m.devpi.net/jaraco/dev/setuptools/40.7.0.post20190128 and see if your builds work with that code present? |
Confirmed that https://m.devpi.net/jaraco/dev/setuptools/40.7.0.post20190128 fixed the building an affected package for me on OS X with Python 2.7 |
@jaraco I can confirm that the artifact linked above fixes the regression for grpc. |
Yes, it fixes the problem demonstrated by the steps written in my initial comment. |
v40.7.1 is released now with the fix. Thanks for the report and sorry for any inconvenience. |
Yeah, also the buildout tests run fine again. @jaraco: nice fix! |
Setuptools 40.7.0 introduced support for non-ascii chars in setup.cfg [1], which causes python2.7 based sphinx jobs to fail with str-unicode mismatch, e.g. with [2]: 'error: 'builder' must be a list of strings (got u'html,man') See issue [3]. [1] https://setuptools.readthedocs.io/en/latest/history.html#v40-7-0 [2] http://logs.openstack.org/periodic-stable/git.openstack.org/openstack/keystone/stable/queens/build-openstack-sphinx-docs/0ea4957/job-output.txt.gz#_2019-01-28_06_18_25_401045 [3] pypa/setuptools#1653 Change-Id: I8921639cc4a1edfa0ac9d46a7cc03549aa6189aa
Setuptools 40.7.0 introduced support for non-ascii chars in setup.cfg [1], which causes python2.7 based sphinx jobs to fail with str-unicode mismatch, e.g. with [2]: 'error: 'builder' must be a list of strings (got u'html,man') See issue [3]. Conflicts: global-requirements.txt [1] https://setuptools.readthedocs.io/en/latest/history.html#v40-7-0 [2] http://logs.openstack.org/periodic-stable/git.openstack.org/openstack/keystone/stable/queens/build-openstack-sphinx-docs/0ea4957/job-output.txt.gz#_2019-01-28_06_18_25_401045 [3] pypa/setuptools#1653 Change-Id: I8921639cc4a1edfa0ac9d46a7cc03549aa6189aa (cherry picked from commit 5989f40) (cherry picked from commit 71f6094)
Setuptools 40.7.0 introduced support for non-ascii chars in setup.cfg [1], which causes python2.7 based sphinx jobs to fail with str-unicode mismatch, e.g. with [2]: 'error: 'builder' must be a list of strings (got u'html,man') See issue [3]. Conflicts: global-requirements.txt [1] https://setuptools.readthedocs.io/en/latest/history.html#v40-7-0 [2] http://logs.openstack.org/periodic-stable/git.openstack.org/openstack/keystone/stable/queens/build-openstack-sphinx-docs/0ea4957/job-output.txt.gz#_2019-01-28_06_18_25_401045 [3] pypa/setuptools#1653 Change-Id: I8921639cc4a1edfa0ac9d46a7cc03549aa6189aa (cherry picked from commit 5989f40)
We have a tricky regression in Gentoo with setuptools release 40.7.0. This affects many (all?) packages that involve
build_ext
. These errors aren't present in 40.6.3. I think I managed to have reproducible steps:Can you reproduce on your side?
It the fix isn't obvious, I can try myself on a PR soon.
(by the way, this is due to distutils's
isinstance()
call being made onstr
rather thanbasestring
and only happens under py2.output_dir
is unicode when it should bestr
)The text was updated successfully, but these errors were encountered: