Bug 1231368 - python-tornado: requirement of ssl_match_hostname is no longer needed since Python 2.7.9
Summary: python-tornado: requirement of ssl_match_hostname is no longer needed since P...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-tornado
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Python SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1229409
TreeView+ depends on / blocked
 
Reported: 2015-06-12 20:21 UTC by Carl George
Modified: 2015-07-23 08:59 UTC (History)
4 users (show)

Fixed In Version: python-tornado-3.2.2-2.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-23 08:59:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Carl George 2015-06-12 20:21:47 UTC
Description of problem:

Python 3.4's entire ssl module was backported to 2.7.9 [1].  Tornado already has a conditional statement to import CertificateError and match_hostname from the standard library ssl module if they are available [2].  Effectively, the rpm has a dependency that isn't being used.  Because of that, I believe that these lines should be removed from the python-tornado spec file [3].

-BuildRequires:  python-backports-ssl_match_hostname
-Requires:       python-backports-ssl_match_hostname

Version-Release number of selected component (if applicable):

python-tornado-3.2.2-1.fc22

How reproducible:

$ # CertificateError in the standard library
$ grep 'class CertificateError' /usr/lib64/python2.7/ssl.py
class CertificateError(ValueError):

$ # match_hostname in the standard library
$ grep 'def match_hostname' /usr/lib64/python2.7/ssl.py
def match_hostname(cert, hostname):

$ # tornado tries to import from the standard library first
$ grep -B4 backports /usr/lib64/python2.7/site-packages/tornado/netutil.py
if hasattr(ssl, 'match_hostname') and hasattr(ssl, 'CertificateError'):  # python 3.2+
    ssl_match_hostname = ssl.match_hostname
    SSLCertificateError = ssl.CertificateError
else:
    import backports.ssl_match_hostname
    ssl_match_hostname = backports.ssl_match_hostname.match_hostname
    SSLCertificateError = backports.ssl_match_hostname.CertificateError

Actual results:

The RPM has a dependency that it isn't using.

Expected results:

The RPM only depends on things it actually needs.

Additional info:

[1] https://www.python.org/downloads/release/python-279/
[2] https://github.com/tornadoweb/tornado/blob/v3.2.2/tornado/netutil.py#L32-L38
[3] http://pkgs.fedoraproject.org/cgit/python-tornado.git/tree/python-tornado.spec#n20

Comment 1 Fedora Update System 2015-07-10 19:24:37 UTC
python-tornado-3.2.2-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/python-tornado-3.2.2-2.fc22

Comment 2 Fedora Update System 2015-07-13 19:20:25 UTC
Package python-tornado-3.2.2-2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-tornado-3.2.2-2.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-11487/python-tornado-3.2.2-2.fc22
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2015-07-23 08:59:43 UTC
python-tornado-3.2.2-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.