Package: python3-django-debug-toolbar Version: 1:1.9.1-1 Severity: serious Tags: patch
Hi, Please find attached to this bug report, a patch to remove Python2 support in your package. Since Django 2.2 was uploaded to Sid (with Py2 removal), your package can't build. After applying the attached patch, I get this, which shows missing Django 2.2 compatibility. FYI, I know how to fix the MIDDLEWARE issue (I did fix similar issues in other packages), but I don't know about the other errors. dh_auto_test I: pybuild base:217: PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests.settings django-admin test tests Creating test database for alias 'default'... ..........................s...........................EEEF...........ssss... ====================================================================== ERROR: test_check_good_configuration (tests.test_integration.DebugToolbarSystemChecksTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3/dist-packages/django/test/utils.py", line 373, in inner return func(*args, **kwargs) File "/<<PKGBUILDDIR>>/tests/test_integration.py", line 339, in test_check_good_configuration messages = run_checks() File "/usr/lib/python3/dist-packages/django/core/checks/registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "/usr/lib/python3/dist-packages/django/contrib/admin/checks.py", line 111, in check_dependencies if not _contains_subclass('django.contrib.auth.middleware.AuthenticationMiddleware', settings.MIDDLEWARE): File "/usr/lib/python3/dist-packages/django/contrib/admin/checks.py", line 41, in _contains_subclass for path in candidate_paths: TypeError: 'NoneType' object is not iterable ====================================================================== ERROR: test_check_gzip_middleware_error (tests.test_integration.DebugToolbarSystemChecksTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3/dist-packages/django/test/utils.py", line 373, in inner return func(*args, **kwargs) File "/<<PKGBUILDDIR>>/tests/test_integration.py", line 365, in test_check_gzip_middleware_error messages = run_checks() File "/usr/lib/python3/dist-packages/django/core/checks/registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "/usr/lib/python3/dist-packages/django/contrib/admin/checks.py", line 111, in check_dependencies if not _contains_subclass('django.contrib.auth.middleware.AuthenticationMiddleware', settings.MIDDLEWARE): File "/usr/lib/python3/dist-packages/django/contrib/admin/checks.py", line 41, in _contains_subclass for path in candidate_paths: TypeError: 'NoneType' object is not iterable ====================================================================== ERROR: test_check_missing_middleware_error (tests.test_integration.DebugToolbarSystemChecksTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3/dist-packages/django/test/utils.py", line 373, in inner return func(*args, **kwargs) File "/<<PKGBUILDDIR>>/tests/test_integration.py", line 344, in test_check_missing_middleware_error messages = run_checks() File "/usr/lib/python3/dist-packages/django/core/checks/registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "/usr/lib/python3/dist-packages/django/contrib/admin/checks.py", line 111, in check_dependencies if not _contains_subclass('django.contrib.auth.middleware.AuthenticationMiddleware', settings.MIDDLEWARE): File "/usr/lib/python3/dist-packages/django/contrib/admin/checks.py", line 41, in _contains_subclass for path in candidate_paths: TypeError: 'NoneType' object is not iterable ====================================================================== FAIL: test_middleware_factory_functions_supported (tests.test_integration.DebugToolbarSystemChecksTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3/dist-packages/django/test/utils.py", line 373, in inner return func(*args, **kwargs) File "/<<PKGBUILDDIR>>/tests/test_integration.py", line 391, in test_middleware_factory_functions_supported self.assertEqual(messages, []) AssertionError: Lists differ: [<Error: level=40, msg="'django.contrib.au[496 chars]10'>] != [] First list contains 3 additional elements. First extra element 0: <Error: level=40, msg="'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application.", hint=None, obj=None, id='admin.E408'> + [] - [<Error: level=40, msg="'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application.", hint=None, obj=None, id='admin.E408'>, - <Error: level=40, msg="'django.contrib.messages.middleware.MessageMiddleware' must be in MIDDLEWARE in order to use the admin application.", hint=None, obj=None, id='admin.E409'>, - <Error: level=40, msg="'django.contrib.sessions.middleware.SessionMiddleware' must be in MIDDLEWARE in order to use the admin application.", hint=None, obj=None, id='admin.E410'>] ---------------------------------------------------------------------- Ran 76 tests in 0.554s FAILED (failures=1, errors=3, skipped=5) Destroying test database for alias 'default'... System check identified no issues (0 silenced). E: pybuild pybuild:341: test: plugin custom failed with: exit code=1: PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests.settings django-admin test tests dh_auto_test: pybuild --test -i python{version} -p 3.7 returned exit code 13 make[1]: *** [debian/rules:13: override_dh_auto_test] Error 255 make[1]: Leaving directory '/<<PKGBUILDDIR>>' make: *** [debian/rules:9: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 2019-07-26T20:34:30Z Finished
From 9c6245ffaae2f1c5dd62937f137c7cb0c31283ad Mon Sep 17 00:00:00 2001 From: Thomas Goirand <z...@debian.org> Date: Fri, 26 Jul 2019 22:31:05 +0200 Subject: [PATCH] * Team upload. * wrap-and-sort -bast. * Removed Python 2 support. * Removed version in python3-sqlparse, useless after Buster. --- debian/changelog | 9 ++++- debian/control | 79 ++++++++++++++++---------------------------- debian/rules | 7 ++-- debian/tests/control | 10 +++++- 4 files changed, 49 insertions(+), 56 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0dd1075..6b7c7e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ python-django-debug-toolbar (1:1.9.1-2) UNRELEASED; urgency=medium + [ Ondřej Nový ] * d/control: Set Vcs-* to salsa.debian.org * d/copyright: Use https protocol in Format field * d/changelog: Remove trailing whitespaces @@ -8,7 +9,13 @@ python-django-debug-toolbar (1:1.9.1-2) UNRELEASED; urgency=medium * Convert git repository from git-dpm to gbp layout * Use debhelper-compat instead of debian/compat. - -- Ondřej Nový <on...@debian.org> Tue, 13 Feb 2018 10:08:38 +0100 + [ Thomas Goirand ] + * Team upload. + * wrap-and-sort -bast. + * Removed Python 2 support. + * Removed version in python3-sqlparse, useless after Buster. + + -- Thomas Goirand <z...@debian.org> Fri, 26 Jul 2019 22:29:45 +0200 python-django-debug-toolbar (1:1.9.1-1) unstable; urgency=medium diff --git a/debian/control b/debian/control index 5dd2c80..6f961b6 100644 --- a/debian/control +++ b/debian/control @@ -2,35 +2,30 @@ Source: python-django-debug-toolbar Section: python Priority: optional Maintainer: Debian Python Modules Team <python-modules-t...@lists.alioth.debian.org> -Uploaders: Andrew Starr-Bochicchio <a...@debian.org> -Build-Depends: debhelper-compat (= 9), - dh-python, - python-all, - python3-all, - python-django, - python3-django, - python-django-jinja, - python3-django-jinja, - python-html5lib, - python3-html5lib, - python-setuptools, - python3-setuptools, - python-sphinx (>= 1.0.7+dfsg-1~), - python-sqlparse (>= 0.2.0), - python3-sqlparse +Uploaders: + Andrew Starr-Bochicchio <a...@debian.org>, +Build-Depends: + debhelper-compat (= 9), + dh-python, + python3-all, + python3-django, + python3-django-jinja, + python3-html5lib, + python3-setuptools, + python3-sphinx, + python3-sqlparse, Standards-Version: 4.1.2 Homepage: https://github.com/django-debug-toolbar/django-debug-toolbar Vcs-Git: https://salsa.debian.org/python-team/modules/python-django-debug-toolbar.git Vcs-Browser: https://salsa.debian.org/python-team/modules/python-django-debug-toolbar -Package: python-django-debug-toolbar +Package: python-django-debug-toolbar-doc Architecture: all -Depends: python-sqlparse (>= 0.2.0), - ${misc:Depends}, - ${python:Depends} -Recommends: python-pygments -Suggests: libjs-jquery, python-django-debug-toolbar-doc -Description: Embedded debugging toolbar for Django projects +Section: doc +Depends: + ${misc:Depends}, + ${sphinxdoc:Depends}, +Description: Embedded debugging toolbar for Django projects (documentation) The Django Debug Toolbar is a plug-in Django application that displays a set of panels which conveys information about the current request at the top of the rendered page. It can show: @@ -45,14 +40,20 @@ Description: Embedded debugging toolbar for Django projects * HTTP headers * Total requests, time, hits and misses of the cache. * Which templates were rendered the context provided to each template. + . + This is the common documentation package. Package: python3-django-debug-toolbar Architecture: all -Depends: python3-sqlparse (>= 0.2.0), - ${misc:Depends}, - ${python3:Depends} -Recommends: python3-pygments -Suggests: libjs-jquery, python-django-debug-toolbar-doc +Depends: + python3-sqlparse, + ${misc:Depends}, + ${python3:Depends}, +Recommends: + python3-pygments, +Suggests: + libjs-jquery, + python-django-debug-toolbar-doc, Description: Embedded debugging toolbar for Django projects (Python 3 version) The Django Debug Toolbar is a plug-in Django application that displays a set of panels which conveys information about the current request at the top of the @@ -70,25 +71,3 @@ Description: Embedded debugging toolbar for Django projects (Python 3 version) * Which templates were rendered the context provided to each template. . This package contains the Python 3 version. - -Package: python-django-debug-toolbar-doc -Architecture: all -Section: doc -Depends: ${sphinxdoc:Depends}, ${misc:Depends} -Description: Embedded debugging toolbar for Django projects (documentation) - The Django Debug Toolbar is a plug-in Django application that displays a set - of panels which conveys information about the current request at the top of the - rendered page. It can show: - . - * Total time taken to process request - * Request variables, including GET, POST, cookie, and session information. - * All SQL queries performed during response creation and processing, - including timing and 'EXPLAIN' output for each query in conjunction with - the total time spent performing SQL queries. If python-pygments is - installed, the SQL syntax is highlighted. - * Current Django version - * HTTP headers - * Total requests, time, hits and misses of the cache. - * Which templates were rendered the context provided to each template. - . - This is the common documentation package. diff --git a/debian/rules b/debian/rules index 1673863..a8d3d30 100755 --- a/debian/rules +++ b/debian/rules @@ -1,13 +1,12 @@ #!/usr/bin/make -f -PYTHON2_VERSIONS=$(shell pyversions -vr) PYTHON3_VERSIONS=$(shell py3versions -vr) -PYTHON_VERSIONS=${PYTHON2_VERSIONS} ${PYTHON3_VERSIONS} +PYTHON_VERSIONS=${PYTHON3_VERSIONS} export PYBUILD_NAME=django-debug-toolbar %: - dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild + dh $@ --with python3,sphinxdoc --buildsystem=pybuild ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: @@ -18,4 +17,4 @@ endif override_dh_auto_build: dh_auto_build - PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html + PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml docs/ build/html diff --git a/debian/tests/control b/debian/tests/control index fe79410..04ec138 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,2 +1,10 @@ Tests: testsuite -Depends: @, python, python-django, python-django-jinja, python3-django-jinja, python-sqlparse, python-html5lib, python3-html5lib +Depends: + python, + python-django, + python-django-jinja, + python-html5lib, + python-sqlparse, + python3-django-jinja, + python3-html5lib, + @, -- 2.20.1