-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
A discrepancy in sys_tags
handling causes poetry install
to fail on macos
#7161
Comments
Also, any suggestion or workaround would be very helpful :) |
poetry-core vendors packaging 21.3 which, up until two days ago, was the latest available version. What version do you have un-vendored? Suggest that you make that unvendored version also be 21.3. If that requires you to upgrade then this probably isn't a very interesting report, if that requires you to downgrade then probably poetry has something to worry about. |
The
I wouldn't even know what to downgrade exactly. The unvendored version of |
I disagree: the point of vendoring Regarding on the reason this issue is present, I think this is due to how poetry and poetry-core handle dependencies:
Hence we end up with two separate version of In theory I see multiple solutions to solve this issue:
Approaches 3&4 seems fragile to me (weird things can happen if poetry is not the very first module to be loaded...) and require to do some manual work to handle dependency (e.g. if PS: according to it changelog, |
this is not the reason that poetry-core vendors packaging. Indeed, as this issue demonstrates, that goal would be better achieved by not vendoring! The reason that I would have viewed needing to upgrade as relatively uninteresting is that it's something that users could easily do, and that new installs would get automatically. However since the actual problem is that poetry is now picking up a too-new version of packaging, it seems clear that Something Should Be Done. While I agree there are tricks that could be played with paths etc, I suspect that the easiest thing to do is simply to upgrade the vendored version in poetry-core, and the required version in poetry, so that they both have packaging 22.0. It's true that leaves poetry exposed to similar happening again one day and perhaps it will, but clearly this sort of thing doesn't happen very often; and upgrades are probably a good thing anyway. |
In the meantime, a possible workaround for affected users is setting the env:
SYSTEM_VERSION_COMPAT: "0" |
Looking more closely at your CI failure, the discrepancy between poetry-core and poetry isn't the problem at all. Rather, it's the discrepancy between poetry and pip. Poetry is calling out to pip to install the package, and it is pip that is reporting that the wheel is not supported. That'll be because pip has not yet picked up the new version of packaging. So you'll want to encourage, or wait for, pip to update. |
So is that a |
@dimbleby thanks for your feedback ;-)
You're right about that, pip does it own vendoring of Regarding the "Something Should Be Done" you mentioned 😄 , I agree with you that updating the minimal version in poetry/poetry-core requirements to < 22.0 would be a good fix for that issue (and later on remove this need once pip has updated it own vendoring) and, while not a perfect fix, should be "good enough" given this kind of issue shouldn't be too frequent. Do you want a PR on that ? |
That is an insufficient work around as we will just see it manifest in reverse with the next pip release. I have discussed another approach with a pip maintainer I will try to prepare today. |
Could Poetry used the vendored |
Poetry uses the pip installed in the target environment, which may not actually be compatible with Poetry's own code. We intend to resolve this in 1.4 by moving to the |
Closing this as we merged #6205. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option) and have included the output below.Issue
After an update in the
macos-12
images from github actions, our CI job on macos started to fail duringpoetry install
with the following error (fulltrace here):I managed to reproduce the error in a new repository with minimal configuration:
https://github.com/vxgmichel/macos-ci-testing
The workflow is really simple too:
After a quick investigation, I noticed something weird:
packaging.tags.sys_tags
andpoetry.core._vendor.packaging.tags.sys_tags
do not provide the same tag list.In particular, this debug.py script yields:
The full difference can be found here.
I suspect that different implementations of
sys_tags
are used to:This is as far as I can get with my limited knowledge of poetry, and I might be missing something else.
The text was updated successfully, but these errors were encountered: