Bug#907168: [Python-modules-team] Bug#907168: pytest-httpbin FTBFS with OpenSSL 1.1.1

2018-08-29 Thread Ondrej Novy
Hi,

út 28. 8. 2018 v 15:36 odesílatel Pierre-Elliott Bécue 
napsal:

> This would imply to do a Debian patch in upstream's source.
>

I had similar bug in eventlet, solution:
https://github.com/eventlet/eventlet/pull/516
https://salsa.debian.org/python-team/modules/python-eventlet/commit/32dc98ce3519b42b4edfe02b9599b916b052c84c

-- 
Best regards
 Ondřej Nový

Email: n...@ondrej.org
PGP: 3D98 3C52 EB85 980C 46A5  6090 3573 1255 9D1E 064B


Bug#907168: pytest-httpbin FTBFS with OpenSSL 1.1.1

2018-08-28 Thread Kurt Roeckx
On Tue, Aug 28, 2018 at 03:33:11PM +0200, Pierre-Elliott Bécue wrote:
> Le samedi 25 août 2018 à 20:34:35+0200, Kurt Roeckx a écrit :
> > This is caused by a Debian change to require a 2048 bit key by
> > default instead of a 1024 bit key. Since this is just for a test,
> > you can either just replace the certificates with larger keys,
> > or lower the security level for the test from 2 to 1. I suggest
> > you just create a new certificates.
> 
> Dear Kurt,
> 
> This would imply to do a Debian patch in upstream's source.
> 
> Do you think it's the best solution?

Upstream should fix this too. I suggest you talk to upstream and
then just apply the fix in Debian if they've fixed it.


Kurt



Bug#907168: pytest-httpbin FTBFS with OpenSSL 1.1.1

2018-08-28 Thread Pierre-Elliott Bécue
Le samedi 25 août 2018 à 20:34:35+0200, Kurt Roeckx a écrit :
> This is caused by a Debian change to require a 2048 bit key by
> default instead of a 1024 bit key. Since this is just for a test,
> you can either just replace the certificates with larger keys,
> or lower the security level for the test from 2 to 1. I suggest
> you just create a new certificates.

Dear Kurt,

This would imply to do a Debian patch in upstream's source.

Do you think it's the best solution?

Cheers!

-- 
Pierre-Elliott Bécue
GPG: 9AE0 4D98 6400 E3B6 7528  F493 0D44 2664 1949 74E2
It's far easier to fight for one's principles than to live up to them.


signature.asc
Description: PGP signature


Bug#907168: pytest-httpbin FTBFS with OpenSSL 1.1.1

2018-08-25 Thread Kurt Roeckx
This is caused by a Debian change to require a 2048 bit key by
default instead of a 1024 bit key. Since this is just for a test,
you can either just replace the certificates with larger keys,
or lower the security level for the test from 2 to 1. I suggest
you just create a new certificates.


Kurt



Bug#907168: pytest-httpbin FTBFS with OpenSSL 1.1.1

2018-08-24 Thread Adrian Bunk
Source: pytest-httpbin
Version: 0.3.0-3
Severity: serious
Tags: ftbfs
Control: block 907015 by -1

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/pytest-httpbin.html

...
I: pybuild base:217: python2.7 -m pytest -v -x -s
= test session starts ==
platform linux2 -- Python 2.7.15, pytest-3.6.4, py-1.5.4, pluggy-0.6.0 -- 
/usr/bin/python2.7
cachedir: .pytest_cache
rootdir: /build/1st/pytest-httpbin-0.3.0, inifile:
plugins: httpbin-0.3.0
collecting ... collected 19 items

tests/test_httpbin.py::test_httpbin_gets_injected PASSED
tests/test_httpbin.py::test_httpbin_accepts_get_requests 127.0.0.1 - - 
[23/Aug/2018 22:26:12] "GET /get HTTP/1.1" 200 218
PASSED
tests/test_httpbin.py::test_httpbin_secure_accepts_get_requests pytest-httpbin 
server hit an exception serving request: [SSL: CA_MD_TOO_WEAK] ca md too weak 
(_ssl.c:2779)
attempting to ignore so the rest of the tests can run
FAILED

=== FAILURES ===
___ test_httpbin_secure_accepts_get_requests ___

httpbin_secure = 

def test_httpbin_secure_accepts_get_requests(httpbin_secure):
>   assert requests.get(httpbin_secure.url + '/get').status_code == 200

tests/test_httpbin.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/dist-packages/requests/api.py:72: in get
return request('get', url, params=params, **kwargs)
/usr/lib/python2.7/dist-packages/requests/api.py:58: in request
return session.request(method=method, url=url, **kwargs)
/usr/lib/python2.7/dist-packages/requests/sessions.py:508: in request
resp = self.send(prep, **send_kwargs)
/usr/lib/python2.7/dist-packages/requests/sessions.py:618: in send
r = adapter.send(request, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = 
request = , stream = False
timeout = 
verify = '/build/1st/pytest-httpbin-0.3.0/pytest_httpbin/certs/cacert.pem'
cert = None, proxies = OrderedDict([('no', 'localhost')])

def send(self, request, stream=False, timeout=None, verify=True, cert=None, 
proxies=None):
"""Sends PreparedRequest object. Returns Response object.

:param request: The :class:`PreparedRequest ` 
being sent.
:param stream: (optional) Whether to stream the request content.
:param timeout: (optional) How long to wait for the server to send
data before giving up, as a float, or a :ref:`(connect timeout,
read timeout) ` tuple.
:type timeout: float or tuple or urllib3 Timeout object
:param verify: (optional) Either a boolean, in which case it 
controls whether
we verify the server's TLS certificate, or a string, in which 
case it
must be a path to a CA bundle to use
:param cert: (optional) Any user-provided SSL certificate to be 
trusted.
:param proxies: (optional) The proxies dictionary to apply to the 
request.
:rtype: requests.Response
"""

conn = self.get_connection(request.url, proxies)

self.cert_verify(conn, request.url, verify, cert)
url = self.request_url(request, proxies)
self.add_headers(request)

chunked = not (request.body is None or 'Content-Length' in 
request.headers)

if isinstance(timeout, tuple):
try:
connect, read = timeout
timeout = TimeoutSauce(connect=connect, read=read)
except ValueError as e:
# this may raise a string formatting error.
err = ("Invalid timeout {0}. Pass a (connect, read) "
   "timeout tuple, or a single float to set "
   "both timeouts to the same value".format(timeout))
raise ValueError(err)
elif isinstance(timeout, TimeoutSauce):
pass
else:
timeout = TimeoutSauce(connect=timeout, read=timeout)

try:
if not chunked:
resp = conn.urlopen(
method=request.method,
url=url,
body=request.body,
headers=request.headers,
redirect=False,
assert_same_host=False,
preload_content=False,
decode_content=False,
retries=self.max_retries,
timeout=timeout
)

# Send the request.
else:
if hasattr(conn, 'proxy_pool'):
conn = conn.proxy_pool

low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT)

try:
low_conn.putrequest(request.method,
url,