Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
pin --never-download to TRUE #412
Conversation
qwcode
reviewed
Mar 24, 2013
| As an alternative, you can provide your own versions of setuptools, | ||
| distribute and/or pip on the filesystem, and tell virtualenv to use | ||
| -those distributions instead of downloading them from the Internet. To | ||
| +those distributions instead of the ones in ``virtualenv_support``. To |
qwcode
Mar 24, 2013
Contributor
as we know, --extra-search-dir doesn't actually work as advertised. #327
pretty bad that we keep advertising this flag, and make people waste time on it.
pfmoore
Mar 24, 2013
Owner
Yea, that's one reason I hate depending on distribute_setup/ez_setup. If and when we install from wheels, this issue will go away, but until they you're right. (I had forgotten about this problem when I made this change, TBH).
|
can we add a test for this? |
qwcode
reviewed
Mar 24, 2013
| @@ -547,9 +547,7 @@ def _install_req(py_executable, unzip=False, distribute=False, | ||
| remove_from_env.append('PYTHONPATH') | ||
| elif never_download: |
qwcode
Mar 24, 2013
Contributor
what's to stop someone from setting --never-download to false?
and then it going out to pypi?
pfmoore
Mar 24, 2013
Owner
Is that possible? I didn't realise that :-( If that's the case, I'll have to rework the patch to ignore the actual value of --never-download. At which point, it might be worth just removing it and getting it over with. That would break scripts that set it, though, including at least one of mine, so I'm more reluctant to do that.
Update: it isn't possible to do so interactively, but maybe you can with environment variables or an ini file. And you certainly could in adjust_options. So I guess that needs changing.
|
I think any use of --never-download should trigger a deprecation warning and then a few versions later, we can remove it all together. |
|
Hmm, never mind, the travis build failed this time. Looks like the tests force (and rely on) never_download=True. I'd happily argue that that's a failure in the tests, but that doesn't mean much, it still needs fixing. I'll have to have a deeper look at this. Regarding your suggestion of a DeprecationWarning. I'm not sure that'd help much (it's suppressed by default, so no users would ever see it, and virtualenv isn't the sort of thing other projects use and test with warnings enabled...). I'm not against a deprecation policy for pip/virtualenv, but I didn't think we had one (and certainly not one this strict) at the moment. That's something that should be discussed on the list, IMO. I think I'll probably end up abandoning this idea, at least for 1.10... |
|
no reason to abandon this it seems to me? those 2 "tests" in .travis.yml that are executing an isolated "bin/virtualenv.py" can just go away. no, there's no overt deprecation policy. details aside on how to implement it, the point would be for users to actually see a warning about the option going away in the future (and that it does nothing now). It could just a be a logger.warn message. |
|
OK, I was misreading the test code. I see the bit you mean in travis.yml - I've removed those tests as you suggest. I've added a warning. For now I've just bothered about cases where the user tries (somehow) to force False, and said the option is for backward compatibility only and cannot be set to False. Next release, we can warn on any use (if I can work out how to implement that :-)) and then we can remove it after a suitable period. BTW, what is the process for updating news.rst? Should I change it as part of this pull request? Or is it updated in the release process (which would involve less merge conflicts, but would add work to the release)? |
|
lgtm. Merge +1. add a test? |
|
Update news and just merge - people have few enough cycles to leave pending PR's we think are good hanging up. |
added a commit
that referenced
this pull request
Mar 30, 2013
pfmoore
merged commit a185de7
into
pypa:develop
Mar 30, 2013
1 check passed
|
@pnasrat, this pull is more controversial than normal, hence the idea of waiting for more votes. it was unclear that everyone wanted to do this. |
|
Nevertheless, I doubt I'm going to get any more comments by just waiting, so I've merged it. If anyone's using the dev version, let's see what they say. Otherwise, we can deal with feedback when it's released. People who need downloaded versions can still download manually, after all. |
|
I was going to shout out for more votes as the current pip/virtualenv milestones got more full. |
pfmoore commentedMar 24, 2013
pin --never-download to TRUE
attempting to use virtualenv.py in isolation will fail