Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow general requirements as PyPISpec inputs #129

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

nicholasjng
Copy link
Contributor

@nicholasjng nicholasjng commented Jan 12, 2025

Requirements are processed as dictated by packaging.requirements.Requirement.

In essence, this also allows auditing a pinned requirements.txt file as generated e.g. by uv pip compile.

Caveat: Only PyPI URLs are audited, no custom indexes / git dependencies are supported.


A CLI test on this branch:

$ abi3audit -v "google-benchmark>=1.8.0,<2"
[10:41:20] 💁 google-benchmark>=1.8.0,<2: 5 extensions scanned; 0 ABI version mismatches and 0 ABI violations found 

Requirement errors are given as hints to the processing error:

$ abi3audit -v "google-benchm?rk>=1.8.0,<2"
[10:42:51] 👎 processing error: 'google-benchm?rk>=1.8.0,<2' does not look like a valid wheel, shared object, or package name                                                   
           hint: Expected end or semicolon (after name and no valid version specifier)                                                                                          
               google-benchm?rk>=1.8.0,<2                                                                                                                                       
                            ^ 

Requirements are processed as dictated by `packaging.requirements.Requirement`.

In essence, this also allows auditing e.g. a pinned requirements.txt file
as generated e.g. by `uv pip compile`.

Caveat: Only PyPI URLs are audited, no custom indexes / git dependencies are supported.
@nicholasjng nicholasjng force-pushed the add-version-identifiers branch from f12c178 to f5e1815 Compare January 12, 2025 13:16
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

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

Thanks!

@woodruffw woodruffw merged commit c449a57 into pypa:main Jan 12, 2025
12 checks passed
@nicholasjng nicholasjng deleted the add-version-identifiers branch January 13, 2025 12:01
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