Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78046
| References | <mailman.14109.1411057681.18130.python-list@python.org> <lvf2bv$j9q$1@reader1.panix.com> <mailman.14119.1411067922.18130.python-list@python.org> <lvferq$j1q$1@reader1.panix.com> |
|---|---|
| Date | 2014-09-18 15:30 -0600 |
| Subject | Re: hashlib suddenly broken |
| From | Larry Martell <larry.martell@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14126.1411075823.18130.python-list@python.org> (permalink) |
On Thu, Sep 18, 2014 at 2:21 PM, John Gordon <gordon@panix.com> wrote:
> In <mailman.14119.1411067922.18130.python-list@python.org> Larry Martell <larry.martell@gmail.com> writes:
>
>> It's failing on the 'import _sha' in hashlib.py:
>
>> 66 def __get_builtin_constructor(name):
>> 67 try:
>> 68 if name in ('SHA1', 'sha1'):
>> 69 -> import _sha
>> 70 return _sha.new
>
>> (Pdb) s
>> ImportError: 'No module named _sha'
>
> This appears to differ from the error you originally reported:
>
>> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py",
>> line 91, in __get_builtin_constructor
>> raise ValueError('unsupported hash type %s' % name)
>> ValueError: unsupported hash type sha1
It's the lower level error that triggers the initial error I reported.
The ImportError is caught and the ValueError is reported.
> Could there be two different versions of hashlib.py on your system?
No, I checked and there is only the ones for the various python
versions. And none that were recently installed or modified. And you
can see the full path reported by python is the expected one.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-18 10:27 -0600
Re: hashlib suddenly broken John Gordon <gordon@panix.com> - 2014-09-18 16:47 +0000
Re: hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-18 13:18 -0600
Re: hashlib suddenly broken John Gordon <gordon@panix.com> - 2014-09-18 20:21 +0000
Re: hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-18 15:30 -0600
Re: hashlib suddenly broken Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-19 03:07 +1000
Re: hashlib suddenly broken Chris Angelico <rosuav@gmail.com> - 2014-09-19 03:18 +1000
Re: hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-18 13:22 -0600
Re: hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-18 13:23 -0600
Re: hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-18 13:46 -0600
Re: hashlib suddenly broken Ned Deily <nad@acm.org> - 2014-09-18 13:44 -0700
Re: hashlib suddenly broken Christian Heimes <christian@python.org> - 2014-09-18 22:49 +0200
Re: hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-18 15:38 -0600
Re: hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-18 15:39 -0600
Re: hashlib suddenly broken Christian Heimes <christian@python.org> - 2014-09-19 00:17 +0200
Re: hashlib suddenly broken Ned Deily <nad@acm.org> - 2014-09-18 15:19 -0700
Re: hashlib suddenly broken Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-19 15:00 +1000
Re: hashlib suddenly broken Larry Martell <larry.martell@gmail.com> - 2014-09-19 09:09 -0600
csiph-web