Package: python-structlog Followup-For: Bug #1026725 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu lunar ubuntu-patch Control: tags -1 patch
Dear Maintainer, I found that an upstream commit[1] already contained the fix for this. This patch just takes the relevant portion of that commit. Thanks, Nick [1] https://github.com/hynek/structlog/commit/1012f5606b356d4fe1a9027513602c758bf51ab8
diff -Nru python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch --- python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch 1969-12-31 19:00:00.000000000 -0500 +++ python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch 2023-02-08 15:50:24.000000000 -0500 @@ -0,0 +1,20 @@ +Description: Fix test_delattr_missing for python 3.11 +Origin: upstream, https://github.com/hynek/structlog/commit/1012f5606b356d4fe1a9027513602c758bf51ab8 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026725 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-structlog/+bug/2006634 +Last-Update: 2023-02-08 +--- +--- a/tests/test_threadlocal.py ++++ b/tests/test_threadlocal.py +@@ -251,7 +251,10 @@ + with pytest.raises(AttributeError) as e: + d._tl.__delattr__("does_not_exist") + +- assert "does_not_exist" == e.value.args[0] ++ assert e.value.args[0] in ( ++ "does_not_exist", ++ "'_thread._local' object has no attribute 'does_not_exist'", ++ ) + + def test_del(self, D): + """ diff -Nru python-structlog-20.1.0/debian/patches/series python-structlog-20.1.0/debian/patches/series --- python-structlog-20.1.0/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ python-structlog-20.1.0/debian/patches/series 2023-02-08 15:46:13.000000000 -0500 @@ -0,0 +1 @@ +fix-assertion-in-test_delattr_missing.patch