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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console scripts dependant on extras is officially discouraged #8902

Closed
1 task done
couling opened this issue Jan 23, 2024 · 2 comments · Fixed by #8903
Closed
1 task done

Console scripts dependant on extras is officially discouraged #8902

couling opened this issue Jan 23, 2024 · 2 comments · Fixed by #8903
Labels
area/docs Documentation issues/improvements

Comments

@couling
Copy link
Contributor

couling commented Jan 23, 2024

  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

Context

Console scripts dependent on extras is officially discouraged and may not work in the wider eco python system:

Using extras for an entry point is no longer recommended. Consumers should support parsing them from existing distributions, but may then ignore them. New publishing tools need not support specifying extras. The functionality of handling extras was tied to setuptools’ model of managing ‘egg’ packages, but newer tools such as pip and virtualenv use a different model.

Poetry has a documented feature to support scripts dependent on extras:

To specify a script that depends on an extra, you may provide an entry as an inline table:

[tool.poetry.scripts]
devtest = { reference = "mypackage:test.run_tests", extras = ["test"], type = "console" }

When people have raised issues around this feature, it's been flagged that using the feature may be inadvisable (examples: here and here). It seems odd to warn people that a documented feature is discouraged only when they raise an issue that the feature is broken in some way.

Problem & Suggestion

Poetry documentation is suggesting something that is discouraged in the wider Python eco-system. It would make sense to either:

  • Add a documentation warning with external documentation link to highlight that the feature is discouraged
  • Remove the documentation on the feature entirely. Perhaps this would require a decision to deprecate and remove the feature too.
@couling couling added area/docs Documentation issues/improvements status/triage This issue needs to be triaged labels Jan 23, 2024
@dimbleby
Copy link
Contributor

please submit a merge request!

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
@abn abn removed the status/triage This issue needs to be triaged label Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants