Why does poetry new
not call poetry init
to build the pyproject.toml
file interactively?
#2563
Closed
2 tasks done
Labels
Feature Request
Hi,
I've recently switched from Pipenv to Poetry and so far this is working fine. It's a bit of an annoyance that VSCode does not recognise Poetry virtualenvs automatically like it does with Pipenv, but it's not Poetry's fault and I have a workaround for that anyway. However, there is something I don't understand about the behaviour of
poetry new
.Right now, when I want to create a new project, I need to:
poetry new
to create the folder structure for the project with the right names for the folder and package;pyproject.toml
file in order for the next step to work;poetry init
to create thepyproject.toml
I actually want interactively;poetry install --no-root
to initialise the virtual environment.The problem is that the
project.toml
created bypoetry new
lacks various fields like the license and description, and it's a bit weird to have to fill them by hand afterpoetry new
when thepoetry init
command exists and works so well. But I can't just runpoetry init
afterpoetry new
because it complains about an already existingpyproject.toml
.In fact, while I understand why one would want
poetry init
as a separate command, I don't understand whypoetry new
doesn't automatically callpoetry init
once it created the folder structure, so that one can build thepyproject.toml
interactively. I understand why someone would not always want to do that, butpoetry
provides the--no-interaction
option for that. So why isn't the default behaviour ofpoetry new
to callpoetry init
, so that one can create the folder structure and the wantedpyproject.toml
file in one go? I would expect that to be the most common workflow when creating a new project, so I find it weird that it's not supported out of the box and that I have to go through a weird uncomfortable step (having to erase an automatically created file) in order to make it work.So I guess my feature request would be to make
poetry new
runpoetry init
to create thepyproject.toml
file, either by default (with the--no-interaction
option to bypass it) or using an option (maybe--init
) if you really do not want to change the default behaviour. What do you think?The text was updated successfully, but these errors were encountered: