← Back to issue list

Fix upcoming deprecations

View original Github issue

Metadata

Project
snapcraft
Number
#5539
Type
issue
State
closed
Author
mr-cal
Labels
good first issue Status: Triaged Type: Cleanup
Created
Updated
Closed

Current evaluation

All three deprecation warnings were fixed by merged PR #5540 (commit 93e9c9237), which closed #5539 and updated the affected imports and test context-manager usage.

Resolution: closed resolved

Reason: PR #5540 merged as commit 93e9c9237 and explicitly closed #5539. It fixed the three make test-fast warnings, including replacing a Path mock with a generator-based context manager.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Fix the following deprecation warnings: ``` snapcraft_legacy/internal/states/_global_state.py:25 snapcraft/snapcraft_legacy/internal/states/_global_state.py:25: DeprecationWarning: mypy_extensions.TypedDict is deprecated, and will be removed in a future version. Use typing.TypedDict or typing_extensions.TypedDict instead. StateDict = TypedDict( ``` ``` tests/unit/test_application.py::test_application_extra_yaml_transforms snapcraft/tests/unit/test_application.py:192: DeprecationWarning: Do not get the project directly from the Application. Get it from the project service. project = app.get_project() ``` ``` tests/unit/test_providers.py::test_capture_logs_from_instance /build/source/snapcraft/providers.py:115: DeprecationWarning: pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13; Path objects as a context manager is a no-op with instance.temporarily_pull_file( ``` These 3 warnings are visible when running `make test-fast`. ### Why it needs to get done So Snapcraft works on newer versions of Python without warnings. Source: https://github.com/NixOS/nixpkgs/pull/414493

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved All three deprecation warnings were fixed by merged PR #5540 (commit 93e9c9237), which closed #5539 and updated the affected imports and test context-manager usage.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #5540 (commit 93e9c9237), which resolved all three deprecation warnings and closed #5539.
stealth/space-bunny-alpha — closed resolved Merged PR #5094 (commit 0633e5a65) fixed the three deprecation warnings emitted by make test-fast on newer Python versions.
qwen/qwen3.6-35b-a3b — — Abandoned after 458 days. The cleanup task to fix three Python deprecation warnings was closed without resolution or an associated pull request.
qwen/qwen3.6-35b-a3b — — Abandoned. The request to fix three Python deprecation warnings was closed without implementation due to inactivity. No pull request was submitted or merged to resolve the warnings.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution after 405 days of inactivity. No pull requests were submitted to address the three Python deprecation warnings. The issue was abandoned due to lack of contributor engagement.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#5540 (confidence 100%)

    Direct resolving PR; its merged commit is identified as closing #5539.

Related issues

No related issues found above the similarity threshold.