diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-03-18 19:41:08 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-03-18 19:41:08 +0100 |
commit | c4d769d359c67680fe55c3b71e659cd31837f3ec (patch) | |
tree | 928fe50be266c8975f4abad56e07ce4ebaef55fe /gnu/packages/patches | |
parent | de2871c9faa44ee07f73470441f05d114a43bb48 (diff) | |
parent | 4de63cf3fc0a831d75cb507456821104f24800c2 (diff) | |
download | guix-c4d769d359c67680fe55c3b71e659cd31837f3ec.tar guix-c4d769d359c67680fe55c3b71e659cd31837f3ec.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches')
6 files changed, 285 insertions, 0 deletions
diff --git a/gnu/packages/patches/beets-werkzeug-compat.patch b/gnu/packages/patches/beets-werkzeug-compat.patch new file mode 100644 index 0000000000..1a91c3a3f9 --- /dev/null +++ b/gnu/packages/patches/beets-werkzeug-compat.patch @@ -0,0 +1,18 @@ +Be compatible with python-werkzeug 1.0.0. + +Taken from upstream: +https://github.com/beetbox/beets/commit/d43d54e21cde97f57f19486925ab56b419254cc8 + +diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py +index f53fb3a954..21ff5d94ed 100644 +--- a/beetsplug/web/__init__.py ++++ b/beetsplug/web/__init__.py +@@ -169,7 +169,7 @@ def to_python(self, value): + return ids + + def to_url(self, value): +- return ','.join(value) ++ return ','.join(str(v) for v in value) + + + class QueryConverter(PathConverter): diff --git a/gnu/packages/patches/bidiv-update-fribidi.patch b/gnu/packages/patches/bidiv-update-fribidi.patch new file mode 100644 index 0000000000..d000cfeda4 --- /dev/null +++ b/gnu/packages/patches/bidiv-update-fribidi.patch @@ -0,0 +1,50 @@ +https://sources.debian.org/data/main/b/bidiv/1.5-6/debian/patches/fribidi_019 + +Description: Fix building with fribidi 1.9 +Author: أحمد المحمودي <aelmahmoudy@users.sourceforge.net> +Bug-Debian: http://bugs.debian.org/568130 + +--- a/bidiv.c ++++ b/bidiv.c +@@ -141,8 +141,9 @@ bidiv(FILE *fp) + */ + if(c1<0x80||c1>0xbf){ + ungetc(c1, fp); +- unicode_in[len]= +- fribidi_iso8859_8_to_unicode_c(c); ++ fribidi_charset_to_unicode( ++ FRIBIDI_CHAR_SET_ISO8859_8, ++ &c, 1, &unicode_in[len]); + } else + unicode_in[len]=((c & 037) << 6) + (c1 & 077); + newline=0; +@@ -153,8 +154,9 @@ bidiv(FILE *fp) + In the future we will have a language + option, which will control this (as well + as the output encoding). */ +- unicode_in[len]= +- fribidi_iso8859_8_to_unicode_c(c); ++ fribidi_charset_to_unicode( ++ FRIBIDI_CHAR_SET_ISO8859_8, ++ &c, 1, &unicode_in[len]); + #else + in[len]=c; + #endif +@@ -206,11 +208,11 @@ bidiv(FILE *fp) + rtl_line=0; + + if(out_utf8) +- fribidi_unicode_to_utf8(unicode_out, len, +- out); ++ fribidi_unicode_to_charset(FRIBIDI_CHAR_SET_UTF8, ++ unicode_out, len, out); + else +- fribidi_unicode_to_iso8859_8(unicode_out, len, +- out); ++ fribidi_unicode_to_charset(FRIBIDI_CHAR_SET_ISO8859_8, ++ unicode_out, len, out); + /* if rtl_line (i.e., base_dir is RL), and we didn't fill the + entire width, we need to pad with spaces. Maybe in the + future this should be an option. +-- + diff --git a/gnu/packages/patches/eigen-stabilise-sparseqr-test.patch b/gnu/packages/patches/eigen-stabilise-sparseqr-test.patch new file mode 100644 index 0000000000..b95b46077a --- /dev/null +++ b/gnu/packages/patches/eigen-stabilise-sparseqr-test.patch @@ -0,0 +1,74 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Mon, 16 Mar 2020 22:51:37 +0000 +Subject: gnu: eigen: Stabilise sparseqr test. + +Taken verbatim from this[0] upstream commit. + +[0]: https://gitlab.com/libeigen/eigen/-/commit/3b5deeb546d4017b24846f5b0dc3296a50a039fe + +From 3b5deeb546d4017b24846f5b0dc3296a50a039fe Mon Sep 17 00:00:00 2001 +From: Gael Guennebaud <g.gael@free.fr> +Date: Tue, 19 Feb 2019 22:57:51 +0100 +Subject: [PATCH] bug #899: make sparseqr unit test more stable by 1) trying + with larger threshold and 2) relax rank computation for rank-deficient + problems. + +--- + test/sparseqr.cpp | 31 ++++++++++++++++++++++++++----- + 1 file changed, 26 insertions(+), 5 deletions(-) + +diff --git a/test/sparseqr.cpp b/test/sparseqr.cpp +index 3ffe62314..3576cc626 100644 +--- a/test/sparseqr.cpp ++++ b/test/sparseqr.cpp +@@ -43,6 +43,7 @@ int generate_sparse_rectangular_problem(MatrixType& A, DenseMat& dA, int maxRows + + template<typename Scalar> void test_sparseqr_scalar() + { ++ typedef typename NumTraits<Scalar>::Real RealScalar; + typedef SparseMatrix<Scalar,ColMajor> MatrixType; + typedef Matrix<Scalar,Dynamic,Dynamic> DenseMat; + typedef Matrix<Scalar,Dynamic,1> DenseVector; +@@ -91,14 +92,34 @@ template<typename Scalar> void test_sparseqr_scalar() + exit(0); + return; + } +- +- VERIFY_IS_APPROX(A * x, b); +- +- //Compare with a dense QR solver ++ ++ // Compare with a dense QR solver + ColPivHouseholderQR<DenseMat> dqr(dA); + refX = dqr.solve(b); + +- VERIFY_IS_EQUAL(dqr.rank(), solver.rank()); ++ bool rank_deficient = A.cols()>A.rows() || dqr.rank()<A.cols(); ++ if(rank_deficient) ++ { ++ // rank deficient problem -> we might have to increase the threshold ++ // to get a correct solution. ++ RealScalar th = RealScalar(20)*dA.colwise().norm().maxCoeff()*(A.rows()+A.cols()) * NumTraits<RealScalar>::epsilon(); ++ for(Index k=0; (k<16) && !test_isApprox(A*x,b); ++k) ++ { ++ th *= RealScalar(10); ++ solver.setPivotThreshold(th); ++ solver.compute(A); ++ x = solver.solve(b); ++ } ++ } ++ ++ VERIFY_IS_APPROX(A * x, b); ++ ++ // For rank deficient problem, the estimated rank might ++ // be slightly off, so let's only raise a warning in such cases. ++ if(rank_deficient) ++g_test_level; ++ VERIFY_IS_EQUAL(solver.rank(), dqr.rank()); ++ if(rank_deficient) --g_test_level; ++ + if(solver.rank()==A.cols()) // full rank + VERIFY_IS_APPROX(x, refX); + // else +-- +2.24.1 + diff --git a/gnu/packages/patches/python-alembic-exceptions-cause.patch b/gnu/packages/patches/python-alembic-exceptions-cause.patch new file mode 100644 index 0000000000..b9844e5ad0 --- /dev/null +++ b/gnu/packages/patches/python-alembic-exceptions-cause.patch @@ -0,0 +1,69 @@ +Fix a test failure with newer versions of SQLalchemy due to missing +"causes" for some exceptions. + +diff --git a/alembic/operations/ops.py b/alembic/operations/ops.py +index 5ec2762..7129472 100644 +--- a/alembic/operations/ops.py ++++ b/alembic/operations/ops.py +@@ -108,6 +108,7 @@ def from_constraint(cls, constraint): + "primary_key_constraint": "primary", + "check_constraint": "check", + "column_check_constraint": "check", ++ "table_or_column_check_constraint": "check", + } + + constraint_table = sqla_compat._table_for_constraint(constraint) +@@ -707,6 +708,7 @@ def batch_create_foreign_key( + "create_check_constraint", "batch_create_check_constraint" + ) + @AddConstraintOp.register_add_constraint("check_constraint") ++@AddConstraintOp.register_add_constraint("table_or_column_check_constraint") + @AddConstraintOp.register_add_constraint("column_check_constraint") + class CreateCheckConstraintOp(AddConstraintOp): + """Represent a create check constraint operation.""" +diff --git a/alembic/testing/assertions.py b/alembic/testing/assertions.py +index 3dc08f0..a78e5e8 100644 +--- a/alembic/testing/assertions.py ++++ b/alembic/testing/assertions.py +@@ -2,10 +2,9 @@ + + import re + ++from sqlalchemy import util + from sqlalchemy.engine import default + from sqlalchemy.testing.assertions import _expect_warnings +-from sqlalchemy.testing.assertions import assert_raises # noqa +-from sqlalchemy.testing.assertions import assert_raises_message # noqa + from sqlalchemy.testing.assertions import eq_ # noqa + from sqlalchemy.testing.assertions import is_ # noqa + from sqlalchemy.testing.assertions import is_false # noqa +@@ -17,6 +16,29 @@ + from ..util.compat import py3k + + ++def assert_raises(except_cls, callable_, *args, **kw): ++ try: ++ callable_(*args, **kw) ++ success = False ++ except except_cls: ++ success = True ++ ++ # assert outside the block so it works for AssertionError too ! ++ assert success, "Callable did not raise an exception" ++ ++ ++def assert_raises_message(except_cls, msg, callable_, *args, **kwargs): ++ try: ++ callable_(*args, **kwargs) ++ assert False, "Callable did not raise an exception" ++ except except_cls as e: ++ assert re.search(msg, util.text_type(e), re.UNICODE), "%r !~ %s" % ( ++ msg, ++ e, ++ ) ++ print(util.text_type(e).encode("utf-8")) ++ ++ + def eq_ignore_whitespace(a, b, msg=None): + # sqlalchemy.testing.assertion has this function + # but not with the special "!U" detection part diff --git a/gnu/packages/patches/python-flask-restful-werkzeug-compat.patch b/gnu/packages/patches/python-flask-restful-werkzeug-compat.patch new file mode 100644 index 0000000000..0e928ef455 --- /dev/null +++ b/gnu/packages/patches/python-flask-restful-werkzeug-compat.patch @@ -0,0 +1,36 @@ +We need one patch on top of 0.3.8 for compatibility with Werkzeug 1.0. + +Taken from upstream: +https://github.com/flask-restful/flask-restful/commit/73376a488907af3042b52678ac4c23f8a8911e5b + +diff --git a/tests/test_api.py b/tests/test_api.py +index f7f8e661..6795d362 100644 +--- a/tests/test_api.py ++++ b/tests/test_api.py +@@ -445,7 +445,9 @@ def test_handle_non_api_error(self): + + resp = app.get("/foo") + self.assertEquals(resp.status_code, 404) +- self.assertEquals('text/html', resp.headers['Content-Type']) ++ # in newer versions of werkzeug this is `text/html; charset=utf8` ++ content_type, _, _ = resp.headers['Content-Type'].partition(';') ++ self.assertEquals('text/html', content_type) + + def test_non_api_error_404_catchall(self): + app = Flask(__name__) +diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py +index 2f1fbedf..9776f17c 100644 +--- a/tests/test_reqparse.py ++++ b/tests/test_reqparse.py +@@ -2,9 +2,9 @@ + import unittest + from mock import Mock, patch + from flask import Flask +-from werkzeug import exceptions, MultiDict ++from werkzeug import exceptions + from werkzeug.wrappers import Request +-from werkzeug.datastructures import FileStorage ++from werkzeug.datastructures import FileStorage, MultiDict + from flask_restful.reqparse import Argument, RequestParser, Namespace + import six + import decimal diff --git a/gnu/packages/patches/python-jedi-deleted-variables.patch b/gnu/packages/patches/python-jedi-deleted-variables.patch new file mode 100644 index 0000000000..53bdc05cde --- /dev/null +++ b/gnu/packages/patches/python-jedi-deleted-variables.patch @@ -0,0 +1,38 @@ +Fix test failure in some environments, including Guix. + +Taken from upstream: +https://github.com/davidhalter/jedi/commit/bec87f7ff82b0731713c6520a14c213341b4cecf + +diff --git a/test/completion/basic.py b/test/completion/basic.py +index b40068179..3ff919ca6 100644 +--- a/test/completion/basic.py ++++ b/test/completion/basic.py +@@ -209,11 +209,11 @@ def global_as_import(): + + deleted_var = 3 + del deleted_var +-#? int() ++#? + deleted_var +-#? ['deleted_var'] ++#? [] + deleted_var +-#! ['deleted_var = 3'] ++#! [] + deleted_var + + # ----------------- +diff --git a/test/test_api/test_full_name.py b/test/test_api/test_full_name.py +index 4fdb861b0..6858b6ca8 100644 +--- a/test/test_api/test_full_name.py ++++ b/test/test_api/test_full_name.py +@@ -112,7 +112,8 @@ def test_os_path(Script): + + def test_os_issues(Script): + """Issue #873""" +- assert [c.name for c in Script('import os\nos.nt''').complete()] == ['nt'] ++ # nt is not found, because it's deleted ++ assert [c.name for c in Script('import os\nos.nt''').complete()] == [] + + + def test_param_name(Script): |