-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Jenkins node 4 has problem with Python 3.6 and locales #642
Comments
Not sure how to proceed debugging. |
This replaces the buildout.requirements extension. Good points for this extension: - It is a proper buildout extension. Bad points for this extension: - It cannot be run standalone: it only gathers information while buildout is running. - It ignores version pins for packages that buildout does not use in this run: if you run `bin/buildout install part1`, then version pins for other parts are ignored. - On Jenkins node 4 with Python 3.6 the package is broken. #642 Good points for the new script: - It can be run as a standalone script. You just need any Python with any zc.buildout version. - It is fast: it takes maybe two seconds. - It reports *all* version pins, not just the ones that got installed. Bad points for the new script: - It is not a proper buildout extension. We want to run it from buildout, so we need a separate section/part for it, using plone.recipe.command (which is even older than buildout.requirements, though it works fine on Python 3). But it should be fairly easy to turn this into an extension (or recipe). - It is hardcoded to read `buildout.cfg`, including its extends. Should be easy enough to make this configurable with argparse/optparse/whatever. Script adapted from: https://gist.github.com/mauritsvanrees/c47e974e418c707a626200cb6561405b See also https://community.plone.org/t/creating-constraints-and-requirements-from-buildout-config/10296 We cannot use configparser, because buildout configs contain 'duplicate' options: $ grep -i chameleon versions.cfg Chameleon = 3.6.2 chameleon = 3.6.2 So we use the buildout configparser. Bonus: we automatically use the section expressions, like `[versions:python27]`. So the end result of running this script can be different per Python version. That is something to remember.
This replaces the buildout.requirements extension. Good points for this extension: - It is a proper buildout extension. Bad points for this extension: - It cannot be run standalone: it only gathers information while buildout is running. - It ignores version pins for packages that buildout does not use in this run: if you run `bin/buildout install part1`, then version pins for other parts are ignored. - On Jenkins node 4 with Python 3.6 the package is broken. #642 Good points for the new script: - It can be run as a standalone script. You just need any Python with any zc.buildout version. - It is fast: it takes maybe two seconds. - It reports *all* version pins, not just the ones that got installed. Bad points for the new script: - It is not a proper buildout extension. We want to run it from buildout, so we need a separate section/part for it, using plone.recipe.command (which is even older than buildout.requirements, though it works fine on Python 3). But it should be fairly easy to turn this into an extension (or recipe). - It is hardcoded to read `buildout.cfg`, including its extends. Should be easy enough to make this configurable with argparse/optparse/whatever. Script adapted from: https://gist.github.com/mauritsvanrees/c47e974e418c707a626200cb6561405b See also https://community.plone.org/t/creating-constraints-and-requirements-from-buildout-config/10296 We cannot use configparser, because buildout configs contain 'duplicate' options: $ grep -i chameleon versions.cfg Chameleon = 3.6.2 chameleon = 3.6.2 So we use the buildout configparser. Bonus: we automatically use the section expressions, like `[versions:python27]`. So the end result of running this script can be different per Python version. That is something to remember.
I have removed the Eventually, like spoken about in that PR, |
This replaces the buildout.requirements extension. Good points for this extension: - It is a proper buildout extension. Bad points for this extension: - It cannot be run standalone: it only gathers information while buildout is running. - It ignores version pins for packages that buildout does not use in this run: if you run `bin/buildout install part1`, then version pins for other parts are ignored. - On Jenkins node 4 with Python 3.6 the package is broken. #642 Good points for the new script: - It can be run as a standalone script. You just need any Python with any zc.buildout version. - It is fast: it takes maybe two seconds. - It reports *all* version pins, not just the ones that got installed. Bad points for the new script: - It is not a proper buildout extension. We want to run it from buildout, so we need a separate section/part for it, using plone.recipe.command (which is even older than buildout.requirements, though it works fine on Python 3). But it should be fairly easy to turn this into an extension (or recipe). - It is hardcoded to read `buildout.cfg`, including its extends. Should be easy enough to make this configurable with argparse/optparse/whatever. Script adapted from: https://gist.github.com/mauritsvanrees/c47e974e418c707a626200cb6561405b See also https://community.plone.org/t/creating-constraints-and-requirements-from-buildout-config/10296 We cannot use configparser, because buildout configs contain 'duplicate' options: $ grep -i chameleon versions.cfg Chameleon = 3.6.2 chameleon = 3.6.2 So we use the buildout configparser. Bonus: we automatically use the section expressions, like `[versions:python27]`. So the end result of running this script can be different per Python version. That is something to remember.
Found it I think. The same problem happens with
I can reproduce this locally on my Mac. I have this in a shell:
With that it works fine on all Python versions (specifically 2.7, 3.6, 3.7). When I call
So on Jenkins node 4, some locale settings should be configured.
Meanwhile, I will make a PR for |
It seems it is like that since quite some time:
I anyway ran:
|
Branch: refs/heads/master Date: 2020-03-10T11:37:59+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.dexterity@7ccb5a0 Fixed package install error with Python 3.6 without system locale. See #642 (comment) Files changed: A news/642.bugfix M setup.py Repository: plone.dexterity Branch: refs/heads/master Date: 2020-03-10T15:12:23+01:00 Author: Maurits van Rees (mauritsvanrees) <m.van.rees@zestsoftware.nl> Commit: plone/plone.dexterity@b61d09f Merge pull request #128 from plone/maurits/fix-long-description-on-py36 Fixed package install error with Python 3.6 without system locale. Files changed: A news/642.bugfix M setup.py
Well, the Dutch locale is not needed, it was just meant as an example of how to set locales. But anyway, it looks okay. So maybe there is something else that unsets these variables at some point. But I have merged the two PRs ( |
Branch: refs/heads/master Date: 2020-03-10T15:57:47+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.outputfilters@f18f90b Fixed possible package install error with Python 3.6 when no system locale is set. See #642 (comment) Files changed: M CHANGES.rst M setup.py
Needed to fix the hopefully last problems on Jenkins node 4 with Python 3.6, which seems to have no locale setting. See #642 (comment) Sample traceback (local): ``` While: Installing releaser. Traceback (most recent call last): File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 2174, in main getattr(buildout, command)(args) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 817, in install installed_files = self[part]._call(recipe.install) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 1603, in _call return f() File "/Users/maurits/shared-eggs/cp36m/zc.recipe.egg-2.0.7-py3.6.egg/zc/recipe/egg/egg.py", line 263, in install relative_paths=self._relative_paths, File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1219, in scripts _distutils_script(spath, sname, contents, initialization, rpsetup) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1346, in _distutils_script return _create_script(contents, dest) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1384, in _create_script f.write(contents) UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 96: ordinal not in range(128) ``` This is while generating the `bin/rst2html5.py` script, which fails because it contains this text: Copyright: © 2015 Günter Milde.
Needed to fix the hopefully last problems on Jenkins node 4 with Python 3.6, which seems to have no locale setting. See #642 (comment) Sample traceback (local): ``` While: Installing releaser. Traceback (most recent call last): File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 2174, in main getattr(buildout, command)(args) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 817, in install installed_files = self[part]._call(recipe.install) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 1603, in _call return f() File "/Users/maurits/shared-eggs/cp36m/zc.recipe.egg-2.0.7-py3.6.egg/zc/recipe/egg/egg.py", line 263, in install relative_paths=self._relative_paths, File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1219, in scripts _distutils_script(spath, sname, contents, initialization, rpsetup) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1346, in _distutils_script return _create_script(contents, dest) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1384, in _create_script f.write(contents) UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 96: ordinal not in range(128) ``` This is while generating the `bin/rst2html5.py` script, which fails because it contains this text: Copyright: © 2015 Günter Milde.
Update: there are still more packages that give problems.
Okay, that actually seems to be the last one. I have cleaned my egg cache locally, and with the above, it all works again. |
Branch: refs/heads/master Date: 2020-03-10T16:02:28+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.restapi@344c4f8 Fixed package install error with Python 3.6 without locale. See #642 (comment) Files changed: A news/642.bugfix M setup.py Repository: plone.restapi Branch: refs/heads/master Date: 2020-03-10T18:14:46+01:00 Author: Maurits van Rees (mauritsvanrees) <m.van.rees@zestsoftware.nl> Commit: plone/plone.restapi@5e50f5b Merge pull request #879 from plone/maurits/fix-long-description-on-py36 Fixed package install error with Python 3.6 without locale. Files changed: A news/642.bugfix M setup.py
Branch: refs/heads/master Date: 2020-03-10T16:51:13+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.robotframework@f61bcc7 Fixed package install error with Python 3.6 without locale. See #642 (comment) Files changed: A news/642.bugfix M setup.py Repository: plone.app.robotframework Branch: refs/heads/master Date: 2020-03-10T18:15:16+01:00 Author: Maurits van Rees (mauritsvanrees) <m.van.rees@zestsoftware.nl> Commit: plone/plone.app.robotframework@fb810e8 Merge pull request #119 from plone/maurits/jenkins-node-4-py36 Fixed package install error with Python 3.6 without locale. Files changed: A news/642.bugfix M setup.py
Needed to fix the hopefully last problems on Jenkins node 4 with Python 3.6, which seems to have no locale setting. See #642 (comment) Sample traceback (local): ``` While: Installing releaser. Traceback (most recent call last): File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 2174, in main getattr(buildout, command)(args) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 817, in install installed_files = self[part]._call(recipe.install) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 1603, in _call return f() File "/Users/maurits/shared-eggs/cp36m/zc.recipe.egg-2.0.7-py3.6.egg/zc/recipe/egg/egg.py", line 263, in install relative_paths=self._relative_paths, File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1219, in scripts _distutils_script(spath, sname, contents, initialization, rpsetup) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1346, in _distutils_script return _create_script(contents, dest) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1384, in _create_script f.write(contents) UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 96: ordinal not in range(128) ``` This is while generating the `bin/rst2html5.py` script, which fails because it contains this text: Copyright: © 2015 Günter Milde.
Needed to fix the hopefully last problems on Jenkins node 4 with Python 3.6, which seems to have no locale setting. See #642 (comment) Sample traceback (local): ``` While: Installing releaser. Traceback (most recent call last): File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 2174, in main getattr(buildout, command)(args) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 817, in install installed_files = self[part]._call(recipe.install) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/buildout.py", line 1603, in _call return f() File "/Users/maurits/shared-eggs/cp36m/zc.recipe.egg-2.0.7-py3.6.egg/zc/recipe/egg/egg.py", line 263, in install relative_paths=self._relative_paths, File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1219, in scripts _distutils_script(spath, sname, contents, initialization, rpsetup) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1346, in _distutils_script return _create_script(contents, dest) File "/Users/maurits/community/plone-coredev/py3/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1384, in _create_script f.write(contents) UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 96: ordinal not in range(128) ``` This is while generating the `bin/rst2html5.py` script, which fails because it contains this text: Copyright: © 2015 Günter Milde.
Checked: all PRs have been merged last month, and I have not seen the problem anymore. Closing the issue. |
See for example this Plone 5.2 Python 3.6 job:
This is because the
setup.py
of this package reads aCONTRIBUTORS.rst
which contains non-ascii code. But locally I can read it just fine with Python 3.6. And usually Jenkins has no problems with it either.Any idea?
I am half inclined to just remove it in the Jenkins config, if possible.
The text was updated successfully, but these errors were encountered: