Skip to content

Version 2.0 #40

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

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Version 2.0 #40

wants to merge 30 commits into from

Conversation

geowurster
Copy link
Member

@geowurster geowurster commented Jun 9, 2025

Version 2.0

No major changes to the functionality of the library, but major changes for the
project. This PR is quite large, and the project's end state can be viewed at:

https://github.com/click-contrib/click-plugins/tree/v2-vendorized

I no longer have the capacity or interest in maintaining this project, and I
am not really interested in vetting other potential owners. Instead, I am
switching to a model where users can either vendor
a single file, or use the project as a reference implementation. Issues like
#23 and #31 are great examples of where this package struggles, and where
vendoring allows for better or more opinionated solutions that are appropriate
for specific use cases or environments.

End State

This PR puts the project in a state where it has:

Python Package

One major change is that the project no longer directly supports building a
pip package – meaning that it no longer provides a setup.py,
pyproject.toml, etc. Users are free to build a package as needed.

Prior to merging this MR, I will publish an updated package on PyPI marking the
project as inactive, and directing users to this repository (#39).

API Changes

  • Existing calls to click_plugins.with_plugins() likely do not need to be
    updated. Users of alternate entrypoint loading mechanisms may hit surprises.
    This function's signature has been improved, and can now accept a string
    describing an entrypoint name.
  • click_plugins.core.BrokenPlugin() has moved to click_plugins.BrokenPlugin().

See CHANGES.rst for other changes.

Rollout

These changes require a bit of coordination with #39. The order of operations will be:

  1. Wait a couple of weeks for feedback.
  2. Merge Mark PyPI package as inactive #39.
  3. Tag a release.
  4. Publish a new package on PyPI.
  5. Rebase this branch against main, resolve merge conflicts, etc.
  6. Merge this PR.
  7. Tag a v2 release.

Pass the active exception to 'BrokenPlugin()' rather than just assuming
that an exception is active.
Looking at the 'click' source code, it is quite hard to suggest a
program name.
Can provide a _much_ better error message if we have the entire entry
point.
The message is an error, and thus should be written to stderr.
Eliminating as many dependencies as possible.
@geowurster geowurster self-assigned this Jun 9, 2025
@geowurster geowurster changed the title v2 - Set up for Vendoring Version 2.0 Jun 9, 2025
@geowurster geowurster changed the title Version 2.0 Version 2.0: Project can now be vendor Jun 9, 2025
@geowurster geowurster changed the title Version 2.0: Project can now be vendor Version 2.0 Jun 9, 2025
Plugins can be loaded from:

* Entry point group name.
* 'importlib.metadata.EntryPoint()'.
* Sequence of 'EntryPoint()' objects.

Closes #13
For loading plugins from multiple entry point groups.
@auvipy
Copy link

auvipy commented Jun 9, 2025

vendoring could be a a good option

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.

2 participants