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

pipenv.utils.convert_deps_to_pip removed #417

Open
wRAR opened this issue Apr 11, 2022 · 3 comments
Open

pipenv.utils.convert_deps_to_pip removed #417

wRAR opened this issue Apr 11, 2022 · 3 comments

Comments

@wRAR
Copy link
Member

wRAR commented Apr 11, 2022

shub.deploy._get_pipfile_requirements() uses pipenv.utils.convert_deps_to_pip() which was moved to pipenv.utils.dependencies.convert_deps_to_pip() in the 2022.4.8 version and is also considered internal. See pypa/pipenv#5040

@elacuesta
Copy link
Member

#418 released with shub==2.14.1 as a workaround, let's keep this issue open as a task for replacing these functions with pipenv's public API.

@alepuccetti
Copy link

I am using shub==2.14.2 and when trying to deploy with a Pipfile I get this error:

File "~/.local/share/virtualenvs/my-project-4mAwm4Xi/lib/python3.9/site-packages/shub/deploy.py", line 193, in _get_pipfile_requirements
    return open(_add_sources(convert_deps_to_pip(deps), _sources=sources.encode(), tmpdir=tmpdir), 'rb')
  File "~/.local/share/virtualenvs/my-project-4mAwm4Xi/lib/python3.9/site-packages/shub/deploy.py", line 199, in _add_sources
    with open(_reqs_file, 'rb') as f:
TypeError: expected str, bytes or os.PathLike object, not list

I did some digging and it seems that convert_deps_to_pip(deps) returns a list into _reqs_file (fisrt argument of _add_sources) and this makes fail the open as in the error stack I provided above.
The error happen before reaching the cloud in the preparation stage. The only workaround I found was to create a requirements.txt file and run shub deploy using that file.

@elacuesta
Copy link
Member

Please try again with v2.14.3

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

No branches or pull requests

3 participants