Thanks to visit codestin.com
Credit goes to github.com

Skip to content

EntryPoints treated as sortable but not tested #267

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

Closed
jaraco opened this issue Dec 6, 2020 · 2 comments
Closed

EntryPoints treated as sortable but not tested #267

jaraco opened this issue Dec 6, 2020 · 2 comments

Comments

@jaraco
Copy link
Member

jaraco commented Dec 6, 2020

In #266, we stumbled onto a case where flake8 sorts entry points, adding an implicit contract on the EntryPoint class.

Assuming this project wishes to support that behavior, it should have a test to capture it directly.

@jaraco jaraco closed this as completed in eb839a6 Dec 6, 2020
@jaraco
Copy link
Member Author

jaraco commented Dec 6, 2020

@asottile Can you add some background on why flake8 sorts entry points and what it expects from the sorting? In eb839a6, the tests now ensure that the entry points are sortable, but doesn't provide any guarantees on what the sorted order is. What would you expect by sorting them?

@asottile
Copy link
Contributor

asottile commented Dec 6, 2020

it does this for two reasons:

(1) startup consistency (we were seeing hard-to-debug 50/50 bugs based on plugin load order and broken monkeypatching)
(2) so that the plugins list in the --version output is sorted

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

No branches or pull requests

2 participants