dpl icon indicating copy to clipboard operation
dpl copied to clipboard

pypi deploy failing for python 2 with "SyntaxError: invalid syntax"

Open bcavagnolo opened this issue 4 years ago • 2 comments

Hello. My python deploy started failing recently. Here's an example: https://travis-ci.org/github/planetlabs/datalake/jobs/758113984

image

Poking around the dpl source, I suspect that the issue is that the mainline get-pip.py script recently dropped support for python 2. A solution is articulated here on stack overflow:

https://stackoverflow.com/questions/65866417/pip-install-failing-on-python2/65866547#65866547

Does dpl/travis intend to continue supporting shipping python 2 packages to pypi?

bcavagnolo avatar Feb 09 '21 15:02 bcavagnolo

After some experimentation I introduced a pretty deplorable work-around for this to unblock my immediate needs: https://github.com/planetlabs/datalake/commit/e755c918fca1bc00496e7fd0f14f05bda9a6b06f

The issue is here in the dpl source code: https://github.com/travis-ci/dpl/blob/master/lib/dpl/assets/pypi/install#L3

I created this pull request in an attempt to fix the problem: https://github.com/travis-ci/dpl/pull/1233

....but I suspect that I'm still missing something. Like, is there a travis image on which this script works? Or is there some configuration that points dpl to use a specific version of python?

bcavagnolo avatar Feb 18 '21 16:02 bcavagnolo

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

stale[bot] avatar Jan 08 '22 23:01 stale[bot]