aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/python-dendropy-fix-tests.patch41
-rw-r--r--gnu/packages/patches/python-fake-factory-fix-build-32bit.patch36
-rw-r--r--gnu/packages/patches/python-pbr-fix-man-page-support.patch28
-rw-r--r--gnu/packages/patches/python-pygit2-disable-network-tests.patch64
-rw-r--r--gnu/packages/patches/python-pyopenssl-skip-network-test.patch50
5 files changed, 219 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-dendropy-fix-tests.patch b/gnu/packages/patches/python-dendropy-fix-tests.patch
new file mode 100644
index 0000000000..30ab618ff1
--- /dev/null
+++ b/gnu/packages/patches/python-dendropy-fix-tests.patch
@@ -0,0 +1,41 @@
+This patch fixes two test failures. It was downloaded from:
+https://github.com/jeetsukumaran/DendroPy/commit/93f984bba7a6c588a28ca87f4e557ce283809453
+
+From 93f984bba7a6c588a28ca87f4e557ce283809453 Mon Sep 17 00:00:00 2001
+From: jeetsukumaran <jeetsukumaran@gmail.com>
+Date: Tue, 21 Feb 2017 16:41:01 -0500
+Subject: [PATCH] Update to Python 3 container and iteration semantics
+
+---
+ dendropy/dataio/newickreader.py | 3 ++-
+ dendropy/datamodel/treemodel.py | 3 +++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/dendropy/dataio/newickreader.py b/dendropy/dataio/newickreader.py
+index 6dcf3c5..f978729 100644
+--- a/dendropy/dataio/newickreader.py
++++ b/dendropy/dataio/newickreader.py
+@@ -303,7 +303,8 @@ def tree_iter(self,
+ taxon_symbol_map_fn=taxon_symbol_mapper.require_taxon_for_symbol)
+ yield tree
+ if tree is None:
+- raise StopIteration
++ # raise StopIteration
++ return
+
+ def _read(self,
+ stream,
+diff --git a/dendropy/datamodel/treemodel.py b/dendropy/datamodel/treemodel.py
+index 0ecfe31..73146f0 100644
+--- a/dendropy/datamodel/treemodel.py
++++ b/dendropy/datamodel/treemodel.py
+@@ -772,6 +772,9 @@ def __hash__(self):
+ def __eq__(self, other):
+ return self is other
+
++ def __lt__(self, other):
++ return id(self) < id(other)
++
+ ###########################################################################
+ ### Basic Structure
+
diff --git a/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch
new file mode 100644
index 0000000000..cb60896fad
--- /dev/null
+++ b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch
@@ -0,0 +1,36 @@
+These tests fail on 32-bit due to an overflow.
+
+Upstream bug URL: https://github.com/joke2k/faker/issues/408
+
+diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
+index 6026772..58b6b83 100644
+--- a/faker/tests/__init__.py
++++ b/faker/tests/__init__.py
+@@ -384,7 +384,6 @@ class FactoryTestCase(unittest.TestCase):
+ provider = Provider
+ # test century
+ self.assertTrue(self._datetime_to_time(provider.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.datetime.now()))
+- self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now()))
+ # test decade
+ self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.datetime.now()))
+ self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now()))
+@@ -413,8 +412,6 @@ class FactoryTestCase(unittest.TestCase):
+
+ # ensure all methods provide timezone aware datetimes
+ with self.assertRaises(TypeError):
+- provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now()
+- with self.assertRaises(TypeError):
+ provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now()
+ with self.assertRaises(TypeError):
+ provider.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.datetime.now()
+@@ -423,7 +420,6 @@ class FactoryTestCase(unittest.TestCase):
+
+ # test century
+ self.assertTrue(provider.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc))
+- self.assertTrue(provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc))
+ # test decade
+ self.assertTrue(provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc))
+ self.assertTrue(provider.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc))
+--
+2.11.1
+
diff --git a/gnu/packages/patches/python-pbr-fix-man-page-support.patch b/gnu/packages/patches/python-pbr-fix-man-page-support.patch
new file mode 100644
index 0000000000..b9036f5b01
--- /dev/null
+++ b/gnu/packages/patches/python-pbr-fix-man-page-support.patch
@@ -0,0 +1,28 @@
+See: https://bugs.launchpad.net/oslosphinx/+bug/1661861
+diff -ur orig/pbr-1.10.0/pbr/builddoc.py pbr-1.10.0/pbr/builddoc.py
+--- orig/pbr-1.10.0/pbr/builddoc.py 2016-05-23 21:38:18.000000000 +0200
++++ pbr-1.10.0/pbr/builddoc.py 2017-02-18 14:01:37.424434317 +0100
+@@ -138,7 +138,8 @@
+ sphinx_config.init_values(warnings.warn)
+ else:
+ sphinx_config.init_values()
+- if self.builder == 'man' and len(sphinx_config.man_pages) == 0:
++ if self.builder == 'man' and len(
++ getattr(sphinx_config, 'man_pages', '')) == 0:
+ return
+ app = application.Sphinx(
+ self.source_dir, self.config_dir,
+diff -ur orig/pbr-1.10.0/pbr/util.py pbr-1.10.0/pbr/util.py
+--- orig/pbr-1.10.0/pbr/util.py 2016-05-23 21:38:18.000000000 +0200
++++ pbr-1.10.0/pbr/util.py 2017-02-18 15:36:32.951196795 +0100
+@@ -211,7 +211,9 @@
+ parser.read(path)
+ config = {}
+ for section in parser.sections():
+- config[section] = dict(parser.items(section))
++ config[section] = dict()
++ for k, value in parser.items(section):
++ config[section][k.replace('-', '_')] = value
+
+ # Run setup_hooks, if configured
+ setup_hooks = has_get_option(config, 'global', 'setup_hooks')
diff --git a/gnu/packages/patches/python-pygit2-disable-network-tests.patch b/gnu/packages/patches/python-pygit2-disable-network-tests.patch
new file mode 100644
index 0000000000..e46d244807
--- /dev/null
+++ b/gnu/packages/patches/python-pygit2-disable-network-tests.patch
@@ -0,0 +1,64 @@
+Disable tests trying to look up remote servers.
+
+diff --git a/test/test_credentials.py b/test/test_credentials.py
+index 92482d9..9a281e5 100644
+--- a/test/test_credentials.py
++++ b/test/test_credentials.py
+@@ -68,39 +68,5 @@ class CredentialCreateTest(utils.NoRepoTestCase):
+ self.assertEqual((username, None, None, None), cred.credential_tuple)
+
+
+-class CredentialCallback(utils.RepoTestCase):
+- def test_callback(self):
+- class MyCallbacks(pygit2.RemoteCallbacks):
+- @staticmethod
+- def credentials(url, username, allowed):
+- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
+- raise Exception("I don't know the password")
+-
+- url = "https://github.com/github/github"
+- remote = self.repo.create_remote("github", url)
+-
+- self.assertRaises(Exception, lambda: remote.fetch(callbacks=MyCallbacks()))
+-
+- def test_bad_cred_type(self):
+- class MyCallbacks(pygit2.RemoteCallbacks):
+- @staticmethod
+- def credentials(url, username, allowed):
+- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
+- return Keypair("git", "foo.pub", "foo", "sekkrit")
+-
+- url = "https://github.com/github/github"
+- remote = self.repo.create_remote("github", url)
+- self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks()))
+-
+-class CallableCredentialTest(utils.RepoTestCase):
+-
+- def test_user_pass(self):
+- credentials = UserPass("libgit2", "libgit2")
+- callbacks = pygit2.RemoteCallbacks(credentials=credentials)
+-
+- url = "https://bitbucket.org/libgit2/testgitrepository.git"
+- remote = self.repo.create_remote("bb", url)
+- remote.fetch(callbacks=callbacks)
+-
+ if __name__ == '__main__':
+ unittest.main()
+diff --git a/test/test_repository.py b/test/test_repository.py
+index cfdf01e..c0d8de4 100644
+--- a/test/test_repository.py
++++ b/test/test_repository.py
+@@ -538,13 +538,6 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
+ self.assertTrue('refs/remotes/custom_remote/master' in repo.listall_references())
+ self.assertIsNotNone(repo.remotes["custom_remote"])
+
+- def test_clone_with_credentials(self):
+- repo = clone_repository(
+- "https://bitbucket.org/libgit2/testgitrepository.git",
+- self._temp_dir, callbacks=pygit2.RemoteCallbacks(credentials=pygit2.UserPass("libgit2", "libgit2")))
+-
+- self.assertFalse(repo.is_empty)
+-
+ def test_clone_with_checkout_branch(self):
+ # create a test case which isolates the remote
+ test_repo = clone_repository('./test/data/testrepo.git',
diff --git a/gnu/packages/patches/python-pyopenssl-skip-network-test.patch b/gnu/packages/patches/python-pyopenssl-skip-network-test.patch
new file mode 100644
index 0000000000..a24eaf69a0
--- /dev/null
+++ b/gnu/packages/patches/python-pyopenssl-skip-network-test.patch
@@ -0,0 +1,50 @@
+This test tries connecting to an external server which is not supported
+in the build environment. See discussion at:
+
+https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00650.html
+
+diff --git a/tests/test_ssl.py b/tests/test_ssl.py
+index ee849fd..60048b8 100644
+--- a/tests/test_ssl.py
++++ b/tests/test_ssl.py
+@@ -1180,40 +1180,6 @@ class ContextTests(TestCase, _LoopbackMixin):
+ TypeError, context.load_verify_locations, None, None, None
+ )
+
+- @pytest.mark.skipif(
+- platform == "win32",
+- reason="set_default_verify_paths appears not to work on Windows. "
+- "See LP#404343 and LP#404344."
+- )
+- def test_set_default_verify_paths(self):
+- """
+- :py:obj:`Context.set_default_verify_paths` causes the
+- platform-specific CA certificate locations to be used for
+- verification purposes.
+- """
+- # Testing this requires a server with a certificate signed by one
+- # of the CAs in the platform CA location. Getting one of those
+- # costs money. Fortunately (or unfortunately, depending on your
+- # perspective), it's easy to think of a public server on the
+- # internet which has such a certificate. Connecting to the network
+- # in a unit test is bad, but it's the only way I can think of to
+- # really test this. -exarkun
+-
+- # Arg, verisign.com doesn't speak anything newer than TLS 1.0
+- context = Context(SSLv23_METHOD)
+- context.set_default_verify_paths()
+- context.set_verify(
+- VERIFY_PEER,
+- lambda conn, cert, errno, depth, preverify_ok: preverify_ok)
+-
+- client = socket()
+- client.connect(("encrypted.google.com", 443))
+- clientSSL = Connection(context, client)
+- clientSSL.set_connect_state()
+- clientSSL.do_handshake()
+- clientSSL.send(b"GET / HTTP/1.0\r\n\r\n")
+- self.assertTrue(clientSSL.recv(1024))
+-
+ def test_set_default_verify_paths_signature(self):
+ """
+ :py:obj:`Context.set_default_verify_paths` takes no arguments and