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

--pypi-mirror not respected during virtualenv creation after 2018.10.13 #3378

Closed
JacobHenner opened this issue Dec 14, 2018 · 4 comments · Fixed by #3298
Closed

--pypi-mirror not respected during virtualenv creation after 2018.10.13 #3378

JacobHenner opened this issue Dec 14, 2018 · 4 comments · Fixed by #3298
Labels
Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.

Comments

@JacobHenner
Copy link
Contributor

On Windows, versions of Pipenv > 2018.10.13 attempt to connect to https://pypi.org during virtualenv creation, even if --pypi-mirror is specified. This is a regression from 2018.10.13.

I've compared the network activity of 2018.10.13 and 11.14/11.26. For the latter two, connection attempts to pypi.org are made regardless of whether --pypi-mirror is specified. With 10.13, no such attempts are made.

This issue causes inconsistent timeouts and failures when a user is behind a firewall with a drop rule affecting pypi.org.

@jxltom
Copy link
Contributor

jxltom commented Dec 14, 2018

Which command are you exactly using, pipenv --python <x.y.z> --pypi-mirror?

This pypi mirror should be passed to virtualenv creation by

# --two / --three was passed…
if (state.python or state.three is not None) or state.site_packages:
ensure_project(
three=state.three,
python=state.python,
warn=True,
site_packages=state.site_packages,
pypi_mirror=state.pypi_mirror,
clear=state.clear,
)

@JacobHenner
Copy link
Contributor Author

I've tracked down the issue to a bug in vistir, which is preventing PIP_INDEX_URL from being set correctly before virtualenv is run. I'll resolve and submit a PR shortly.

@JacobHenner
Copy link
Contributor Author

JacobHenner commented Dec 14, 2018

Caused by sarugaku/vistir#55, which likely affects all instances of vistir.misc.run() which depend upon environment variables being specified as a parameter (only one instance with env specified).

@jxltom
Copy link
Contributor

jxltom commented Dec 14, 2018

👍

@jxltom jxltom added the Type: Vendored Dependencies This issue affects vendored dependencies within pipenv. label Dec 15, 2018
techalchemy added a commit that referenced this issue Jan 22, 2019
- Update gitignore entries for mypy config
- Update release task to add version after bumping but before release
- Fixes #3326 (going forward at least)
- Split out patching from vendoring so it can be done as a separate step
  if needed
- Update patches to account for updated packages
- Fixes #3432
- Fixes #2757
- Fixes #3305
- Fixes #2914
- Fixes #3439
- Fixes #3422
- Fixes #3378
- Fixes #3376
- Fixes #3315

Signed-off-by: Dan Ryan <dan@danryan.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants