Skip to content

Document whitespace in quoted dependency specifiers#2044

Open
Herrtian wants to merge 1 commit into
pypa:mainfrom
Herrtian:document-spaced-dependency-specifiers
Open

Document whitespace in quoted dependency specifiers#2044
Herrtian wants to merge 1 commit into
pypa:mainfrom
Herrtian:document-spaced-dependency-specifiers

Conversation

@Herrtian
Copy link
Copy Markdown
Contributor

@Herrtian Herrtian commented May 10, 2026

Closes #1226.

Adds a short note that quoted dependency specifier strings may keep optional whitespace for readability.

Checks: uv run --with pre-commit pre-commit run --files source/specifications/dependency-specifiers.rst; uv run --with nox nox -s build


📚 Documentation preview 📚: https://python-packaging-user-guide--2044.org.readthedocs.build/en/2044/

the dependency can be made conditional using environment markers.
When a dependency specifier is written as a quoted string, authors may keep
optional whitespace for readability, such as around version specifiers and
version clauses.
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 this note is in the wrong section.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved this under Whitespace.

@Herrtian Herrtian force-pushed the document-spaced-dependency-specifiers branch from 8d3a2c1 to 81c0f97 Compare May 12, 2026 14:05
version limits, or giving the URL to a specific artifact to install. Finally
the dependency can be made conditional using environment markers.

Grammar
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.

Suggested change
Grammar
Grammar


Non line-breaking whitespace is mostly optional with no semantic meaning. The
sole exception is detecting the end of a URL requirement.
When a dependency specifier is written as a quoted string, authors may keep
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.

Suggested change
When a dependency specifier is written as a quoted string, authors may keep
When a dependency specifier is written as a quoted string, authors may keep

@Herrtian Herrtian force-pushed the document-spaced-dependency-specifiers branch from 81c0f97 to 0f444ba Compare May 13, 2026 12:46
@Herrtian
Copy link
Copy Markdown
Contributor Author

Added the requested blank lines.

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.

Document that sparse identifiers with whitespace are valid if quoted

2 participants