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
poetry and tox-poetry-dev-dependencies #7
Comments
I'll have a closer look later, but my first impression is that the issue is not on our side here. For some reason there is a rather old version of importlib-metadata already in the environment, while poetry-core requires a more recent version. You might want to run something like Also you might want to give pip's new dependency resolver a try. |
Let's close the issue for now. And of course we should reopen it, if it turns out there is something we can do about it here. Thanks for the report. |
Somehow pip thinks poetry requires 1.1.3:
Even after manual upgrade of importlib-metadata the error persists. To me it seems like poetry and poetry-core don't like to be installed side by side? |
I see it now. Indeed, I don't know why it is so, and that is a bit unfortunate. I am afraid, there is nothing we can do about it in this project. But let's keep it in mind, that there is an issue here. Although I am not sure it is really an issue (these two things are probably not meant to be installed in the same environment). Maybe we could depend on What I am wondering, is why you have both |
I looked a bit further into this. And it seems like https://github.com/python-poetry/poetry/blob/1.1.0b3/pyproject.toml#L27 But until then they are not meant to be installed in the same environment. |
I have both tox (+plugin) and poetry installed, because the intended use is a cd pipeline that builds, tests and deploys a package to a local devpi server. So the way to go here is to wait for poetry 1.1? |
@bparzella I'm already using the plugin, as well as poetry for some build steps, by upgrading to the preview release of Poetry (currently 1.1.0b3). If you use pipx, then |
I don't have definitive answers. Not yet. The project (this plugin) is very young, there a lots of things that still need to be worked out. Additionally (and it is a coincidence, both lucky and unlucky), Poetry is about to be split up in 2 parts poetry-core and the poetry as we know it. Some of the core functionality of Poetry is being extracted into its own library so that it can be reused (you can read it about it on the page for poetry-core). But it is a work in progress, both poetry and core are in alpha or beta stage. Once poetry 1.1 is released (along with poetry-core 1.0) it should be smooth sailing again. My recommendation is always (not just for our issue here, but in general) to isolate different tools from one another as much as possible (or at least as soon as a dependency version conflict arises). In this case I would recommend having Poetry in one environment and in another environment you would have Tox and its plugins (which would include this project here and poetry-core). But I get that it can be complicated to put in place properly for some workflows. So a possible alternative (and probably our best chance here and now) as @mikenerone suggested is: But... Anyway, I don't want to break people's workflows just for the fun of it. I appreciate people giving my code a try, and I am happy if it helps them get work done. Thanks for telling me about this issue. I will give it some more thought. And we should all keep an eye out for the release of poetry 1.1, we'll see if it makes things better for us or not. |
@bparzella Mike just reminded me about Tox's
This way Tox itself will take care of installing the plugin in a dedicated environment (named @mikenerone Thanks for reminding me about the |
Okay, I tested it today and it is working for me. This seems like a pretty good solution for this problem. As far as I understand the tox documentation, this option is intended to be used for plugins. |
Should this usage be mentioned in the documentation/readme? |
Great!
I want to say no... I want to avoid telling people how they should install things, because there are multiple ways to do it that depend on the specific workflows of each project or user. So without knowing the context it is a bit dangerous to tell people: "install it like that", as if it were the only one true way. Saying that it is a Tox plugin and it is available on PyPI should be enough. If the issue comes up more often we could add it in a FAQ section though. |
I close the issue for now, but feel free to add anything or ask for reopening if necessary. Thanks :) |
At the moment it seems like installing both the main poetry package and tox-poetry-dev-dependencies causes problems.
I know that this might not be a problem of this package, but due to a dependency, I just want to raise awareness of this issue. Feel free to close this.
The text was updated successfully, but these errors were encountered: