Merge ~lvoytek/ubuntu/+source/python-django-celery-results:django4-compatibility into ubuntu/+source/python-django-celery-results:ubuntu/devel

Proposed by Lena Voytek
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: 8ff11e0c652c05e8ea70d327c867aaf513928b36
Proposed branch: ~lvoytek/ubuntu/+source/python-django-celery-results:django4-compatibility
Merge into: ubuntu/+source/python-django-celery-results:ubuntu/devel
Diff against target: 53 lines (+13/-3)
3 files modified
debian/changelog (+9/-0)
debian/control (+3/-2)
debian/tests/upstream (+1/-1)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Julian Andres Klode (community) Approve
Canonical Server Pending
Canonical Server Reporter Pending
Review via email: mp+450276@code.launchpad.net

Description of the change

Fix autopkgtest against Django 4.2 by running with non-deprecated psycopg 3 and using the upstream pytest configuration file.

Note that this has to be run against psycopg 3.1.8 which was just uploaded to mantic and may need some time to settle.

PPA: https://launchpad.net/~lvoytek/+archive/ubuntu/django-4-mantic

Local autopkgtest results:

autopkgtest [12:41:26]: @@@@@@@@@@@@@@@@@@@@ summary
upstream PASS
autodep8-python3 PASS (superficial)
qemu-system-x86_64: terminating on signal 15 from pid 64343 (/usr/bin/python3)

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) :
review: Approve
Revision history for this message
Julian Andres Klode (juliank) wrote :

Sponsoring this, just running tests here - hopefully.

Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: juliank, lvoytek
Uploaders: juliank
MP auto-approved

review: Approve
Revision history for this message
Julian Andres Klode (juliank) wrote :

Sponsored!

FWIW it failed to build using

autopkgtest -U python-django-celery-results_2.5.1-1ubuntu1_source.changes -- podman ubuntu:mantic

apparently because it benchmarks a test case and it took 1.24s, which is longer than the 1s allowed. Doing the same with lxd --vm ubuntu-daily:mantic as the backend worked, but this seems to be a fragile test that's worth disabling for the future.

Test failure log:

> assert self.benchmark.stats.stats.max < 1
E assert 1.231338843004778 < 1
E + where 1.231338843004778 = <pytest_benchmark.stats.Stats object at 0x55060bad10>.max
E + where <pytest_benchmark.stats.Stats object at 0x55060bad10> = <pytest_benchmark.stats.Metadata object at 0x55060ba610>.stats
E + where <pytest_benchmark.stats.Metadata object at 0x55060ba610> = <pytest_benchmark.fixture.BenchmarkFixture object at 0x5505be5b90>.stats
E + where <pytest_benchmark.fixture.BenchmarkFixture object at 0x5505be5b90> = <t.integration.benchmark_models.benchmark_Models testMethod=test_taskresult_delete_expired>.benchmark

-------------------------------------------------- benchmark: 1 tests -------------------------------------------------
Name (time in s) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
-----------------------------------------------------------------------------------------------------------------------
test_taskresult_delete_expired 1.2313 1.2313 1.2313 0.0000 1.2313 0.0000 0;0 0.8121 1 1
-----------------------------------------------------------------------------------------------------------------------

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 47608fd..74b168e 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+python-django-celery-results (2.5.1-1ubuntu1) mantic; urgency=medium
7+
8+ * d/control: Upgrade to psycopg 3 for compatibility with Django 4 in test
9+ suite (LP: #2022089)
10+ * d/t/upstream: Add pytest conftest file when running upstream test suite.
11+ Including the file tells pytest to not run benchmarks as intended.
12+
13+ -- Lena Voytek <lena.voytek@canonical.com> Mon, 28 Aug 2023 12:59:01 -0700
14+
15 python-django-celery-results (2.5.1-1) unstable; urgency=medium
16
17 * Use github tags instead of releases for d/watch.
18diff --git a/debian/control b/debian/control
19index d82fbc2..35cf114 100644
20--- a/debian/control
21+++ b/debian/control
22@@ -1,7 +1,8 @@
23 Source: python-django-celery-results
24 Section: python
25 Priority: optional
26-Maintainer: Debian Python Team <team+python@tracker.debian.org>
27+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28+XSBC-Original-Maintainer: Debian Python Team <team+python@tracker.debian.org>
29 Uploaders:
30 Michael Fladischer <fladi@debian.org>,
31 Build-Depends:
32@@ -12,7 +13,7 @@ Build-Depends:
33 python3-celery,
34 python3-django,
35 python3-mock,
36- python3-psycopg2,
37+ python3-psycopg,
38 python3-pytest,
39 python3-pytest-benchmark,
40 python3-pytest-django,
41diff --git a/debian/tests/upstream b/debian/tests/upstream
42index 32eae52..02c26a8 100644
43--- a/debian/tests/upstream
44+++ b/debian/tests/upstream
45@@ -4,7 +4,7 @@ set -e
46
47 runuser -u postgres -- psql -f $(pwd)/debian/tests/init.sql
48
49-cp -r t setup.cfg manage.py ${AUTOPKGTEST_TMP}
50+cp -r t setup.cfg manage.py conftest.py ${AUTOPKGTEST_TMP}
51 cd ${AUTOPKGTEST_TMP}
52 for p in $(py3versions -s); do
53 $p -m pytest

Subscribers

People subscribed via source and target branches

to all changes: