diff --git a/python-yarl.changes b/python-yarl.changes index cb044dd..ea0d59d 100644 --- a/python-yarl.changes +++ b/python-yarl.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Aug 18 21:19:19 UTC 2022 - Ben Greiner + +- Update to 1.8.1 + * Added URL.raw_suffix, URL.suffix, URL.raw_suffixes, + URL.suffixes, URL.with_suffix. (#613) + * Dropped Python 3.6 support. (#672) +- Drop tests_overcome_bpo42967.patch + ------------------------------------------------------------------- Tue Dec 7 15:57:39 UTC 2021 - pgajdos@suse.com diff --git a/python-yarl.spec b/python-yarl.spec index 403a98d..d700da8 100644 --- a/python-yarl.spec +++ b/python-yarl.spec @@ -1,7 +1,7 @@ # # spec file for package python-yarl # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,27 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 Name: python-yarl -Version: 1.7.2 +Version: 1.8.1 Release: 0 Summary: Yet another URL library License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/aio-libs/yarl/ Source: https://files.pythonhosted.org/packages/source/y/yarl/yarl-%{version}.tar.gz -# PATCH-FIX-UPSTREAM tests_overcome_bpo42967.patch bsc#[0-9]+ mcepl@suse.com -# Overcome effects of bpo#42967, which forbade mixing amps and -# semicolons in query strings as separators. -Patch0: tests_overcome_bpo42967.patch BuildRequires: %{python_module Cython} -BuildRequires: %{python_module devel} +BuildRequires: %{python_module devel >= 3.7} BuildRequires: %{python_module idna >= 2.0} -BuildRequires: %{python_module typing_extensions >= 3.7.4 if %python-base < 3.8} # test requirements BuildRequires: %{python_module multidict >= 4.0} -BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -50,6 +42,7 @@ The module provides a URL class for url parsing and changing. %prep %autosetup -p1 -n yarl-%{version} +sed -i '/addopts/d' setup.cfg %build export CFLAGS="%{optflags} -Wno-return-type" @@ -57,8 +50,6 @@ export CFLAGS="%{optflags} -Wno-return-type" %install %python_install -# devel file in non-devel-package -%python_expand rm %{buildroot}%{$python_sitearch}/yarl/_quoting_c.c %python_expand %fdupes %{buildroot}%{$python_sitearch} %check @@ -68,6 +59,6 @@ export CFLAGS="%{optflags} -Wno-return-type" %license LICENSE %doc CHANGES.rst README.rst %{python_sitearch}/yarl -%{python_sitearch}/yarl-%{version}-py*.egg-info +%{python_sitearch}/yarl-%{version}*-info %changelog diff --git a/tests_overcome_bpo42967.patch b/tests_overcome_bpo42967.patch deleted file mode 100644 index 0743a2b..0000000 --- a/tests_overcome_bpo42967.patch +++ /dev/null @@ -1,57 +0,0 @@ -Index: yarl-1.7.2/yarl/_url.py -=================================================================== ---- yarl-1.7.2.orig/yarl/_url.py 2021-11-01 18:54:02.000000000 +0100 -+++ yarl-1.7.2/yarl/_url.py 2021-12-07 17:00:29.099007846 +0100 -@@ -1,4 +1,5 @@ - import functools -+import inspect - import sys - import warnings - from collections.abc import Mapping, Sequence -@@ -142,7 +143,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: -@@ -157,6 +158,8 @@ class URL: - else: - raise TypeError("Constructor parameter should be str") - -+ cls.qs_sep = separator -+ - if not encoded: - if not val[1]: # netloc - netloc = "" -@@ -554,7 +557,12 @@ class URL: - Empty value if URL has no query part. - - """ -- ret = MultiDict(parse_qsl(self.raw_query_string, keep_blank_values=True)) -+ if 'separator' in inspect.signature(parse_qsl).parameters: -+ qs_dict = parse_qsl(self.raw_query_string, -+ keep_blank_values=True, separator=self.qs_sep) -+ else: -+ qs_dict = parse_qsl(self.raw_query_string, keep_blank_values=True) -+ ret = MultiDict(qs_dict) - return MultiDictProxy(ret) - - @property -@@ -989,7 +997,12 @@ class URL: - def update_query(self, *args, **kwargs): - """Return a new URL with query part updated.""" - s = self._get_str_query(*args, **kwargs) -- new_query = MultiDict(parse_qsl(s, keep_blank_values=True)) -+ if 'separator' in inspect.signature(parse_qsl).parameters: -+ qs_dict = parse_qsl(s, keep_blank_values=True, -+ separator=self.qs_sep) -+ else: -+ qs_dict = parse_qsl(s, keep_blank_values=True) -+ new_query = MultiDict(qs_dict) - query = MultiDict(self.query) - query.update(new_query) - - diff --git a/yarl-1.7.2.tar.gz b/yarl-1.7.2.tar.gz deleted file mode 100644 index 540bdcc..0000000 --- a/yarl-1.7.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45399b46d60c253327a460e99856752009fcee5f5d3c80b2f7c0cae1c38d56dd -size 168562 diff --git a/yarl-1.8.1.tar.gz b/yarl-1.8.1.tar.gz new file mode 100644 index 0000000..f22f633 --- /dev/null +++ b/yarl-1.8.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af887845b8c2e060eb5605ff72b6f2dd2aab7a761379373fd89d314f4752abbf +size 172309