Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Official plugin system #39

Closed
fredrikaverpil opened this issue Feb 26, 2021 · 12 comments
Closed

Official plugin system #39

fredrikaverpil opened this issue Feb 26, 2021 · 12 comments
Labels
enhancement New feature or request

Comments

@fredrikaverpil
Copy link

fredrikaverpil commented Feb 26, 2021

Hey, have you seen this? 馃槉
python-poetry/poetry#3733

@mtkennerly
Copy link
Owner

I did! It's pretty exciting :D Looking forward to updating this to take advantage of it.

@mtkennerly mtkennerly added the enhancement New feature or request label Feb 26, 2021
@mtkennerly mtkennerly changed the title Official plugin Official plugin system Feb 26, 2021
@fredrikaverpil
Copy link
Author

Looks like it's been merged to master! 馃槂

@mtkennerly
Copy link
Owner

I just released v1.0.0b1 using the official plugin interface. I'd appreciate feedback from anyone who wants to try it out. It requires Poetry 1.2.0a2+ and Python 3.6+.

The one issue I know right now is that the plugin behavior doesn't trigger for dependencies, only for the main project. I still need to research how to implement that.

Updated documentation: https://github.com/mtkennerly/poetry-dynamic-versioning/blob/release/v1.0.0/README.md

@fredrikaverpil
Copy link
Author

@mtkennerly that's awesome news! 馃嵕 馃帀
I'm (somewhat unfortunately) not using this project anymore, as I've moved on to another company. I therefore have nothing to test this with at the moment.

@mtkennerly
Copy link
Owner

No worries! Thanks for all the feedback you gave me while you were still using it :)

@Darsstar
Copy link

Darsstar commented Apr 19, 2022

After probably an hour after first contact: so far no issues!

@layday
Copy link

layday commented Apr 19, 2022

Will v1 be usable without Poetry (i.e. with poetry-core only)? My understanding is that Poetry plug-ins are not implemented in the backend, meaning that building a package with dynamic versioning would require installing all of the Poetry CLI's dependencies.

@Darsstar
Copy link

The one issue I know right now is that the plugin behavior doesn't trigger for dependencies, only for the main project. I still need to research how to implement that.

Could that be because of pypa/pip#11022?

@mtkennerly
Copy link
Owner

mtkennerly commented Apr 22, 2022

Will v1 be usable without Poetry (i.e. with poetry-core only)? My understand is that Poetry plug-ins are not implemented in the backend, meaning that building a package with dynamic versioning would require installing all of the Poetry CLI's dependencies.

Right, the official plugin system means it will depend on Poetry itself, not just poetry-core. I'll probably end up releasing a slimmed down version of the existing implementation as poetry-core-dynamic-versioning for that use case. (Edit: On second thought, if there will be two separate packages, it's probably better for the Poetry 1.2+ plugin to get a new name, to avoid breaking packages that have build-system = ["poetry-core", "poetry-dynamic-versioning"] declarations without version constraints.)

Could that be because of pypa/pip#11022?

I think it's just that the Poetry plugin behavior is designed to only affect the active project. I found a workaround, and although it still relies on monkey patching, at least it doesn't need to do import shenanigans with a pth file.

@mtkennerly
Copy link
Owner

The one issue I know right now is that the plugin behavior doesn't trigger for dependencies, only for the main project. I still need to research how to implement that.

This is now fixed in v1.0.0b3.

@mtkennerly
Copy link
Owner

As mentioned in #39 (comment), I'm now releasing two separate packages:

  • poetry-dynamic-versioning (using the import hack) - just published v0.15.0
  • poetry-dynamic-versioning-plugin (using the official plugin system) - just published v0.1.0

I'd only recommend having one installed at a time, but they do attempt to play nice with each other. These new releases are just to reflect the unified code base, so pdv v0.14.1 and v0.15.0 should behave the same as each other, and so should pdv v1.0.0b3 and pdv-plugin v0.1.0.

@mtkennerly
Copy link
Owner

I think the new poetry-dynamic-versioning-plugin is in a good state, so I'm going to go ahead and close this. I'll keep monitoring Poetry 1.2.x (pre-)releases for any changes that may be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants