packages: fix apt_pkg imports (CRAFT-534)
Metadata
Current evaluation
Merged fix for Pyright warnings about non-exported apt_pkg imports. Updated two files to use the top-level apt_pkg module. Approved by two reviewers with passing CI. The warning flagged a long-standing import pattern recently detected by updated static analysis.
Suggested action: —
No scores available.
Issue body
Pyright warns that `apt_pkg` is not exported from module `apt`. Use
the toplevel `apt_pkg` module directly instead.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for Pyright warnings about non-exported apt_pkg imports. Updated two files to use the top-level apt_pkg module. Approved by two reviewers with passing CI. The warning flagged a long-standing import pattern recently detected by updated static analysis. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix updating apt_pkg imports to the toplevel module, resolving Pyright warnings. The change addresses a longstanding linting issue while preserving OS-specific Python-apt dependency handling. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #110 packaging: address linter issues in setup.py (CRAFT-461) | craft-parts | merged | Merged. Resolved linter issues in setup.py to enable make lint and make tests. Approved by two reviewers, passed CI, and modified one file (+12/-6). | |
| #259 deps: update python-apt dependencies | rockcraft | merged | Merged update to python-apt dependencies. Approved by two reviewers and passed CI. Maintainers confirmed merging regardless of pending craft-parts decisions, as stable Launchpad URLs prevent 404 errors. | |
| #123 packaging: update python-apt version (CRAFT-510) | craft-parts | merged | Merged update to python-apt dependency version 2.0.0ubuntu0.20.04.5 to 2.0.0ubuntu0.20.04.6. Approved by two reviewers, passed CI, and addressed a minor URL formatting suggestion. |