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: 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: References: Date: Thu, 18 Sep 2014 15:30:22 -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: 1411075823 news.xs4all.nl 2976 [2001:888:2000:d::a6]:37682 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78046 On Thu, Sep 18, 2014 at 2:21 PM, John Gordon wrote: > In Larry Martell 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.