-
Notifications
You must be signed in to change notification settings - Fork 254
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
PEP 753 #807
base: main
Are you sure you want to change the base?
PEP 753 #807
Conversation
Reviewer's Guide by SourceryThis PR implements PEP 753 by migrating from the use of Home-page and Download-URL fields to the sole use of Project-URL fields for package metadata. It also fixes inconsistencies in handling URLs and cleans up URL-related code. Sequence diagram for updated URL metadata handlingsequenceDiagram
participant Package
participant Factory
participant Metadata
Factory->>Package: Configure package metadata
Note over Factory: Process URLs from project config
Factory->>Package: Set homepage
Factory->>Package: Set repository_url
Factory->>Package: Set documentation_url
Factory->>Package: Set custom_urls
Package->>Metadata: Convert to metadata
Note over Metadata: Generate project_urls
Note over Metadata: No longer includes Home-page field
Class diagram for metadata handling changesclassDiagram
class Package {
+homepage: str
+repository_url: str
+documentation_url: str
+custom_urls: dict
+urls: dict
}
class Metadata {
+project_urls: tuple
+home_page: str
-from_package(package: Package)
+get_metadata_content()
}
class Factory {
-_configure_package_metadata()
}
Factory ..> Package: configures
Package ..> Metadata: converts to
note for Metadata "Removed Home-page field
Only uses Project-URL"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @dimbleby - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
anticipating python-poetry/poetry-core#807
Also fixes python-poetry/poetry#9957
PEP 753 says
since this is all kinda broken at the moment anyway - #803 etc - it is a good opportunity to fix that
Breaks a couple of downstream tests that expect "Home-page" and do not expect the "Project-URL: Homepage". I suppose we could do that horrid dance where poetry tests briefly tolerate both. But anticipating that there will surely be new releases fairly promptly of both projects - for various bits of 2.0 fallout - perhaps we can skip that unpleasantness and tolerate the downstream tests being broken for a small window...
Summary by Sourcery
Update metadata generation to follow PEP 753. Emit "Project-URL" instead of "Home-page" or "Download-URL".
Enhancements:
Tests: