Skip to content

[PULP-2041] Add PEP 592 yank support - #1282

Open
jobselko wants to merge 1 commit into
pulp:mainfrom
jobselko:1270
Open

[PULP-2041] Add PEP 592 yank support#1282
jobselko wants to merge 1 commit into
pulp:mainfrom
jobselko:1270

Conversation

@jobselko

@jobselko jobselko commented Jul 17, 2026

Copy link
Copy Markdown
Member

closes #1270

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@jobselko jobselko self-assigned this Jul 17, 2026
@github-actions github-actions Bot removed the wip label Jul 17, 2026
@jobselko
jobselko force-pushed the 1270 branch 3 times, most recently from ef91173 to 5db692e Compare July 24, 2026 15:05
@github-actions github-actions Bot added the multi-commit Add to bypass single commit lint check label Jul 24, 2026
@jobselko
jobselko force-pushed the 1270 branch 5 times, most recently from 2e9743b to 8222c39 Compare July 28, 2026 14:13
@jobselko

Copy link
Copy Markdown
Member Author

@otaviof fyi

@jobselko
jobselko force-pushed the 1270 branch 2 times, most recently from 6939fc7 to 0d0707c Compare July 30, 2026 10:12
@github-actions github-actions Bot removed multi-commit Add to bypass single commit lint check no-issue labels Jul 30, 2026
closes pulp#1270
Assisted By: Claude Opus 4.6
@jobselko
jobselko marked this pull request as ready for review July 30, 2026 14:19
@jobselko jobselko changed the title [WIP] Add PEP 592 yank support [PULP-2041] Add PEP 592 yank support Jul 30, 2026

Once an entry is removed, packages matching it can be added to the repository again.

## Package Yanking

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.

I think our new convention is for every paragraph to be on one line and allow the markdown render to put in the linebreaks.


if upstream_pkg.is_yanked:
yank_marker = PackageYank(
name_normalized=pkg.name,

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.

Is pkg.name already normalized?

Comment thread pulp_python/app/utils.py
return full_metadata


def latest_content_version(content_query, version):

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.

Passing in all_content is now passing in a list, so update the name to reflect.

Comment thread pulp_python/app/utils.py
Comment on lines +479 to +480
"yanked": content.yanked,
"yanked_reason": content.yanked_reason,

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.

I think these should be getattr since we are manually adding these fields before calling this.

Comment on lines +23 to +27
def yank(distro, name, version, yanked_reason=""):
url = urljoin(distro.base_url, "yank/")
return requests.post(
url, json={"name": name, "version": version, "yanked_reason": yanked_reason}, auth=YANK_AUTH
)

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.

I don't believe we need this. We will generate the bindings for the yank/unyank endpoints. Let's use those instead.

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.

Implement PEP-592 - Adding “Yank” Support

2 participants