summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-03-13 09:06:18 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-03-13 09:06:18 -0400
commit9c756eacc062c843d96256eb6dec6022a8a4c684 (patch)
treeba1988acdf11da3a3919b91f4546027c8424d332
parent43dcebbf21b4ae0d5b5fa54dbe9e157b59ef6902 (diff)
parentaa86121cd7a4962052b4651f4338d41bfd120438 (diff)
downloadpyopenssl-9c756eacc062c843d96256eb6dec6022a8a4c684.tar.gz
Merge pull request #442 from hynek/more-422
Pluck more unrelated bits from #422
-rw-r--r--.travis.yml5
-rw-r--r--CHANGELOG.rst2
-rw-r--r--src/OpenSSL/SSL.py8
-rw-r--r--src/OpenSSL/_util.py3
-rw-r--r--tests/test_ssl.py11
5 files changed, 18 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index 3b2e04e..06b5b70 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -83,14 +83,15 @@ matrix:
- python: "2.7"
env: TOXENV=docs
- # - Let the cryptography master builds fail because they might be triggered by
- # cryptography changes beyond our control.
+ # Let the cryptography master builds fail because they might be caused by
+ # cryptography changes that are beyond our control.
allow_failures:
- env: TOXENV=py26-cryptographyMaster
- env: TOXENV=py27-cryptographyMaster
- env: TOXENV=py33-cryptographyMaster
- env: TOXENV=py34-cryptographyMaster
- env: TOXENV=py35-cryptographyMaster
+ - env: TOXENV=pypy-cryptographyMaster
install:
- |
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 99087eb..5cda7be 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -11,7 +11,7 @@ The third digit is only for regressions.
This is the first release under full stewardship of PyCA.
We have made *many* changes to make local development more pleasing.
The test suite now passes both on Linux and OS X with OpenSSL 0.9.8, 1.0.1, and 1.0.2.
-It has been moved to `py.test <http://pytest.org/>`_, all CI test runs are part of `tox <https://testrun.org/tox/>`_ and the source code has been made fully `flake8 <https://flake8.readthedocs.org/>`_ compliant.
+It has been moved to `py.test <https://pytest.org/>`_, all CI test runs are part of `tox <https://testrun.org/tox/>`_ and the source code has been made fully `flake8 <https://flake8.readthedocs.org/>`_ compliant.
We hope to have lowered the barrier for contributions significantly but are open to hear about any remaining frustrations.
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index 10116ed..8ae7449 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -10,14 +10,14 @@ from six import integer_types as integer_types
from six import int2byte, indexbytes
from OpenSSL._util import (
+ UNSPECIFIED as _UNSPECIFIED,
+ exception_from_error_queue as _exception_from_error_queue,
ffi as _ffi,
lib as _lib,
- exception_from_error_queue as _exception_from_error_queue,
- native as _native,
make_assert as _make_assert,
- text_to_bytes_and_warn as _text_to_bytes_and_warn,
+ native as _native,
path_string as _path_string,
- UNSPECIFIED as _UNSPECIFIED,
+ text_to_bytes_and_warn as _text_to_bytes_and_warn,
)
from OpenSSL.crypto import (
diff --git a/src/OpenSSL/_util.py b/src/OpenSSL/_util.py
index b68b11e..48bcbf5 100644
--- a/src/OpenSSL/_util.py
+++ b/src/OpenSSL/_util.py
@@ -34,7 +34,6 @@ def exception_from_error_queue(exception_type):
associated with the current thread. The err library provides functions to
obtain these error codes and textual error messages.
"""
-
errors = []
while True:
@@ -56,7 +55,7 @@ def make_assert(error):
"""
def openssl_assert(ok):
"""
- If ok is not true-ish, retrieve the error from OpenSSL and raise it.
+ If *ok* is not True, retrieve the error from OpenSSL and raise it.
"""
if ok is not True:
exception_from_error_queue(error)
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index 433fa2c..da313f7 100644
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -356,6 +356,11 @@ def context():
class TestContext(object):
+ """
+ py.test-based tests for :class:`OpenSSL.SSL.Context`.
+
+ If possible, add new tests here.
+ """
@pytest.mark.parametrize("cipher_string", [
b"hello world:AES128-SHA",
u"hello world:AES128-SHA",
@@ -387,7 +392,9 @@ class TestContext(object):
class ContextTests(TestCase, _LoopbackMixin):
"""
- Unit tests for :py:obj:`OpenSSL.SSL.Context`.
+ Unit tests for :class:`OpenSSL.SSL.Context`.
+
+ If possible, add new tests to :class:`TestContext` above.
"""
def test_method(self):
"""
@@ -2016,7 +2023,7 @@ class SessionTests(TestCase):
class ConnectionTests(TestCase, _LoopbackMixin):
"""
- Unit tests for :py:obj:`OpenSSL.SSL.Connection`.
+ Unit tests for :class:`OpenSSL.SSL.Connection`.
"""
# XXX get_peer_certificate -> None
# XXX sock_shutdown