chore: resolve deprecation warnings
Metadata
Current evaluation
Merged PR #5540 as commit 93e9c9237, fixing deprecation warnings and closing #5539.
Resolution: closed resolved
Reason: PR #5540 was merged as commit 93e9c9237. It resolved upcoming deprecation errors, including incorrect Path mocking where a context-manager-capable generator was required, and explicitly closed #5539.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `make lint`?
- [x] Have you successfully run `make test`?
---
Fixes some deprecation warnings before they become deprecation errors. Two of the fixes were very simple, but the one involving the context manager was a little bit messier.
In short, the test mocking setup was setting the return value of a context manager to a simple `Path`, when it needed to be a generator object that supported the `__enter__()` method. This wasn't an issue previously since `Path` just did a no-op as a context manager, but now it needs to be correct.
Closes #5539.
SNAPCRAFT-1159
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #5540 as commit 93e9c9237, fixing deprecation warnings and closing #5539. | |
| stealth/space-bunny-alpha | — | closed resolved | PR #5540 merged as commit 93e9c923 (SNAPCRAFT-1159), fixing three deprecation warnings, including replacing a Path mock with a generator-based context manager; closed issue #5539. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #5540 as 93e9c923, fixing three deprecation warnings and replacing a Path mock with a generator-based context manager; closed #5539. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged to resolve deprecation warnings before they become errors. Updates test mocking context manager setup. Approved by two reviewers and merged despite one failing integration test. Closes #5539. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to resolve deprecation warnings. Updates test mocking to correctly return generator objects for context managers, preventing future errors. Closes #5539. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
snapcraft#5539
(confidence 100%)
PR #5540 explicitly closes and resolves issue #5539.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5094 chore: fix deprecation warnings | snapcraft | merged | Merged PR #5094 in commit 0633e5a65, fixing library deprecation warnings across five files (+16/-14 lines). | |
| #122 chore: eliminate pydantic warnings | craft-archives | merged | Merged PR #122 eliminated Pydantic warnings, landing as commit 00b9b3b after approval by two reviewers. | |
| #2861 chore: remove prime key deprecation warning | charmcraft | merged | Merged PR #2861 (commit a8f40566) removed the obsolete prime key deprecation warning and fixed #1786. | |
| #191 chore(deps): update development dependencies (non-major) - autoclosed | craft-store | closed | Renovate PR #437 was auto-closed unmerged after 790 days; no resolving commit was provided. | |
| #1040 chore(merge): 2.4.3 into main | craft-parts | merged | Merged version 2.4.3 into main via PR #1040, landing as commit fab7fa92 after two reviewer approvals. | |
| #1078 chore!: remove deprecated APIs | craft-application | merged | Merged PR #1078 as 3334f13e, removing eight deprecated APIs and fixing #1063. All CI checks passed, with local Snapcraft verification. | |
| #1776 chore: remove unused code | charmcraft | merged | Merged PR #1776 as commit 027696be, deleting 17,571 lines of unused code across 36 files after maintainer review and approval. | |
| #794 chore: remove pydantic warnings | craft-parts | merged | Merged as commit 5c1c7dd3, incorporating craft-archives PR #122 (commit 00b9b3b) to eliminate Pydantic deprecation warnings. | |
| #5524 chore: add deprecation warnings for hidden commands | snapcraft | merged | Merged as commit 1996340d9 via #5524, adding uniform deprecation warnings for hidden commands and redirecting reference docs; default-command warning remained in #5525. | |
| #364 chore(deps): update dependencies | rockcraft | merged | Merged dependency updates in PR #364 via commit 1661d115, changing seven files (+152/-174) after approval by two reviewers. |