From owner-freebsd-python@FreeBSD.ORG Sat Mar 8 07:28:48 2014 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A5E3DC; Sat, 8 Mar 2014 07:28:48 +0000 (UTC) Received: from forward2l.mail.yandex.net (forward2l.mail.yandex.net [84.201.143.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA1D85DF; Sat, 8 Mar 2014 07:28:47 +0000 (UTC) Received: from smtp4h.mail.yandex.net (smtp4h.mail.yandex.net [84.201.186.21]) by forward2l.mail.yandex.net (Yandex) with ESMTP id D2E281AC10A9; Sat, 8 Mar 2014 11:28:38 +0400 (MSK) Received: from smtp4h.mail.yandex.net (localhost [127.0.0.1]) by smtp4h.mail.yandex.net (Yandex) with ESMTP id 278432C3510; Sat, 8 Mar 2014 11:28:38 +0400 (MSK) Received: from unknown (unknown [178.76.234.16]) by smtp4h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iVRsFwgEul-SbbCVMeb; Sat, 8 Mar 2014 11:28:37 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: eab961ca-be74-4382-838a-8b9ed3d2c42d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1394263717; bh=/dAM8cBo0qllXr4O1uCZ7WJQ872NSyk3Sym6ItBK92A=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=nWEsThGjdhyZ2L2n1iCTp0Zf3teY4BJS2O2yP/QjdKOjxnkpuCIQQ1kcgCTMRN1++ J44ygI/YmLnC44mRVosObwX0o+qgQopdL5w8C3ExxgfrBt2cU63pB7KmuD71bwIE4n PA7TGQ5exPpmKQ1iocbnGmvhPCeCEPs8RiZ1SyXQ= Authentication-Results: smtp4h.mail.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <531AC686.7010200@yandex.ru> Date: Sat, 08 Mar 2014 11:28:06 +0400 From: Ruslan Makhmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Olivier Duchateau , Kubilay Kocak Subject: Re: security/py-cryptography broken References: <20140308050804.A430920106@smtp.hushmail.com> <531ABBE3.9080809@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Kenta S." , python@freebsd.org X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2014 07:28:48 -0000 Olivier Duchateau wrote on 08.03.2014 11:20: > 2014-03-08 7:42 GMT+01:00 Kubilay Kocak : >> On 8/03/2014 4:08 PM, Kenta S. wrote: >>> Trying to install deluge. >>> >>> ValueError: unsupported hash type sha512 >>> running build >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "setup.py", line 131, in >>> "test": PyTest, >>> File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup >>> dist.run_commands() >>> File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands >>> self.run_command(cmd) >>> File "/usr/local/lib/python2.7/distutils/dist.py", line 971, in run_command >>> cmd_obj.ensure_finalized() >>> File "/usr/local/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized >>> self.finalize_options() >>> File "setup.py", line 59, in finalize_options >>> from cryptography.hazmat.primitives import constant_time, padding >>> File "cryptography/hazmat/primitives/constant_time.py", line 25, in >>> """) >>> File "/usr/local/lib/python2.7/site-packages/cffi/api.py", line 102, in cdef >>> self._parser.parse(csource, override=override) >>> File "/usr/local/lib/python2.7/site-packages/cffi/cparser.py", line 154, in parse >>> self._internal_parse(csource) >>> File "/usr/local/lib/python2.7/site-packages/cffi/cparser.py", line 159, in _internal_parse >>> ast, macros = self._parse(csource) >>> File "/usr/local/lib/python2.7/site-packages/cffi/cparser.py", line 124, in _parse >>> ast = _get_parser().parse(csource) >>> File "/usr/local/lib/python2.7/site-packages/cffi/cparser.py", line 31, in _get_parser >>> _parser_cache = pycparser.CParser() >>> File "/usr/local/lib/python2.7/site-packages/pycparser/c_parser.py", line 103, in __init__ >>> tabmodule=yacctab) >>> File "/usr/local/lib/python2.7/site-packages/pycparser/ply/yacc.py", line 3065, in yacc >>> signature = pinfo.signature() >>> File "/usr/local/lib/python2.7/site-packages/pycparser/ply/yacc.py", line 2800, in signature >>> from md5 import md5 >>> File "/usr/local/lib/python2.7/md5.py", line 10, in >>> from hashlib import md5 >>> ImportError: cannot import name md5 >>> *** [do-build] Error code 1 >>> >>> Stop in /usr/ports/security/py-cryptography. >>> >>> ===>>> make failed for security/py-cryptography >>> ===>>> Aborting update >>> >> >> deluge depends on py-openssl, which since 0.14, uses py-cryptography >> >> Having said that, it looks like your Python installation doesnt have >> md5, which will be the root-cause of the issue above. >> >> You'll want to isolate why that is the case. > > It's strange, hashlib is standard module, and md5 needs to be imported > like that: > > from hashlib import md5 (see [1]) > > It's perhaps problem from deluge? Nah, it is using hashlib.md5() as grep suggests. And the whole thing is in ./deluge/ui/web/auth.py - md5() method is only used for authentication in web ui. -- Regards, Ruslan T.O.S. Of Reality