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

Error after Poetry v1.1.0 update as default version #13

Closed
aljosa opened this issue Oct 5, 2020 · 10 comments · Fixed by python-poetry/poetry#3089 or #15
Closed

Error after Poetry v1.1.0 update as default version #13

aljosa opened this issue Oct 5, 2020 · 10 comments · Fixed by python-poetry/poetry#3089 or #15

Comments

@aljosa
Copy link

aljosa commented Oct 5, 2020

After Poetry upgrade my heroku deployment stopped working (deploy log attached), switching to previous version with heroku config:set POETRY_VERSION=1.0.10 works as expected:

Here is the output with the latest version:

remote: -----> Build succeeded!
remote: -----> Python Poetry app detected
remote: -----> No Poetry version specified in POETRY_VERSION config var. Defaulting to 1.1.0.
remote: -----> Generate requirements.txt with Poetry
remote: -----> Install Poetry
remote:        Retrieving Poetry metadata
remote:        
remote:        # Welcome to Poetry!
remote:        
remote:        This will download and install the latest version of Poetry,
remote:        a dependency and package manager for Python.
remote:        
remote:        It will add the `poetry` command to Poetry's bin directory, located at:
remote:        
remote:        $HOME/.poetry/bin
remote:        
remote:        This path will then be added to your `PATH` environment variable by
remote:        modifying the profile file located at:
remote:        
remote:        $HOME/.profile
remote:        
remote:        You can uninstall at any time by executing this script with the --uninstall option,
remote:        and these changes will be reverted.
remote:        
remote:        Installing version: 1.1.0
remote:          - Downloading poetry-1.1.0-linux.tar.gz (57.00MB)
remote:        
remote:        Poetry (1.1.0) is installed now. Great!
remote:        
remote:        To get started you need Poetry's bin directory ($HOME/.poetry/bin) in your `PATH`
remote:        environment variable. Next time you log in this will be done
remote:        automatically.
remote:        
remote:        To configure your current shell run `source $HOME/.poetry/env`
remote:        
remote: -----> Export requirements.txt from Poetry
remote: /app/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
remote:   "program uses threads.", RuntimeWarning)
remote: 
remote: Python 2.7 will no longer be supported in the next feature release of Poetry (1.2).
remote: You should consider updating your Python version to a supported one.
remote: 
remote: Note that you will still be able to manage Python 2.7 projects by using the env command.
remote: See https://python-poetry.org/docs/managing-environments/ for more information.
remote: 
remote: 
remote: IndexError
remote: 
remote: list index out of range
remote: -----> Export Python version from Poetry to Heroku runtime.txt file
remote: -----> Write 3.8.5 into runtime.txt
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !	Push rejected to heroku-example-app.
remote: 
@Inaldomarinho
Copy link

I have the same problem

@nextmat
Copy link

nextmat commented Oct 5, 2020

Same here, this is blocking deploys with multiple python versions.

@zyv
Copy link
Contributor

zyv commented Oct 5, 2020

Hi folks,

Sorry about that! It seems to be a bug in the latest version of Poetry - the export code for requirements.txt has been reworked and apparently git dependencies are no longer properly supported.

I have proposed a fix (see python-poetry/poetry#3089), but I didn't even have time to test it. If any of you have the capacity to help out, please bear with poetry maintainers. Sadly, our capacity is extremely limited at present.

If you need a workaround, please pin the poetry version as in #11 - this way you don't have to rely on our defaults and have it under your own control. Of course, this also means that you'll have to bump it later yourself when you see fit.

Z.

@zyv
Copy link
Contributor

zyv commented Oct 6, 2020

Blocked by python-poetry/poetry#3100.

@rvanlaar
Copy link

rvanlaar commented Oct 6, 2020

I don't have any git dependencies, it also wasn't a problem with the versions.
Heroku updated the version to 3.8.6. I did as well. didn't change it.

@zyv
Copy link
Contributor

zyv commented Oct 6, 2020

@rvanlaar our current plan is to wait for 1.1.2 and then bump the version in the buildpack again. You can always pin poetry to whatever version that works for you as described in the README.

@rvanlaar
Copy link

rvanlaar commented Oct 6, 2020

Thanks for the quick response.

I got it back to work.

I've pinned poetry to 1.1.1 and created the runtime.txt with contents: python-3.8.6

heroku config:set DISABLE_POETRY_CREATE_RUNTIME_FILE=1
heroku config:set POETRY_VERSION=1.1.1

@zyv
Copy link
Contributor

zyv commented Oct 7, 2020

FYI, we have bumped Poetry to 1.1.2 - requirements.txt generation now works, but there are still problems with our use cases, which we are still investigating. Apparently dependency versions are not resolved correctly for git dependencies with the new upgrade.

@zyv
Copy link
Contributor

zyv commented Oct 9, 2020

Hey folks,

We have hotfixed the support for nested VCS dependencies, since we don't know when the new version including a proper fix will be released. Hopefully everything is working for you now. At least all our use cases are now covered.

Sorry for the mess, I guess we've just got spoiled by Poetry released being well-tested and not causing too much breakage... but this major upgrade was quite a disaster :(

@nextmat
Copy link

nextmat commented Oct 9, 2020

Looks like a fix is imminent in python-poetry/poetry#3119.

@zyv thanks for the hotfix and everything you've done to get this sorted out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants