magalbraith / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

Remove md5-related deprecation warning #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Import the twitter module from an script or interactive console
2. See the deprecation warning

What is the expected output? What do you see instead?

No warning showed!

What version of the product are you using? On what operating system?

Python 2.6 on Mac OS X via MacPorts

Please provide any additional information below.

This will happen in every Python 2.6 installation.

Original issue reported on code.google.com by gnr...@gmail.com on 1 May 2009 at 10:40

Attachments:

GoogleCodeExporter commented 9 years ago
To eliminate this warning change:
line 10: "import md5" -> "import hashlib"
line 1516: "hashed_key = md5.new(key).hexdigest()" -> "temp =
hashlib.md5.update(key)" + "hashed_key = temp.digest()"

This replaces the deprecated md5 with the current hashlib functionality that 
performs
the same thing.

Original comment by jostend...@gmail.com on 3 May 2009 at 5:23

GoogleCodeExporter commented 9 years ago
The proper patch seems to be this one.

I've tested with Python 2.5 and Python 2.6 (on Leopard) and it works

Original comment by gnr...@gmail.com on 3 May 2009 at 6:33

Attachments:

GoogleCodeExporter commented 9 years ago
I like this.  Applied in r142.

Please verify.

Original comment by dclinton on 3 May 2009 at 6:38