Hi Maris,
did you or Gary talk about the option following the deprecation warning and using hashlib instead of sha throughout lp? There's an example of a conditional import in:
lib/mailman/Mailman/Utils.py
Or temporarily suppressing the warning where it is currently used, so we don't introduce more? http://docs.python.org/library/warnings.html#temporarily-suppressing-warnings
Also, I'm not sure how the module regex is meant to work there... at least, it doesn't work in a console: {{{ In [1]: import warnings
In [2]: warnings.filterwarnings("ignore", category=DeprecationWarning, module="crypto")
In [3]: import sha /usr/bin/ipython:1: DeprecationWarning: the sha module is deprecated; use the hashlib module instead #!/usr/bin/python
In [4]: }}}
but this does:
{{{ In [1]: import warnings
In [2]: warnings.filterwarnings("ignore", category=DeprecationWarning, message="the sha module is deprecated")
In [3]: import sha
Thanks!
« Back to merge proposal
Hi Maris,
did you or Gary talk about the option following the deprecation warning and using hashlib instead of sha throughout lp? There's an example of a conditional import in:
lib/mailman/ Mailman/ Utils.py
Or temporarily suppressing the warning where it is currently used, so we don't introduce more? docs.python. org/library/ warnings. html#temporaril y-suppressing- warnings
http://
Also, I'm not sure how the module regex is meant to work there... at least, it doesn't work in a console:
{{{
In [1]: import warnings
In [2]: warnings. filterwarnings( "ignore" , category= DeprecationWarn ing, module="crypto")
In [3]: import sha
/usr/bin/ipython:1: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
#!/usr/bin/python
In [4]:
}}}
but this does:
{{{
In [1]: import warnings
In [2]: warnings. filterwarnings( "ignore" , category= DeprecationWarn ing, message="the sha module is deprecated")
In [3]: import sha
In [4]:
}}}
Thanks!