Re: Building Python without SSLv3 breaks requests

2014-11-19 Thread Donald Stufft
Upstream would probably like the patch to fix things when sslv3 is disabled. I 
think shazow would merge it easily. 


> On Nov 19, 2014, at 6:20 PM, Barry Warsaw  wrote:
> 
>> On Nov 19, 2014, at 08:14 AM, Matthias Klose wrote:
>> 
>> I'll wait for the -12 results. I think it would be better to test for this
>> attribute first before using it.
> 
> I think this can be combined with Daniele's suggestion, such that the
> _openssl_versions dictionary is only populated with keys from the ssl module
> that exist.  It's a little more work, but istm the right thing to do.
> 
> Cheers,
> -Barry


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/0d0d8b0b-506d-4edb-9fed-35edd7574...@stufft.io



Re: Building Python without SSLv3 breaks requests

2014-11-19 Thread Barry Warsaw
On Nov 19, 2014, at 08:14 AM, Matthias Klose wrote:

>I'll wait for the -12 results. I think it would be better to test for this
>attribute first before using it.

I think this can be combined with Daniele's suggestion, such that the
_openssl_versions dictionary is only populated with keys from the ssl module
that exist.  It's a little more work, but istm the right thing to do.

Cheers,
-Barry


signature.asc
Description: PGP signature


Re: Building Python without SSLv3 breaks requests

2014-11-18 Thread Matthias Klose

On 11/19/2014 12:45 AM, Yannick Roehlly wrote:

Hi,

The building of Python 2 without SSLv3 support breaks requests:


import requests

Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 68, in

 _attach_namespace(urllib3, 'requests.packages')
   File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 63, in
_attach_namespace
 module = __import__(name)
   File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line
73, in 
 ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'

and maybe other packages or software (for instance, a local install of Vim's
YouCompleteMe embedding it's own Python requests does not work).

Should bugs be reported against the broken packages or should the SSLv3
disabling in Python 2 be done with corrections?


without the patch, the python2.7 autopkg tests fail. see

  http://ci.debian.net/packages/p/python2.7/unstable/amd64/

I'll wait for the -12 results. I think it would be better to test for this 
attribute first before using it.



--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/546c435d.9040...@debian.org



Re: Building Python without SSLv3 breaks requests

2014-11-18 Thread Daniele Tricoli
Hello Yannick,
thanks for this report!

On Wednesday 19 November 2014 00:45:19 Yannick Roehlly wrote:
> and maybe other packages or software (for instance, a local install of
> Vim's  YouCompleteMe embedding it's own Python requests does not work).
> 
> Should bugs be reported against the broken packages or should the SSLv3 
> disabling in Python 2 be done with corrections?

This breakage is related to urllib3, specifically the SNI support for
Python 2. It is showing without using urllib3.contrib.pyonpenssl due to
the monkey patch machinery to make requests.package.urllib3 == urllib3.

I can patch

http://sources.debian.net/src/python-urllib3/1.9.1-2/urllib3/contrib/pyopenssl.py/#L72

to not raise any AttributeError if SSLv3 support is disabled.

Kind regards,

-- 
 Daniele Tricoli 'Eriol'
 http://mornie.org


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1429442.KxPtxmVTCJ@mornie



Building Python without SSLv3 breaks requests

2014-11-18 Thread Yannick Roehlly
Hi,

The building of Python 2 without SSLv3 support breaks requests:

>>> import requests
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 68, in 

_attach_namespace(urllib3, 'requests.packages')
  File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 63, in 
_attach_namespace
module = __import__(name)
  File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 
73, in 
ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'

and maybe other packages or software (for instance, a local install of Vim's 
YouCompleteMe embedding it's own Python requests does not work).

Should bugs be reported against the broken packages or should the SSLv3 
disabling in Python 2 be done with corrections?

Regards,

Yannick


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/18419377.FolxtsGgSG@tardis