[Python-modules-commits] r32743 - in packages/python-tornado/trunk/debian/patches (2 files)
jpuydt-guest at users.alioth.debian.org
jpuydt-guest at users.alioth.debian.org
Wed May 20 14:46:43 UTC 2015
Date: Wednesday, May 20, 2015 @ 14:46:42
Author: jpuydt-guest
Revision: 32743
Added patch to use the system ca-certificates
Added:
packages/python-tornado/trunk/debian/patches/without-certifi.patch
Modified:
packages/python-tornado/trunk/debian/patches/series
Modified: packages/python-tornado/trunk/debian/patches/series
===================================================================
--- packages/python-tornado/trunk/debian/patches/series 2015-05-20 14:46:39 UTC (rev 32742)
+++ packages/python-tornado/trunk/debian/patches/series 2015-05-20 14:46:42 UTC (rev 32743)
@@ -1,4 +1,5 @@
+domain-test.patch
ignoreuserwarning.patch
-domain-test.patch
skip-timing-tests.patch
sockopt.patch
+without-certifi.patch
Added: packages/python-tornado/trunk/debian/patches/without-certifi.patch
===================================================================
--- packages/python-tornado/trunk/debian/patches/without-certifi.patch (rev 0)
+++ packages/python-tornado/trunk/debian/patches/without-certifi.patch 2015-05-20 14:46:42 UTC (rev 32743)
@@ -0,0 +1,61 @@
+Description: do not depend on certifi for Debian
+ On debian certificates are stored in a definite place
+Forwarded: no
+Author: Julien Puydt <julien.puydt at laposte.net>
+diff --git a/setup.py b/setup.py
+index 963a6dd..d61244f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -120,7 +120,7 @@ if (platform.python_implementation() == 'CPython' and
+
+ if setuptools is not None:
+ # If setuptools is not available, you're on your own for dependencies.
+- install_requires = ['certifi']
++ install_requires = []
+ if sys.version_info < (3, 2):
+ install_requires.append('backports.ssl_match_hostname')
+ kwargs['install_requires'] = install_requires
+diff --git a/tornado/simple_httpclient.py b/tornado/simple_httpclient.py
+index 31d076e..a7c8412 100644
+--- a/tornado/simple_httpclient.py
++++ b/tornado/simple_httpclient.py
+@@ -33,17 +33,8 @@ except ImportError:
+ # ssl is not available on Google App Engine.
+ ssl = None
+
+-try:
+- import certifi
+-except ImportError:
+- certifi = None
+-
+-
+ def _default_ca_certs():
+- if certifi is None:
+- raise Exception("The 'certifi' package is required to use https "
+- "in simple_httpclient")
+- return certifi.where()
++ return '/etc/ssl/certs/ca-certificates.crt'
+
+
+ class SimpleAsyncHTTPClient(AsyncHTTPClient):
+diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py
+index ca35de6..5f428e0 100644
+--- a/tornado/test/iostream_test.py
++++ b/tornado/test/iostream_test.py
+@@ -10,7 +10,6 @@ from tornado.stack_context import NullContext
+ from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, bind_unused_port, ExpectLog, gen_test
+ from tornado.test.util import unittest, skipIfNonUnix, refusing_port
+ from tornado.web import RequestHandler, Application
+-import certifi
+ import errno
+ import logging
+ import os
+@@ -877,7 +876,7 @@ class TestIOStreamStartTLS(AsyncTestCase):
+ def test_handshake_fail(self):
+ server_future = self.server_start_tls(_server_ssl_options())
+ client_future = self.client_start_tls(
+- dict(cert_reqs=ssl.CERT_REQUIRED, ca_certs=certifi.where()))
++ dict(cert_reqs=ssl.CERT_REQUIRED, ca_certs='/etc/ssl/certs/ca-certificates.crt'))
+ with ExpectLog(gen_log, "SSL Error"):
+ with self.assertRaises(ssl.SSLError):
+ yield client_future
More information about the Python-modules-commits
mailing list