From owner-freebsd-python@FreeBSD.ORG Wed Jul 15 13:30:04 2009 Return-Path: Delivered-To: freebsd-python@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32AA0106564A for ; Wed, 15 Jul 2009 13:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 201558FC20 for ; Wed, 15 Jul 2009 13:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6FDU3OI060435 for ; Wed, 15 Jul 2009 13:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6FDU3Qm060430; Wed, 15 Jul 2009 13:30:03 GMT (envelope-from gnats) Date: Wed, 15 Jul 2009 13:30:03 GMT Message-Id: <200907151330.n6FDU3Qm060430@freefall.freebsd.org> To: freebsd-python@FreeBSD.org From: Keith Gaughan Cc: Subject: Re: ports/135832: security/py-pycrypto: Deprecation warnings when used with Python 2.6. X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Keith Gaughan List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 13:30:04 -0000 The following reply was made to PR ports/135832; it has been noted by GNATS. From: Keith Gaughan To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/135832: security/py-pycrypto: Deprecation warnings when used with Python 2.6. Date: Wed, 15 Jul 2009 13:59:25 +0100 The patch that I provided is actually a *backport* from the current development version of PyCrypto (as evidenced by the link I provided to its git repository), so it's safe to say that the PyCrypto developers themselves consider it to be safe and good. The patch doesn't actually do any warning suppression. What it does is first try the non-deprecated method of using hashlib (which works in and is recommended for Python 2.5 and after), and then, if that fails (i.e. in pre-2.5 version of Python), it uses the old deprecated (see PEP-0004) method of importing the md5 and sha modules instead. Because quite a bit of code out there uses PyCrypto, requiring the use of 2.5 would probably cause more trouble than good. -- Keith Gaughan - kmgaughan@eircom.net - http://talideon.com/ - CF9F6473 With Age comes Wisdom--but sometimes Age travels alone.