Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-boltons for openSUSE:Factory checked in at 2021-03-24 16:10:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-boltons (Old) and /work/SRC/openSUSE:Factory/.python-boltons.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-boltons" Wed Mar 24 16:10:35 2021 rev:7 rq:880497 version:20.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-boltons/python-boltons.changes 2021-02-04 20:21:52.694625660 +0100 +++ /work/SRC/openSUSE:Factory/.python-boltons.new.2401/python-boltons.changes 2021-03-24 16:10:36.627791559 +0100 @@ -1,0 +2,7 @@ +Fri Mar 19 19:53:55 UTC 2021 - Ben Greiner <[email protected]> + +- Add boltons-pr271-py39-frozendict.patch + * gh#mahmoud/boltons#271 + * gh#mahmoud/boltons#283 + +------------------------------------------------------------------- New: ---- boltons-pr271-py39-frozendict.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-boltons.spec ++++++ --- /var/tmp/diff_new_pack.iVBEgw/_old 2021-03-24 16:10:37.167792126 +0100 +++ /var/tmp/diff_new_pack.iVBEgw/_new 2021-03-24 16:10:37.167792126 +0100 @@ -25,6 +25,8 @@ Group: Development/Languages/Python URL: https://github.com/mahmoud/boltons Source: https://github.com/mahmoud/boltons/archive/%{version}.tar.gz#/boltons-%{version}.tar.gz +# PATCH-FIX-UPSTREAM boltons-pr271-py39-frozendict.patch -- gh#mahmoud/boltons#271, gh#mahmoud/boltons#283 +Patch0: boltons-pr271-py39-frozendict.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -38,7 +40,7 @@ http://boltons.readthedocs.org. %prep -%setup -q -n boltons-%{version} +%autosetup -p1 -n boltons-%{version} %build %python_build @@ -53,6 +55,7 @@ %files %{python_files} %license LICENSE %doc README.md CHANGELOG.md docs/*.rst -%{python_sitelib}/* +%{python_sitelib}/boltons +%{python_sitelib}/boltons-%{version}*-info %changelog ++++++ boltons-pr271-py39-frozendict.patch ++++++ >From d9c2af2319339924092f7e503c9ebb6079956006 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan <[email protected]> Date: Wed, 18 Nov 2020 13:12:49 +0000 Subject: [PATCH] Fix Python 3.9 compatibility for FrozenDict due to PEP 584 implementation. --- boltons/dictutils.py | 2 +- tests/test_dictutils.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/boltons/dictutils.py b/boltons/dictutils.py index ce5884c..8d1a4e7 100644 --- a/boltons/dictutils.py +++ b/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 a/tests/test_dictutils.py b/tests/test_dictutils.py index b6873a8..6eac812 100644 --- a/tests/test_dictutils.py +++ b/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 [email protected](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=".*FrozenDict.*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__',
