-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fix unicode entrypoint issue #254
base: main
Are you sure you want to change the base?
Conversation
Fix for unicode identifiers
src/installer/utils.py
Outdated
module = match.group("module") | ||
assert isinstance(module, str) | ||
module, attrs = [x.strip() for x in value.split(":", 1)] | ||
assert len(module) |
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.
Should also check module
is a valid identifier
Thanks, done! I also have a doubt - in the test files, entrypoints are not quoted. However, in a yaml file, the value (attrs) would always be quoted and the key (module) could optionally be quoted as well. I also did not understand the |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Fixes #252 |
It's a legacy distutils/setuptools thing, that allowed for a conditional installation of the entrypoint based on the chosen extra. It's not a standard anymore, but we should keep it working and the new implementation should consider it a viable (although ignored) part of an entrypoint spec. |
Fixes: #252
Test for valid unicode Python identifiers (https://peps.python.org/pep-3131/) in entrypoints. Should reproduce #252 .