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

Include "via" information, like "pip-compile" #91

Open
mitchhentges opened this issue Jul 14, 2022 · 3 comments
Open

Include "via" information, like "pip-compile" #91

mitchhentges opened this issue Jul 14, 2022 · 3 comments

Comments

@mitchhentges
Copy link

When pip-compile creates a requirements.txt, it will include a "via" line for each requirement: this line defines the rationale for why the requirement was included, such as "via -r requirements.in" or "via requests"

poetry has access to this information, it would be cool if it could be propagated to the exported requirements.txt file.

Example from pip-compile:

#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
#    pip-compile
#
certifi==2021.10.8
    # via requests
charset-normalizer==2.0.12
    # via requests
idna==3.3
    # via requests
requests==2.27.1
    # via -r requirements.in
urllib3==1.26.9
    # via requests

This would provide two benefits:

  • It could make it easier to port from pip-compile, since generated requirements.txt files between it and poetry-plugin-export would be more similar
  • It removes a step from debugging: the associated poetry.lock file doesn't have to be located and perused, as the information is all available in the one requirements.txt file.
@dimbleby
Copy link
Contributor

Previously rejected at python-poetry/poetry#5580

The information that you'd need has been thrown away by the time it reaches this plugin, so you'd have to make relatively invasive changes over in the poetry code.

I mean it's possible: but realistically it's going to take someone who's motivated by wanting this to go and do the work...

@mitchhentges
Copy link
Author

Previously rejected at python-poetry/poetry#5580

To clarify, I interpreted the previous rejection to be poetry-specific and that it was acceptable to re-create this ticket over here in the plugin. I didn't intend for this new ticket to be interpreted as potential spam, sorry.

The information that you'd need has been thrown away by the time it reaches this plugin, so you'd have to make relatively invasive changes over in the poetry code.
I mean it's possible: but realistically it's going to take someone who's motivated by wanting this to go and do the work...

That makes sense, thanks 👍

@dimbleby
Copy link
Contributor

I hadn't even realised you were the same person, no worries. Anyway poetry doesn't seem to be a project that is bothered about having lots of open tickets...

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

No branches or pull requests

2 participants