ubuntu-dev-tools (0.208)
[PTS] [DDPO]
COMMITS: VCS has seen 32 commits since the debian/0.207 tag
- Git: https://git.launchpad.net/ubuntu-dev-tools
-
- Branch: main
- Path: debian/changelog
- Repo size: 17973248
- Browser: https://git.launchpad.net/ubuntu-dev-tools
- Last scan: 2025-12-09 02:11:10+00
- Next scan: 2025-12-10 06:09:00+00
- Debian changelog in Git:
ubuntu-dev-tools (0.208) unstable; urgency=medium
[ Gianfranco Costamagna ]
* ubuntu-build: consider amd64v3 as valid architecture
[ Sebastien Bacher ]
* ubuntu-build: fix non batch mode errors.
[ Benjamin Drung ]
* Format code with black and isort
* ubuntutools/pullpkg.py: initialize vcscmd
* make pylint and mypy happy
* mark non-returning functions with typing.NoReturn
* run-linters: add --errors-only mode and run this during package build
* Drop Lintian overrides related to .pyc files
* Drop obsolete Rules-Requires-Root: no
* run mypy during package build
* sponsor-patch: stop checking for bzr being present
* Modernize SourcePackage._run_lintian()
* requestsync: support pocket parameter in get_ubuntu_srcpkg (LP: #2115990)
-- Benjamin Drung <bdrung@debian.org> Wed, 03 Dec 2025 16:33:47 +0100
- This branch is 32 commits ahead of tag debian/0.207
- Git log:
commit 7f5e9c8680e1b2c8416c42412519790d623b601b
Author: Florent 'Skia' Jacquet <florent.jacquet@canonical.com>
Date: Mon Jun 16 12:08:35 2025 +0200
pm-helper: make use of YesNoQuestion
commit d35268b7972cf59003b829faefdb94ddb895195c
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 16:33:51 2025 +0100
Release ubuntu-dev-tools 0.208
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
commit bf9ead2204ef41ad91f88c4aed274959f0d4a660
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 16:25:28 2025 +0100
requestsync: support pocket parameter in get_ubuntu_srcpkg
The command `requestsync --email -d sid <package> <target>` fails with
the following stacktrace:
```
Traceback (most recent call last):
File "/usr/bin/requestsync", line 402, in <module>
main()
File "/usr/bin/requestsync", line 225, in main
ubuntu_srcpkg = get_ubuntu_srcpkg(srcpkg, args.release, "Proposed")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: get_ubuntu_srcpkg() takes 2 positional arguments but 3 were given
```
LP: #2115990
Fixes: 5eb960dd3fe57daa16d8cee8cefee035cebb8e5d
commit 38988ed183c2fe6720d964cddf4d5a1127f7cbf6
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 15:43:23 2025 +0100
Modernize SourcePackage._run_lintian()
commit 5e2f94cdb4589f1a59535d7db07c3db29020f2ae
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 15:34:17 2025 +0100
SourcePackage: introduce package_and_version
Introduce `package_and_version` to avoid code duplication.
commit 29914382cf73affbfce9a693199b51d0dd64c1d4
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 15:21:27 2025 +0100
ubuntu-build: introduce parse_args helper function
Move the argument parsing code into a separate `parse_args` function to
make the `main` function a little bit smaller.
The `IndexError` on accessing `args.packages` cannot happen.
commit addeb4f7fb7149e71140660e10db9f238a7364d0
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 15:10:17 2025 +0100
sponsor-patch: stop checking for bzr being present
commit ee87f312bf692d73c036f46939e6b7e9bed7ccf7
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:54:54 2025 +0100
run mypy during package build
commit 32530e356d55d90f341be00b3d96b795e84a8cf4
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:51:51 2025 +0100
run-linters: avoid searching scripts in build/
During package build the Python code is copied to the `build` directory.
Ignore this directory when searching for Python scripts.
commit 38ef3c506e8f643d1424ce2b13b44ac600385ddf
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:40:47 2025 +0100
Run wrap-and-sort -ast
commit 5fc7e15f965e7a87770ab07ead6a23a3665cd5d8
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:37:33 2025 +0100
Fix type annotation for resource_type
mypy complains:
```
ubuntutools/lp/lpapicache.py:143: error: Incompatible types in assignment (expression has type "None", variable has type "str") [assignment]
ubuntutools/lp/lpapicache.py:1328: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "BaseWrapper" defined the type as "str") [assignment]
```
commit f0326592bd183fed9499cb15ec1720bcede9a02d
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:36:49 2025 +0100
add type annotation for mypy
mypy comlains:
```
ubuntutools/config.py:53: error: Need type annotation for "config" (hint: "config: dict[<type>, <type>] = ...") [var-annotated]
ubuntutools/lp/lpapicache.py:1504: error: Need type annotation for "_source_sets" (hint: "_source_sets: dict[<type>, <type>] = ...") [var-annotated]
```
commit aa439fec02a10fbca982e937867e770179281e9f
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:35:04 2025 +0100
add missing return type annotation
commit 4bcfa0dd5a51b889beba2892e4fe7836b8bebe46
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:17:06 2025 +0100
.pylintrc: ignore too-many-positional-arguments for now
commit 63b3d54264e901725591f988ec17567947c10689
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:15:06 2025 +0100
Drop obsolete Rules-Requires-Root: no
commit 654af1a61306397cdc57bac885b992eebc7af56e
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:14:20 2025 +0100
Drop Lintian overrides related to .pyc files
.pyc files should not be included in the source tarball.
commit 524f590af2cbf6561edcb761076aa38d7ca70ae1
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:11:36 2025 +0100
Run linters that can detect real errors on package build
commit 4a2f194860c519c191a27d3051d3c3859991dfb9
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:10:11 2025 +0100
run-linters: add --errors-only mode
Add `--errors-only` that runs only linters that can detect real errors
and all other ignoring the result.
commit 7b9aee4c0cefb198e1a1ca6b0fc03610fc2742ba
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:07:56 2025 +0100
run-linters: introduce helper functions
commit 45d317cc878f064a8718ce994804751e9833d282
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 14:01:18 2025 +0100
mark non-returning functions with typing.NoReturn
To help pylint, mark non-returning functions with `typing.NoReturn`.
commit 2e041ac1ffb106c89d1a6fede597a6aa23181df2
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 13:59:06 2025 +0100
syncpackage: replace global by LRU cache
pylint complains:
```
syncpackage:459:4: W0603: Using the global statement (global-statement)
```
Replace the `global` statement by `functools.lru_cache`.
commit c8fe72456073204c59fd527448dc2539c70f1939
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 13:51:50 2025 +0100
Fix pylint in ubuntutools/test/test_requestsync.py
pylint complains:
```
ubuntutools/test/test_requestsync.py:31:12: C0415: Import outside toplevel (keyring) (import-outside-toplevel)
ubuntutools/test/test_requestsync.py:33:12: W0707: Consider explicitly re-raising using 'except ModuleNotFoundError as exc' and 'raise ModuleNotFoundError('package python3-keyring is not installed') from exc' (raise-missing-from)
ubuntutools/test/test_requestsync.py:31:12: W0611: Unused import keyring (unused-import)
```
commit 768a51737056d376477372e974b21492a68584bb
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 13:47:54 2025 +0100
ubuntutools/archive.py: use 'yield from'
pylint complains:
```
ubuntutools/archive.py:343:8: R1737: Use 'yield from' directly instead of yielding each element one by one (use-yield-from)
ubuntutools/archive.py:346:8: R1737: Use 'yield from' directly instead of yielding each element one by one (use-yield-from)
ubuntutools/archive.py:638:8: R1737: Use 'yield from' directly instead of yielding each element one by one (use-yield-from)
```
commit 3d2ee5a1b7388acbbc46a1b1ab3527ae216a0e8b
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 13:45:46 2025 +0100
ubuntutools/archive.py: do not raise general exception
pylint complains:
```
ubuntutools/archive.py:935:8: W0719: Raising too general exception: Exception (broad-exception-raised)
```
commit 1c81f0872d27852afed69fa3fc20e2b9c664227e
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 13:36:48 2025 +0100
Use lazy % formatting in logging functions
pylint complains:
```
W1201: Use lazy % formatting in logging functions
```
commit ef5e3d80666387621b722f29624170125a2b0dfc
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 13:32:33 2025 +0100
requestsync: silence possibly-used-before-assignment
pylint complains:
```
requestsync:156:34: E0606: Possibly using variable 'bug_mail_domain' before assignment (possibly-used-before-assignment)
requestsync:217:27: E0606: Possibly using variable 'Distribution' before assignment (possibly-used-before-assignment)
requestsync:380:8: E0606: Possibly using variable 'post_bug' before assignment (possibly-used-before-assignment)
```
These errors are false positives. So silence them. The perfect solution
would be to restructure the code.
commit 816323ea5c52adf9c5649f9ae6bee022481f4106
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 13:21:19 2025 +0100
sponsor_patch: make pylint happy
pylint complains:
```
ubuntutools/sponsor_patch/sponsor_patch.py:243:45: E0606: Possibly using variable 'task' before assignment (possibly-used-before-assignment)
```
Drop the `len(ubuntu_tasks) > 1` check and rely on being the else case.
commit 41e7d2d714217b7be7cabfc45176df38a3cd5c2d
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 13:11:47 2025 +0100
ubuntutools/pullpkg.py: initialize vcscmd
Fixes: 2f396fe54956
commit 7e82344d577f602c3b2ed56a4d224fd8abf49abb
Author: Sebastien Bacher <sebastien.bacher@canonical.com>
Date: Wed Dec 3 10:24:14 2025 +0100
ubuntu-build: fix non batch mode errors
The current version is not working
```
$ ubuntu-build librsync resolute retry
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 354, in __getattr__
return self.lp_get_parameter(attr)
~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 249, in lp_get_parameter
raise KeyError("No such parameter: %s" % param_name)
KeyError: 'No such parameter: getComponent'
```
The way launchpadlib is used was changed in 010af53 but non batch mode
was not correctly updated.
Also tweak the way the release is computed for distroseries to be able
to retry a package in e.g "resolute-proposed".
commit cf88f4b92f3b7a3149a1c89a992894192541b507
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 12:24:47 2025 +0100
syncpackage: do not use bare except for urlopen()
flake8 complains:
```
./syncpackage:465:9: E722 do not use bare 'except'
```
The function `urllib.request.urlopen` might throw
`urllib.error.URLError`, `urllib.error.HTTPError`, `socket.gaierror`,
`ssl.SSLError` which are all subclasses of `OSError`.
commit c6a4c10da250fa561fed87e25579b8d73272cf2c
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Dec 3 12:01:23 2025 +0100
Format code with black and isort
```
isort .
black -C . $(grep -l -r '^#! */usr/bin/python3$' .)
```
commit dff0b269d29074aa0febcdee3a036d24c716df4f
Author: Gianfranco Costamagna <locutusofborg@debian.org>
Date: Sun Oct 19 09:29:46 2025 +0200
ubuntu-build: consider amd64v3 as valid architecture