[Python-modules-team] Bug#997342: sorl-thumbnail: FTBFS: ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (/usr/lib/python3/dist-packages/django/utils/encoding.py)
Lucas Nussbaum
lucas at debian.org
Sat Oct 23 20:34:48 BST 2021
Source: sorl-thumbnail
Version: 12.5.0-2
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> py3versions: no X-Python3-Version in control file, using supported versions
> mkdir -p tmp-locales
> localedef -i en_US -c -f UTF-8 tmp-locales/en_US.UTF-8
> set -e; \
> for python in python3.9; do \
> for name in pil pgmagick imagemagick graphicsmagick; do \
> LOCPATH=/<<PKGBUILDDIR>>/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=. LOCAL_BUILD=1 DJANGO_SETTINGS_MODULE=tests.settings.$name $python -m pytest ; \
> done; \
> done
> Traceback (most recent call last):
> File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
> return _run_code(code, main_globals, None,
> File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
> exec(code, run_globals)
> File "/usr/lib/python3/dist-packages/pytest/__main__.py", line 5, in <module>
> raise SystemExit(pytest.console_main())
> File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 185, in console_main
> code = main()
> File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 143, in main
> config = _prepareconfig(args, plugins)
> File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 318, in _prepareconfig
> config = pluginmanager.hook.pytest_cmdline_parse(
> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__
> return self._hookexec(self, self.get_hookimpls(), kwargs)
> File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in _hookexec
> return self._inner_hookexec(hook, methods, kwargs)
> File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in <lambda>
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
> File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 203, in _multicall
> gen.send(outcome)
> File "/usr/lib/python3/dist-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
> config: Config = outcome.get_result()
> File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in get_result
> raise ex[1].with_traceback(ex[2])
> File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in _multicall
> res = hook_impl.function(*args)
> File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 1003, in pytest_cmdline_parse
> self.parse(args)
> File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 1283, in parse
> self._preparse(args, addopts=addopts)
> File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 1191, in _preparse
> self.hook.pytest_load_initial_conftests(
> File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__
> return self._hookexec(self, self.get_hookimpls(), kwargs)
> File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in _hookexec
> return self._inner_hookexec(hook, methods, kwargs)
> File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in <lambda>
> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
> File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 208, in _multicall
> return outcome.get_result()
> File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in get_result
> raise ex[1].with_traceback(ex[2])
> File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in _multicall
> res = hook_impl.function(*args)
> File "/usr/lib/python3/dist-packages/pytest_django/plugin.py", line 335, in pytest_load_initial_conftests
> _setup_django()
> File "/usr/lib/python3/dist-packages/pytest_django/plugin.py", line 223, in _setup_django
> django.setup()
> File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
> File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate
> app_config.import_models()
> File "/usr/lib/python3/dist-packages/django/apps/config.py", line 301, in import_models
> self.models_module = import_module(models_module_name)
> File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
> File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
> File "<frozen importlib._bootstrap_external>", line 850, in exec_module
> File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
> File "/<<PKGBUILDDIR>>/sorl/thumbnail/models.py", line 2, in <module>
> from django.utils.encoding import python_2_unicode_compatible
> ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (/usr/lib/python3/dist-packages/django/utils/encoding.py)
> make[1]: *** [debian/rules:24: override_dh_auto_test] Error 1
The full build log is available from:
http://qa-logs.debian.net/2021/10/23/sorl-thumbnail_12.5.0-2_unstable.log
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.
More information about the Python-modules-team
mailing list