Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#35742 - [python2-requests] New [opt]depends are missing

Attached to Project: Community Packages
Opened by Hugo Osvaldo Barrera (hobarrera) - Monday, 10 June 2013, 03:30 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Thursday, 13 June 2013, 09:21 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Massimiliano Torromeo (mtorromeo)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

python2-requests now successfully supports SNI on python2.
However, for it to work, python2-ndg-httpsclientpy and python2-openssl are required.

I'm not sure if they're depends or optdepends, but they should at least be listed (also, is there any chance the former can be moved into [community], since it's required for python2-requests?)
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Thursday, 13 June 2013, 09:21 GMT
Reason for closing:  Fixed
Comment by Massimiliano Torromeo (mtorromeo) - Monday, 10 June 2013, 12:19 GMT
Have you tried it? The libraries you mention are bundled by requests (this is how the project handles it upstream) and it should work fine. I know it works for me...


Try this:

import requests
print(requests.get("https://sni.velox.ch/").text)


This should be present in the response:

<p><strong>Great! Your client </strong>[python-requests/1.2.3 CPython/3.3.2 Linux/3.9.5-1-ARCH] <strong>
sent the following TLS server name indication extension
(<a href="http://www.rfc-editor.org/rfc/rfc6066.txt">RFC 6066</a>)
in its ClientHello </strong>(negotiated protocol: TLSv1.2, cipher suite: ECDHE-RSA-AES256-GCM-SHA384)<strong>:</strong></p>
<pre> <strong>sni.velox.ch</strong></pre>
<p>In your request, this header was included:</p>
<pre> Host: sni.velox.ch</pre>
Comment by Hugo Osvaldo Barrera (hobarrera) - Monday, 10 June 2013, 15:50 GMT
Yes, I've tried it, and it didn't work without those dependencies.
requests bundles urllib3, but without python2-ndg-httpsclientpy, urllib3 does not support SNI.
(See here: https://github.com/kennethreitz/requests/issues/749 for details).

Please note that this applies only to python2. Maybe you tested it with python > 3.2?
Comment by Thomas Weißschuh (t-8ch) - Thursday, 13 June 2013, 07:58 GMT
python2-pyasn1 is also required
Comment by Massimiliano Torromeo (mtorromeo) - Thursday, 13 June 2013, 08:06 GMT
It is a dependency of python2-ndg-httpsclient so it is not needed to be explicited in python2-requests
Comment by Thomas Weißschuh (t-8ch) - Thursday, 13 June 2013, 08:16 GMT
Didn't see this.

ndg-httpsclient also works without pyasn1.
Comment by Massimiliano Torromeo (mtorromeo) - Thursday, 13 June 2013, 08:28 GMT
It works without pyasn1 but it is required for subjectAltName support.

I may change it to an optdepend in ndg-httpsclient but for simplicity's sake I would rather leave it like this.

The whole point of ndg-httpsclient is to provide a more feature complete support for https than the one available in the standard library of python2, it makes not much sense imho to have it installed with only a subset of its functionalities.
Comment by Thomas Weißschuh (t-8ch) - Thursday, 13 June 2013, 08:39 GMT
Yes, it doesn't really matter. Sorry for the noise.
Comment by Massimiliano Torromeo (mtorromeo) - Thursday, 13 June 2013, 09:21 GMT
Thanks for the feedback

Loading...