Skip to content

Fix relationship overlap warning - #2165

Merged
Zlopez merged 2 commits into
fedora-infra:masterfrom
patelshivani2283-lab:fix-relationship-overlap
Nov 13, 2026
Merged

Zlopez merged 2 commits into
fedora-infra:masterfrom
patelshivani2283-lab:fix-relationship-overlap

Conversation

@patelshivani2283-lab

@patelshivani2283-lab patelshivani2283-lab commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2164

Summary

Fixes the SQLAlchemy SAWarning about overlapping relationship definitions between Project.packages and Packages.project.

Changes

  • Added overlaps="project" to the Project.packages relationship in anitya/db/models.py to silence the warning and prevent potential ORM conflicts.
  • Formatted code according to project style guidelines (Black).
  • Added towncrier news fragment news/2164.bug.

@patelshivani2283-lab
patelshivani2283-lab requested a review from a team as a code owner November 9, 2026 05:52
@mergify

mergify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@patelshivani2283-lab

Copy link
Copy Markdown
Contributor Author

@fedora-infra/anitya Could you please review this PR?

@Zlopez Zlopez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the pull request.

Two things that have to be addressed:

  1. Fix the formatting so the tests are passing
  2. Missing news file (see https://anitya.readthedocs.io/en/latest/contributing.html#release-notes for more details)

Signed-off-by: patelshivani2283-lab <patelshivani2283@gmail.com>
@patelshivani2283-lab

Copy link
Copy Markdown
Contributor Author

Thanks for the review @Zlopez! I have formatted the code with Black and added the news fragment file news/2164.bug.

@Zlopez
Zlopez merged commit d6a7f81 into fedora-infra:master Nov 13, 2026
11 checks passed
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.

SQLAlchemy relationship overlap warning for Project.packages vs Packages.project

2 participants