Hi,

The problem mentioned in #986525 has a fix upstream in https://github.com/aio-libs/yarl/pull/575. I prepared a merge request at https://salsa.debian.org/python-team/packages/yarl/-/merge_requests/3 with the patch, formatted according to DEP-3 guidelines, and a debian/changelog entry.

This does fix the FTBFS for me.

I can NMU if needed.

Roland.

>From b35decabba16716bc505628ac0a45bb435ec6a4d Mon Sep 17 00:00:00 2001
From: Roland Mas <lola...@debian.org>
Date: Mon, 19 Apr 2021 13:47:06 +0200
Subject: [PATCH] Apply patch from github to fix #986525

---
 debian/changelog          |  6 +++-
 debian/patches/fix-986525 | 74 +++++++++++++++++++++++++++++++++++++++
 debian/patches/series     |  1 +
 3 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/fix-986525

diff --git a/debian/changelog b/debian/changelog
index edf9fd3..6f99994 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
 yarl (1.6.3-2) UNRELEASED; urgency=medium
 
+  [ Sandro Tosi ]
   * Use the new Debian Python Team contact name and address
 
- -- Sandro Tosi <mo...@debian.org>  Mon, 04 Jan 2021 17:09:22 -0500
+  [ Roland Mas ]
+  * Fix failing test with Python 3.9.2 (closes: #986525).
+
+ -- Roland Mas <lola...@debian.org>  Mon, 19 Apr 2021 14:14:30 +0200
 
 yarl (1.6.3-1) unstable; urgency=low
 
diff --git a/debian/patches/fix-986525 b/debian/patches/fix-986525
new file mode 100644
index 0000000..cf2d6d2
--- /dev/null
+++ b/debian/patches/fix-986525
@@ -0,0 +1,74 @@
+Description: Fix test with Python 3.9.2
+ This patch fixes a test that fails with Python 3.9.2. 
+Origin: upstream, https://github.com/aio-libs/yarl/pull/575
+Bug: https://github.com/aio-libs/yarl/issues/563
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986525
+Last-Update: 2021-04-19
+
+---
+Index: yarl/tests/test_url_query.py
+===================================================================
+--- yarl.orig/tests/test_url_query.py
++++ yarl/tests/test_url_query.py
+@@ -63,7 +63,7 @@ def test_ampersand_as_value():
+ 
+ 
+ def test_semicolon_as_separator():
+-    u = URL("http://127.0.0.1/?a=1;b=2";)
++    u = URL("http://127.0.0.1/?a=1;b=2";, separator=";")
+     assert len(u.query) == 2
+ 
+ 
+Index: yarl/yarl/_url.py
+===================================================================
+--- yarl.orig/yarl/_url.py
++++ yarl/yarl/_url.py
+@@ -126,7 +126,7 @@ class URL:
+     #               / path-noscheme
+     #               / path-empty
+     # absolute-URI  = scheme ":" hier-part [ "?" query ]
+-    __slots__ = ("_cache", "_val")
++    __slots__ = ("_cache", "_val", "_separator")
+ 
+     _QUOTER = _Quoter(requote=False)
+     _REQUOTER = _Quoter()
+@@ -142,7 +142,7 @@ class URL:
+     _PATH_UNQUOTER = _Unquoter(unsafe="+")
+     _QS_UNQUOTER = _Unquoter(qs=True)
+ 
+-    def __new__(cls, val="", *, encoded=False, strict=None):
++    def __new__(cls, val="", *, encoded=False, strict=None, separator="&"):
+         if strict is not None:  # pragma: no cover
+             warnings.warn("strict parameter is ignored")
+         if type(val) is cls:
+@@ -188,6 +188,7 @@ class URL:
+         self = object.__new__(cls)
+         self._val = val
+         self._cache = {}
++        self._separator = separator
+         return self
+ 
+     @classmethod
+@@ -551,7 +552,21 @@ class URL:
+         Empty value if URL has no query part.
+ 
+         """
+-        ret = MultiDict(parse_qsl(self.raw_query_string, keep_blank_values=True))
++        if (
++            (3, 6, 13) <= sys.version_info < (3, 7)
++            or (3, 7, 10) <= sys.version_info < (3, 8)
++            or (3, 8, 8) <= sys.version_info < (3, 9)
++            or sys.version_info >= (3, 9, 2)
++        ):
++            ret = MultiDict(
++                parse_qsl(
++                    self.raw_query_string,
++                    keep_blank_values=True,
++                    separator=self._separator,
++                )
++            )
++        else:
++            ret = MultiDict(parse_qsl(self.raw_query_string, keep_blank_values=True))
+         return MultiDictProxy(ret)
+ 
+     @property
diff --git a/debian/patches/series b/debian/patches/series
index 8b3b873..fd29cd1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 0002-docs-disable-intersphinx.patch
 0003-docs-disable-sidebar_collapse-option.patch
 0004-disable-privacy-breach-links-in-documentation.patch
+fix-986525
-- 
2.30.2

Reply via email to