diff --git a/srcpkgs/python3-boltons/patches/py39-test.patch b/srcpkgs/python3-boltons/patches/py39-test.patch new file mode 100644 index 00000000000..eee52fc9cbb --- /dev/null +++ b/srcpkgs/python3-boltons/patches/py39-test.patch @@ -0,0 +1,62 @@ +From 754afddf141ea26956c88c7e13fe5e7ca7942654 Mon Sep 17 00:00:00 2001 +From: Karthikeyan Singaravelan +Date: Mon, 23 Nov 2020 11:23:49 +0530 +Subject: [PATCH] Fix Python 3.9 compatibility for FrozenDict due to PEP 584 + implementation. (#271) + +--- + boltons/dictutils.py | 2 +- + tests/test_dictutils.py | 12 ++++++++++++ + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git boltons/dictutils.py boltons/dictutils.py +index ce5884c..8d1a4e7 100644 +--- boltons/dictutils.py ++++ boltons/dictutils.py +@@ -1076,7 +1076,7 @@ def _raise_frozen_typeerror(self, *a, **kw): + "raises a TypeError, because FrozenDicts are immutable" + raise TypeError('%s object is immutable' % self.__class__.__name__) + +- __setitem__ = __delitem__ = update = _raise_frozen_typeerror ++ __ior__ = __setitem__ = __delitem__ = update = _raise_frozen_typeerror + setdefault = pop = popitem = clear = _raise_frozen_typeerror + + del _raise_frozen_typeerror +diff --git tests/test_dictutils.py tests/test_dictutils.py +index b6873a8..6eac812 100644 +--- tests/test_dictutils.py ++++ tests/test_dictutils.py +@@ -1,5 +1,6 @@ + # -*- coding: utf-8 -*- + ++import sys + import pytest + + from boltons.dictutils import OMD, OneToOne, ManyToMany, FrozenDict, subdict, FrozenHashError +@@ -432,6 +433,15 @@ def test_frozendict(): + return + + ++@pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") ++def test_frozendict_ior(): ++ data = {'a': 'A', 'b': 'B'} ++ fd = FrozenDict(data) ++ ++ with pytest.raises(TypeError, match=".*FrozenDicts are immutable.*"): ++ fd |= fd ++ ++ + def test_frozendict_api(): + # all the read-only methods that are fine + through_methods = ['__class__', +@@ -452,8 +462,10 @@ def test_frozendict_api(): + '__lt__', + '__ne__', + '__new__', ++ '__or__', + '__reduce__', + '__reversed__', ++ '__ror__', + '__setattr__', + '__sizeof__', + '__str__', diff --git a/srcpkgs/python3-boltons/template b/srcpkgs/python3-boltons/template index 1ff0d6efe85..a4c71fb7713 100644 --- a/srcpkgs/python3-boltons/template +++ b/srcpkgs/python3-boltons/template @@ -1,18 +1,18 @@ # Template file for 'python3-boltons' pkgname=python3-boltons -version=19.3.0 -revision=3 +version=20.2.1 +revision=1 wrksrc="boltons-${version}" build_style=python3-module -pycompile_module="boltons" hostmakedepends="python3-setuptools" depends="python3" +checkdepends="python3-pytest" short_desc="Collection of functionality to be bolted on the standard lib" maintainer="Orphaned " license="BSD-3-Clause" homepage="https://github.com/mahmoud/boltons" -distfiles="${PYPI_SITE}/b/boltons/boltons-${version}.tar.gz" -checksum=7b3344098aa0d593e1a04cd290f61310d5aefc66aeb1e07262d5afdabdb88a67 +distfiles="https://github.com/mahmoud/boltons/archive/${version}.tar.gz" +checksum=f5b63fba62bed021c5086e43b4cfdaf6c8396a3ae1ccdcb549b4eb2f36f8a794 post_install() { vlicense LICENSE