-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 install generates invalid python code for console scrips dependent on extras #8899
Comments
Cf #5297 and #6892 (comment) Which is to say that you probably don't want to do this... |
@dimbleby This is an explicitly documented feature in Poetry. It should work, or be removed from documentation.
That is: adding |
sure, I'm not saying that everything is awesome. I'm saying that - per the linked comment - the feature you are using is specifically anti-recommended in the python packaging eco-system. Therefore:
|
@dimbleby you missed my point, I understood yours. You are flagging a very important issue and I don't want it to get lost (again) in an obscure discussion. I've taken the liberty of creating #8902 so that the documentation aspect can be properly addressed. I'll leave it to your good judgement whether or not a third is required to cover the possible deprecation and removal of the feature entirely. I'd prefer to keep discussion on this issue to the very narrow topic of ensuring that documented examples work. |
Since we know that scripts and extras currently simply do not work together - per this and the linked issue - we can reasonably judge that no-one is using them. So I don't see any reason for deprecation, just remove the broken thing. Actually that is a reason to prefer not to take your merge request making them work a little better - it is easy to take away something that was obviously not working anyway, a little harder to take away something that sort-of works. |
@dimbleby You are missing the obviousness of me being here raising this issue: I'm using them. And the author of #5297 was using them. It's reasonable to assume we're not alone. You may have missed (this comment):
This feature worked when I migrated the project from setuptools to poetry. It has since stopped working. This is not a feature that has never worked.
People are using it. It's going to be hard to remove it. Actually, please never use this logic for documented features. Always assume that someone found a way to use it and follow best practice: Deprecate in documentation, release notes, and console warnings; then delete in a later release. Making features evaporate, making existing |
if you are using this feature, presumably it is with rather an old version of poetry? My understanding is that this has been broken at least since late 2022 (#6892) and perhaps much longer (#3431) if that's so then: for sure it looks like it was an accident - but this feature has already been unavailable in poetry for longer than any deprecation period would likely have been. (By the way, per #6892 (comment) - I don't think #5297 ever was fixed at all) I see very little value in repairing this if the intention is then to remove it. |
@dimbleby You've really misunderstood the situation here. People are using it!. It's worked in the past, it's documented. And only one aspect of it's behaviour is broken. Not the whole feature is broken.
There's been no release note, and no documentation to remove this feature. So for those of us who don't re-install poetry every 5 minutes and those of us with projects that are locked, shelved for a while and brought back, there's been absolutely no warning at all. Please note that only one part of this feature is broken. Again. Please never follow the logic you are using. Please always follow best practice and deprecate first. |
please say what version of poetry you are using where this works - I tried as far back as 1.1.14 without success. I reiterate that I don't very much care about your pull request either way, it's small enough not to worry about. My preference remains not to bother - on the grounds that it's the wrong direction of travel and no objections to the removal of scripts-with-extras as used by |
@dimbleby I'm done arguing this. You've wasted too much of my time already. This is a trivial bug with a trivial fix. The feature has been been used a lot throughout our software estate. Discussing this with other senior dev coleagues, it really worries us that Poetry isn't maintained in a way that deprecates before it deletes features. We primarily use this feature for it's effect on To my mind it makes no sense at all, to have |
I think we are talking past each other, here are the points from my last in more compact form
all the best |
I don't recall which version. It's been, very approximately, a year since I tested this originally. It might have been more or less. I only know that it appeared to work just fine when I first used it and that a colleague recently flagged it was now broken and I've followed up with issue report and PR. |
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
poetry install
generates invalid python for console scrips dependent on extras. If you create a project with the documented toml example and then try to run the script:It seems the generated script is wrong. Eg:
This should have been:
The text was updated successfully, but these errors were encountered: