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


Groups > comp.lang.python > #78037

Re: hashlib suddenly broken

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!81.171.88.16.MISMATCH!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'interpreter': 0.05; 'failing': 0.07; 'importerror:': 0.07; "'no": 0.09; 'deprecated': 0.09; 'name?': 0.09; 'try:': 0.09; 'def': 0.12; "'sha1'):": 0.16; "('sha1',": 0.16; '(pdb)': 0.16; '_sha': 0.16; '_sha.new': 0.16; 'googling': 0.16; 'hashlib': 0.16; 'imports': 0.16; 'sha1': 0.16; 'subject:broken': 0.16; 'wrote:': 0.18; 'module': 0.19; 'thu,': 0.19; 'import': 0.22; 'to:name:python-list@python.org': 0.22; 'module,': 0.24; 'rid': 0.24; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; 'larry': 0.31; 'os,': 0.31; 'sep': 0.31; 'writes:': 0.31; 'file': 0.32; 'maybe': 0.34; 'common': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'being': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'recent': 0.39; 'skip:_ 30': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'john': 0.61; 'name': 0.63; 'finally': 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=nRxFC/6oakfpA0HdOD+TLOmpvI8z7BjQ1NpYUzB1D8E=; b=arrdzOYAxs/fZIjpJU6/ZjcFvNBM8qaSg74Y59hfP1YtHn3rahMVa3QeP0R9bLCDYT vOyb22syVxT0ImFEEH8VihV1y1gSssVRJieGnSdp/h/vOqsPXM0Ck54/Bn+kM1/G0ZiW aclFf8SVOVlZ0s878fXVwi6dtiVmRsXFRDK1fy+r++OqY2Hmcl+asPGAVjDKjPNqhqwK ADInHP7f3cuBMxYB2pIJ0GgcXvChmdWIVBegHBjZIM1nMVkf+3XK0eLnxGCEjgSBdL5Y P3J/4H7/5Gtz7h1WgtfqVCFc8FK5hE2AMsPY2gkE1lYUQODKTy/2NIkmugf5+8Mzl7mJ mprQ==
MIME-Version 1.0
X-Received by 10.180.24.35 with SMTP id r3mr1141296wif.71.1411067916331; Thu, 18 Sep 2014 12:18:36 -0700 (PDT)
In-Reply-To <lvf2bv$j9q$1@reader1.panix.com>
References <mailman.14109.1411057681.18130.python-list@python.org> <lvf2bv$j9q$1@reader1.panix.com>
Date Thu, 18 Sep 2014 13:18:36 -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.14119.1411067922.18130.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1411067922 news.xs4all.nl 2974 [2001:888:2000:d::a6]:58204
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4182
X-Received-Body-CRC 4064218823
Xref csiph.com comp.lang.python:78037

Show key headers only | View raw


On Thu, Sep 18, 2014 at 10:47 AM, John Gordon <gordon@panix.com> wrote:
> In <mailman.14109.1411057681.18130.python-list@python.org> Larry Martell <larry.martell@gmail.com> writes:
>
>> Googling this showed that it's an issue with hashlib with a common
>> cause being a file called hashlib.py that gets in the way of the
>> interpreter finding the standard hashlib module, but that doesn't seem
>> to be the case:
>
> Perhaps hashlib imports some other module which has a local module of the
> same name?

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'



>
> SHA1 has been deprecated for some time.  Maybe a recent OS update finally
> got rid of it altogether?

I did not do an OS, or any other upgrade or install.

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