Bug#1026725: python-structlog: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.11 3.10" returned exit code 13
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.0 -0500 +++ python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch 2023-02-08 15:50:24.0 -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.0 -0500 +++ python-structlog-20.1.0/debian/patches/series 2023-02-08 15:46:13.0 -0500 @@ -0,0 +1 @@ +fix-assertion-in-test_delattr_missing.patch
Bug#1026725: python-structlog: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.11 3.10" returned exit code 13
Source: python-structlog Version: 20.1.0-3 Severity: serious Justification: FTBFS Tags: bookworm sid ftbfs User: lu...@debian.org Usertags: ftbfs-20221220 ftbfs-bookworm Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > make[2]: Entering directory '/<>/docs' > sphinx-build -n -b html -d _build/doctrees . _build/html > Running Sphinx v5.3.0 > making output directory... done > loading intersphinx inventory from https://docs.python.org/3/objects.inv... > WARNING: failed to reach any of the inventories with the following issues: > intersphinx inventory 'https://docs.python.org/3/objects.inv' not fetchable > due to : > HTTPSConnectionPool(host='docs.python.org', port=443): Max retries exceeded > with url: /3/objects.inv (Caused by ProxyError('Cannot connect to proxy.', > NewConnectionError(' 0x7ff139d8ef80>: Failed to establish a new connection: [Errno 111] Connection > refused'))) > building [mo]: targets for 0 po files that are out of date > building [html]: targets for 21 source files that are out of date > updating environment: [new config] 21 added, 0 changed, 0 removed > reading sources... [ 4%] api > reading sources... [ 9%] backward-compatibility > reading sources... [ 14%] changelog > reading sources... [ 19%] configuration > reading sources... [ 23%] contextvars > reading sources... [ 28%] contributing > reading sources... [ 33%] custom-wrappers > reading sources... [ 38%] development > reading sources... [ 42%] examples > reading sources... [ 47%] getting-started > reading sources... [ 52%] index > reading sources... [ 57%] license > reading sources... [ 61%] loggers > reading sources... [ 66%] logging-best-practices > reading sources... [ 71%] performance > reading sources... [ 76%] processors > reading sources... [ 80%] standard-library > reading sources... [ 85%] testing > reading sources... [ 90%] thread-local > reading sources... [ 95%] twisted > reading sources... [100%] why > > WARNING: autodoc: failed to import function 'get_logger' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'getLogger' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'wrap_logger' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'configure' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'configure_once' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'reset_defaults' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'is_configured' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'get_config' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import class 'BoundLogger' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import class 'PrintLogger' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import class 'PrintLoggerFactory' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import exception 'DropEvent' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import class 'BoundLoggerBase' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import module 'dev' from module 'structlog'; the > following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import class 'ConsoleRenderer' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'set_exc_info' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import module 'testing' from module 'structlog'; > the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import function 'capture_logs' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import class 'LogCapture' from module > 'structlog'; the following exception was raised: > No module named 'structlog' > WARNING: autodoc: failed to import class 'ReturnLogger' from module > 'structlog'; the