Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78046

Re: hashlib suddenly broken

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <larry.martell@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'failing': 0.07; 'importerror:': 0.07; 'versions.': 0.07; "'no": 0.09; 'system?': 0.09; 'try:': 0.09; 'valueerror:': 0.09; 'python': 0.11; 'def': 0.12; "%s'": 0.16; "'sha1'):": 0.16; "('sha1',": 0.16; '(pdb)': 0.16; '_sha': 0.16; '_sha.new': 0.16; 'importerror': 0.16; 'modified.': 0.16; 'name)': 0.16; 'sha1': 0.16; 'skip:" 80': 0.16; 'subject:broken': 0.16; 'valueerror': 0.16; 'wrote:': 0.18; 'module': 0.19; 'differ': 0.19; 'thu,': 0.19; 'appears': 0.22; 'import': 0.22; 'to:name:python-list@python.org': 0.22; 'error': 0.23; 'initial': 0.24; 'versions': 0.24; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'raise': 0.29; 'originally': 0.30; 'message-id:@mail.gmail.com': 0.30; 'larry': 0.31; 'sep': 0.31; 'writes:': 0.31; 'file': 0.32; 'checked': 0.32; 'could': 0.34; 'no,': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'two': 0.37; 'level': 0.37; 'expected': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'skip:_ 30': 0.39; 'reported': 0.39; 'to:addr:python.org': 0.39; 'lower': 0.61; 'full': 0.61; 'john': 0.61; 'name': 0.63; 'different': 0.65
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=nzUdEGIwC1K20MYZO0r6rZohQWqwd0zECY9qMetY0DQ=; b=GUS+pdX7cxLqoq+E8Eu0KA94SV4NDNJjQ1o9lOOtqcojySFUmSu+gZ0EDUaLAyiy5n nXja9EAbKamStq3eSMM+bsyJXkCviVIWnnMGaZkZBS8rcTs5SBmxL5e2aZRkNhX585Tv JqoK93Zvs/3Q5kHPo1Pu8i1ChF2T3sboGNhgnbbD4SDVPPZLY80ofRqjy1QP94HCfqUN ygPmDg0qRN2ishOSzT4+M4/w7JwIbEu6FjuR3QsdZek+Z7x+wBLedZct0ZOae53W/gHq 2FIL4rdxdJTdgJ/B4JcpCQcm/hNf/x3dycBX0gOgmsKPPyon/WkXw2vCVgN3PAot2/b3 o9Ww==
MIME-Version 1.0
X-Received by 10.194.78.243 with SMTP id e19mr6150626wjx.119.1411075822640; Thu, 18 Sep 2014 14:30:22 -0700 (PDT)
In-Reply-To <lvferq$j1q$1@reader1.panix.com>
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 Thu, 18 Sep 2014 15:30:22 -0600
Subject Re: hashlib suddenly broken
From Larry Martell <larry.martell@gmail.com>
To "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14126.1411075823.18130.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1411075823 news.xs4all.nl 2976 [2001:888:2000:d::a6]:37682
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:78046

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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