Mac OSX 10.6 (Snow Leopard) Deprecation Warnings
Keith Irwin
keith.irwin at gmail.com
Wed Sep 30 02:40:18 BST 2009
On Sep 29, 2009, at 6:18 PM, John Arbash Meinel wrote:
> -----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?
Bazaar (bzr) 2.0.0
Python interpreter: /usr/bin/python2.6 2.6.1
Python standard library: /System/Library/Frameworks/
Python.framework/Versions/2.6/lib/python2.6
Platform: Darwin-10.0.0-i386-64bit
bzrlib: /Library/Python/2.6/site-packages/bzrlib
Bazaar configuration: /Users/kirwin/.bazaar
Bazaar log file: /Users/kirwin/.bzr.log
> Does this only happen when accessing bzr+ssh/sftp locations? Or does
> it
> give the warning always?
Only when using SFTP.
For instance, bzr diff and bzr status doesn't cause probs.
Keith
> 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