Hi,
here is a try at a patch to remove the dependance on certifi. It's
untested, but shouldn't be too bad.
Snark on #debian-python
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 '/usr/share/ca-certificates'
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='/usr/share/ca-certificates'))
with ExpectLog(gen_log, "SSL Error"):
with self.assertRaises(ssl.SSLError):
yield client_future
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team