Skip to content

Tighten entry point naming requirements - #2222

Open
woodruffw wants to merge 1 commit into
mainfrom
ww/ep-name
Open

woodruffw wants to merge 1 commit into
mainfrom
ww/ep-name

Conversation

@woodruffw

Copy link
Copy Markdown
Contributor

I think this is not controversial, but we shall see 🙂

TL;DR: this ratchets down on the valid production rules for EP names, specifically in the console_scripts and gui_scripts groups. The EP spec doesn't actually know about the semantics of other groups directly, so it's not easy to declare that they should be similarly restricted.

Both PyPI already rejects EP names (in specified groups only) that run afoul of the pattern suggested here, and also rejects entries literally named . or ... pip has a slightly looser check (it checks parent directory containment). uv's check is also looser, but I plan to tighten it ASAP.

Refs: pypi/warehouse#21080

Signed-off-by: William Woodruff <william@yossarian.net>
@rgommers

rgommers commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Thanks @woodruffw. This seems reasonable at first sight. If PyPI already rejects it, then that's a good reason to make the spec match I'd think - it just avoids confusion. I'll try look at this a bit more carefully on the weekend.

@woodruffw

Copy link
Copy Markdown
Contributor Author

Thanks @rgommers! Yeah, it could definitely use a critical read -- I think it's fine/good overall, but I'll flag some things that are worth extra consideration IMO 🙂

Comment on lines +50 to +51
For new entry points, it is recommended to use only letters, numbers, underscores,
dots and dashes (regex ``[\w.-]+``).

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.

NB: This is the verbatim language from above, just reflowed. Perhaps it makes sense to strengthen it, e.g.:

Suggested change
For new entry points, it is recommended to use only letters, numbers, underscores,
dots and dashes (regex ``[\w.-]+``).
Entry point names **SHOULD** use only letters, numbers, underscores,
dots and dashes (regex ``[\w.-]+``).

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.

(This would match PyPI, which rejects names that don't match that pattern.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants