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: 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: References: Date: Thu, 18 Sep 2014 13:18:36 -0600 Subject: Re: hashlib suddenly broken From: Larry Martell To: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Thu, Sep 18, 2014 at 10:47 AM, John Gordon wrote: > In Larry Martell 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.