Skip to content

Fix crash from removed asyncio.coroutine() in search_packages - #3

Open
0x5t4l1n wants to merge 1 commit into
mainfrom
fix/remove-deprecated-asyncio-coroutine
Open

0x5t4l1n wants to merge 1 commit into
mainfrom
fix/remove-deprecated-asyncio-coroutine

Conversation

@0x5t4l1n

@0x5t4l1n 0x5t4l1n commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

asyncio.coroutine was removed in Python 3.11, so searching with source=pacman or source=aur raised AttributeError. The fallback tasks it built were also dead code, since the source=="all" branch already re-invoked the search calls directly instead of awaiting them.

Summary by CodeRabbit

  • Bug Fixes
    • Package searches now query only the selected source when searching Pacman or AUR.
    • “All” searches continue to query both sources concurrently and combine the results.
    • Reduced unnecessary background search activity for single-source queries.

asyncio.coroutine was removed in Python 3.11, so searching with
source=pacman or source=aur raised AttributeError. The fallback
tasks it built were also dead code, since the source=="all" branch
already re-invoked the search calls directly instead of awaiting
them.
@semanticdiff-com

semanticdiff-com Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  backend/services/package_service.py  0% smaller

@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 35585792-e04d-45d4-a78f-b1a47f850e6d

📥 Commits

Reviewing files that changed from the base of the PR and between be37514 and 1b8c6df.

📒 Files selected for processing (1)
  • backend/services/package_service.py
💤 Files with no reviewable changes (1)
  • backend/services/package_service.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

search_packages now selects the requested package source before creating search tasks. The all source still runs pacman and AUR searches concurrently and merges their results.

Changes

Cohort / File(s) Summary
Package search routing
backend/services/package_service.py
Replaces unconditional task creation with direct if/elif routing. The all source retains concurrent searches with exception handling.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 1b8c6

The search update removes the Python 3.11-incompatible coroutine usage without any identified remaining merge-readiness risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: removing the obsolete asyncio.coroutine() usage in search_packages to prevent crashes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/remove-deprecated-asyncio-coroutine

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Fixes Python 3.11+ package-search crashes by removing obsolete coroutine fallback logic.

Changes:

  • Preserves concurrent searches for all sources.
  • Limits single-source searches to the selected backend.
  • Removes unused fallback task creation.
File Description
backend/​services/​package_service.py Removes obsolete coroutine fallback logic.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants