[Python-modules-commits] [pytest-httpbin] 01/04: Import pytest-httpbin_0.2.3.orig.tar.xz
Daniel Stender
danstender-guest at moszumanska.debian.org
Thu Dec 8 17:56:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
danstender-guest pushed a commit to branch master
in repository pytest-httpbin.
commit 5454e064064bb59ff7abac40dce608410042fa17
Author: Daniel Stender <stender at debian.org>
Date: Thu Dec 8 18:49:31 2016 +0100
Import pytest-httpbin_0.2.3.orig.tar.xz
---
README.md | 7 +++++++
pytest_httpbin/serve.py | 19 ++++++++++++-------
pytest_httpbin/version.py | 2 +-
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index c09c2ef..30b93a4 100644
--- a/README.md
+++ b/README.md
@@ -115,6 +115,13 @@ tox
## Changelog
+* 0.2.3:
+ * Another attempt to fix #32 (Rare bug, only happens on Travis)
+* 0.2.2:
+ * Fix bug with python3
+* 0.2.1:
+ * Attempt to fix strange, impossible-to-reproduce bug with broken SSL certs
+ that only happens on Travis (#32) [Bad release, breaks py3]
* 0.2.0:
* Remove threaded HTTP server. I built it for Requests, but they deleted
their threaded test since it didn't really work very well. The threaded
diff --git a/pytest_httpbin/serve.py b/pytest_httpbin/serve.py
index 043e082..7c9953e 100644
--- a/pytest_httpbin/serve.py
+++ b/pytest_httpbin/serve.py
@@ -61,13 +61,18 @@ class SecureWSGIServer(WSGIServer):
Negotiates SSL and then mimics BaseServer behavior.
"""
request.settimeout(1.0)
- ssock = ssl.wrap_socket(
- request,
- keyfile=os.path.join(CERT_DIR, 'key.pem'),
- certfile=os.path.join(CERT_DIR, 'cert.pem'),
- server_side=True
- )
- self.RequestHandlerClass(ssock, client_address, self)
+ try:
+ ssock = ssl.wrap_socket(
+ request,
+ keyfile=os.path.join(CERT_DIR, 'key.pem'),
+ certfile=os.path.join(CERT_DIR, 'cert.pem'),
+ server_side=True,
+ suppress_ragged_eofs=False,
+ )
+ self.RequestHandlerClass(ssock, client_address, self)
+ except Exception as e:
+ print("pytest-httpbin server hit an exception serving request: %s" % e)
+ print("attempting to ignore so the rest of the tests can run")
# WSGIRequestHandler seems to close the socket for us.
# Thanks, WSGIRequestHandler!!
diff --git a/pytest_httpbin/version.py b/pytest_httpbin/version.py
index 7fd229a..d93b5b2 100644
--- a/pytest_httpbin/version.py
+++ b/pytest_httpbin/version.py
@@ -1 +1 @@
-__version__ = '0.2.0'
+__version__ = '0.2.3'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pytest-httpbin.git
More information about the Python-modules-commits
mailing list