Re: switch certmaster to hashlib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 10 Mar 2010 14:39:49 -0500 (EST)
Seth Vidal <skvidal@xxxxxxxxxxxxxxxxx> wrote:

> 
> 
> On Tue, 9 Mar 2010, Greg Swift wrote:
> 
> > 
> > On Tue, Mar 9, 2010 at 17:00, Francois Cami <fcami@xxxxxxxxxxxxxxxxx> wrote:
> >       The sha module is deprecated in Python 2.6.
> >       This (trivial) patch switches to the hashlib module (new in 2.5).
> > 
> > 
> > What about support for RHEL4 and 5, python 2.3 and 2.4 respectively?
> > 
> > I'm going to reply to your patch with a patch that is an optional way of 
> > handling it based on the changes you suggested.  I realize it may not be 
> > best. -greg

Indeed, my patch left out RHEL5. However, hashlib.new() takes
the string name of the desired algorithm as parameter, so I do
not think hashlib.new() can work at all.

>>> import hashlib
>>> test = hashlib.new()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __hash_new() takes at least 1 argument (0 given)

> well python-hashlib is available in fedora epel.

Oh cool.

> We could just add a requirement for that to the certmaster pkg in epel.

We could either:
* apply the first patch and depend on python-hashlib in epel
* leave certmaster as is, but I'd like to avoid the deprecated messages,
  and be ready for future Python releases
* use a kludge as front-end for both Python modules (shudder).

François

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list


[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux