Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #631 -- deprecate all of OpenSSL.rand #658

Merged
merged 3 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Backward-incompatible changes:
Deprecations:
^^^^^^^^^^^^^

*none*
- Deprecated ``OpenSSL.rand`` - callers should use ``os.urandom()`` instead.
`#658 <https://github.com/pyca/pyopenssl/pull/658>`_


Changes:
Expand Down
1 change: 0 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ OpenSSL library. The following modules are defined:
:maxdepth: 2

api/crypto
api/rand
api/ssl
41 changes: 0 additions & 41 deletions doc/api/rand.rst

This file was deleted.

7 changes: 7 additions & 0 deletions src/OpenSSL/rand.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
PRNG management routines, thin wrappers.
"""

import warnings
from functools import partial

from six import integer_types as _integer_types
Expand All @@ -13,6 +14,12 @@
path_string as _path_string)


warnings.warn(
"OpenSSL.rand is deprecated - you should use os.urandom instead",
DeprecationWarning, stacklevel=3
)


class Error(Exception):
"""
An error occurred in an :mod:`OpenSSL.rand` API.
Expand Down