I submitted a PR recently to add conditionals for applying the
role in the
configuration project (https://github.com/edx/configuration/pull/5652), but I just want to report how I noticed
this role was being run in the first place. There is a dependency on the
s3cmd package, version 1.6.1, which contains Python 2 code (a print statement
without parentheses) that generates the following exception (excerpted here from
the Ansible output and reformatted):
ERROR: Command errored out with exit status 1: command: /tmp/edx_config/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv = '"'"'/tmp/pip-install-y5_h4n1b/s3cmd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-y5_h4n1b/s3cmd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-y5_h4n1b/s3cmd/pip-egg-info cwd: /tmp/pip-install-y5_h4n1b/s3cmd/ Complete output (6 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-y5_h4n1b/s3cmd/setup.py", line 18 print "Using xml.etree.ElementTree for XML processing" ^ SyntaxError: Missing parentheses in call to 'print'
Here is where it’s pinned in the
setup.py file from version 1.6.1, clearly Python 2:
I didn’t know whether to submit a PR for this because I’m not sure how this
utility fits in with your architecture and what it would mean for you to upgrade
it. We don’t use the
aws Ansible role in MITx, but I just wanted to pass this
Let me know if I should cross-post this, too.