Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

support pip 7, where 'use_wheel' doesn't exist #94

Merged
merged 3 commits into from
Dec 3, 2015

Conversation

kouk
Copy link
Contributor

@kouk kouk commented May 26, 2015

No description provided.

@@ -104,6 +104,11 @@ def iter(self, ret, *args, **kwargs):

DownloadProgressBar = DownloadProgressSpinner = NullProgressBar

try:
from pip.index import FormatControl # 7.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the comment here to # noqa to silence the flake8 unused import warning. (And perhaps move the 7.0 comment to the next line).

@edmorley
Copy link
Contributor

Ah raced the PR update :-)

@kouk
Copy link
Contributor Author

kouk commented May 26, 2015

;-)

@erikrose
Copy link
Owner

Doesn't look like the tests pass under pip 7.0.1. I added 7.0 and 7.0.1 to the tox setup, and this happens:

tox -e py27-pip701

======================================================================
ERROR: If a hash matches, peep should do its work and exit happily.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 291, in test_success
    useless==1.0""")
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 267, in install_from_string
    return cls.install_from_path(reqs_path)
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 243, in install_from_path
    local=cls.index_url())
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 106, in run
    shell=True)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command 'python /Users/erose/Checkouts/peep/peep.py install -r /var/folders/39/cttgwlvj0rs_73t1z11pltrm0000gn/T/peep-WrGLGa/reqs.txt --index-url http://localhost:8001/' returned non-zero exit status 1

======================================================================
ERROR: Like test_success but with index argument in requirements.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 301, in test_success_req_index
    useless==1.0""")
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 279, in install_from_string_with_index
    return cls.install_from_path_no_index(reqs_path)
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 256, in install_from_path_no_index
    reqs=reqs_path)
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 106, in run
    shell=True)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command 'python /Users/erose/Checkouts/peep/peep.py install -r /var/folders/39/cttgwlvj0rs_73t1z11pltrm0000gn/T/peep-fv7p22/reqs.txt --no-index' returned non-zero exit status 1

======================================================================
ERROR: Make sure peep installing a GitHub-sourced tarball installs it,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 341, in test_upgrade
    index_url=self.index_url()))
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 267, in install_from_string
    return cls.install_from_path(reqs_path)
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 243, in install_from_path
    local=cls.index_url())
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 106, in run
    shell=True)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command 'python /Users/erose/Checkouts/peep/peep.py install -r /var/folders/39/cttgwlvj0rs_73t1z11pltrm0000gn/T/peep-199BxH/reqs.txt --index-url http://localhost:8001/' returned non-zero exit status 1

======================================================================
FAIL: Make sure various permutations of inline comments are parsed
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 385, in test_inline_comments
    ['t9XWiL3TRb-ol3d9KXdWaIzwLhs3QsVoheLlwrmW_4I'])
AssertionError: [] != ['t9XWiL3TRb-ol3d9KXdWaIzwLhs3QsVoheLlwrmW_4I']

======================================================================
FAIL: Non-hash or malformed hash comments should be ignored.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 407, in test_non_hash_comments
    eq_(reqs[1]._expected_hashes(), ['abc'])
AssertionError: [] != ['abc']

======================================================================
FAIL: Make sure trailing whitespace is stripped from hashes.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/erose/Checkouts/peep/tests/__init__.py", line 419, in test_whitespace_stripping
    eq_(reqs[0]._expected_hashes(), ['trailing_space_should_be_stripped'])
AssertionError: [] != ['trailing_space_should_be_stripped']

----------------------------------------------------------------------
Ran 9 tests in 3.369s

FAILED (errors=3, failures=3)

@kouk
Copy link
Contributor Author

kouk commented Jun 3, 2015

Yes, as @glogiotatidis explained in #97 there were further incompatibilities. He proposed a fix in that PR, however I went with a different implementation in my last commit here.

@edmorley
Copy link
Contributor

edmorley commented Jul 8, 2015

@erikrose do you have an opinion re this vs #97?
Would be good to support pip 7.x soon :-)

@indygreg
Copy link

Some of my servers are starting to pick up pip 7 via system packaging and this bug is causing more and more headaches to work around. Is there any way I can help move this forward?

@@ -104,6 +104,13 @@ def iter(self, ret, *args, **kwargs):

DownloadProgressBar = DownloadProgressSpinner = NullProgressBar

try:
from pip.index import FormatControl # noqa
format_control_arg = 'format_control'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose these should both be CONSTANTS, or neither should.

@erikrose erikrose mentioned this pull request Dec 2, 2015
@erikrose erikrose merged commit be6437e into erikrose:master Dec 3, 2015
erikrose added a commit that referenced this pull request Dec 3, 2015
As part of the merge, had to move kouk's clever new stuff into a top-level function, which is where the `peep port` work moved hashes_above().
@erikrose
Copy link
Owner

erikrose commented Dec 3, 2015

Belated thanks for this nifty patch, kouk! Peep 2.5 is out, with your fix.

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

Successfully merging this pull request may close these issues.

4 participants