-
Notifications
You must be signed in to change notification settings - Fork 260
fix: use readme text directly instead of constructing path #914
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
base: main
Are you sure you want to change the base?
Conversation
When readme is specified as inline text in pyproject.toml
(e.g. readme = { text = "some text", content-type = "text/markdown" }),
the text content was incorrectly being joined with the project root path
via `root / readme["text"]`, producing a bogus path instead of using
the text directly.
Fixes python-poetry/poetry#10714
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts how inline README text from pyproject.toml is handled by the Factory, and adds a regression test to verify correct readme content and content-type extraction. Sequence diagram for handling inline README text in package metadatasequenceDiagram
actor Developer
participant PoetryCLI
participant Factory
participant Package
Developer->>PoetryCLI: Run build / publish with pyproject.toml
PoetryCLI->>Factory: _configure_package_metadata(pyproject, root, package)
Factory->>Factory: Detect readme.text in tool.poetry.readme
Factory->>Package: set readme_content(readme.text)
Factory->>Package: set readme_content_type(readme.content-type)
PoetryCLI->>Package: Read readme_content and readme_content_type for packaging
Package-->>PoetryCLI: Inline README content used directly
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.
We failed to fetch pull request #914.
You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.
Fixes python-poetry/poetry#10714
When readme is specified as inline text in pyproject.toml, the text was incorrectly joined with the project root path. Changed to use the text value directly.
Added test_create_poetry_inline_readme_text.
Summary by Sourcery
Handle inline README text correctly when creating Poetry packages.
Bug Fixes:
Tests: