Mac OSX 10.6 (Snow Leopard) Deprecation Warnings
John Arbash Meinel
john at arbash-meinel.com
Wed Sep 30 02:18:38 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Keith Irwin wrote:
> Folks--
>
> I installed BZR 2.0 via the Snow Leopard Installer this morning and now
> when I interact with SFTP (for instance, pushing to a remote server, or
> doing a "missing" or something), I get the following:
>
> /Library/Python/2.6/site-packages/Crypto/Hash/SHA.py:6:
> DeprecationWarning: the sha module is deprecated; use the hashlib module
> instead
> from sha import *
> /Library/Python/2.6/site-packages/Crypto/Hash/MD5.py:6:
> DeprecationWarning: the md5 module is deprecated; use hashlib instead
> from md5 import *
>
> Any advice on how to get rid of these messages? I can hack up the Python
> mods, but that doesn't seem like an especially good idea.
>
> Is there some way that the BZR installer, or code base, can be adjusted
> to use the new libs, or something?
>
> Keith
>
This is, unfortunately, from the Pycrypto code.
https://bugs.launchpad.net/pycrypto/+bug/269429
They haven't released their fix yet.
What surprises me, though, is at the beginning of bzrlib.commands.main()
we do:
# Is this a final release version? If so, we should suppress warnings
if bzrlib.version_info[3] == 'final':
suppress_deprecation_warnings(override=False)
which does:
warnings.filterwarnings('ignore', category=DeprecationWarning)
Which (afaict) should suppress all deprecation warnings. So I'm
wondering how we are encountering these.
Can you tell me what 'bzr --version' gives you?
Does this only happen when accessing bzr+ssh/sftp locations? Or does it
give the warning always?
There is a possibility of trying to suppress the deprecation warnings
even earlier (say in the 'bzr' script), but we sort of need to track
down why the current suppression isn't catching them.
Of course, ideally pycrypto would release their fix and we would bundle
the new code..
I suppose another alternative is to have the person who did the
packaging patch their own copy of pycrypto:
http://gitweb.pycrypto.org/?p=crypto/pycrypto-2.0.x.git;a=commitdiff;h=d2311689910240e425741a546576129f4c9735e2
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkrCse4ACgkQJdeBCYSNAAMDOgCgsv048My0XrB5CFAJi9Len6i8
/04AoNU5DUdnsIk2LLQvMUCqas5/fkm3
=MY53
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list