Skip to content

_check_hash breaks in pypy #597

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

Closed
hukka opened this issue Jul 10, 2012 · 3 comments
Closed

_check_hash breaks in pypy #597

hukka opened this issue Jul 10, 2012 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@hukka
Copy link

hukka commented Jul 10, 2012

Exception:
Traceback (most recent call last):
  File "/home/tpievila/work/pas/ingest-hg/.tox/pypy/site-packages/pip-1.1.post2-py2.7.egg/pip/basecommand.py", line 105, in main
    status = self.run(options, args)
  File "/home/tpievila/work/pas/ingest-hg/.tox/pypy/site-packages/pip-1.1.post2-py2.7.egg/pip/commands/install.py", line 255, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/tpievila/work/pas/ingest-hg/.tox/pypy/site-packages/pip-1.1.post2-py2.7.egg/pip/req.py", line 1022, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "/home/tpievila/work/pas/ingest-hg/.tox/pypy/site-packages/pip-1.1.post2-py2.7.egg/pip/req.py", line 1146, in unpack_url
    retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
  File "/home/tpievila/work/pas/ingest-hg/.tox/pypy/site-packages/pip-1.1.post2-py2.7.egg/pip/download.py", line 465, in unpack_http_url
    _check_hash(download_hash, link)
  File "/home/tpievila/work/pas/ingest-hg/.tox/pypy/site-packages/pip-1.1.post2-py2.7.egg/pip/download.py", line 326, in _check_hash
    if download_hash.name != link.hash_name:
AttributeError: 'HASH' object has no attribute 'name'

Minimal testcase of the difference between cpython and pypy:

$ pypy -c "import hashlib; print(hashlib.md5().name)"Traceback (most recent call last):
  File "app_main.py", line 51, in run_toplevel
  File "app_main.py", line 575, in run_it
  File "<string>", line 1, in <module>
AttributeError: 'HASH' object has no attribute 'name'
@hukka
Copy link
Author

hukka commented Jul 10, 2012

I guess that since PEP 247 doesn't mention the .name attribute, it isn't part of the public API even when it's not prefixed with _...

@pnasrat
Copy link
Contributor

pnasrat commented Jul 29, 2012

@dstufft wrote the hashlib code - Donald can you look at PEP 247 and fix this up so we can work on pypy

jezdez added a commit that referenced this issue Jul 29, 2012
@qwcode qwcode closed this as completed Aug 4, 2012
@pradyunsg pradyunsg removed !release blocker Hold a release until this is resolved labels Feb 8, 2019
@lock
Copy link

lock bot commented May 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

4 participants