kennethreitz/requests — pull request #562 by slingamn (2012-04-24 09:06:04+00:00)
Title: replace utils.randombytes with os.urandom

My understanding is that Python's `random` module is not recommended for cryptographic use. `os.urandom` should provide random bytes on all major platforms: Linux, OS X, *nix, and Windows:

Since the function provides a `str` under 2.x and a `bytes` under 3.x, and the result is fed directly into SHA, there shouldn't be an issue with the encoding.

Thoughts? Thanks for your time.