You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a poetry project with a + in the project name - might be the same for other invalid characters -, generation runs smoothly:
D:\Development\test> poetry init -vThis command will guide you through creating your pyproject.toml config.Package name [test]: test+testVersion [0.1.0]:Description []:Author [Your Name <[email protected]>, n to skip]: nLicense []:Trying to detect current active python executable as specified in the config.Found: D:\Program Files\Python313\python.EXECompatible Python versions [>=3.13]:Would you like to define your main dependencies interactively? (yes/no) [yes] noWould you like to define your development dependencies interactively? (yes/no) [yes] noGenerated file[project]name = "test+test"version = "0.1.0"description = ""authors = [ {name = "Your Name",email = "[email protected]"}]readme = "README.md"requires-python = ">=3.13"dependencies = [][build-system]requires = ["poetry-core>=2.0.0,<3.0.0"]build-backend = "poetry.core.masonry.api"Do you confirm generation? (yes/no) [yes] yes
Then, when trying to add a new dependency with poetry add, it fails due to an invalid project name:
D:\Development\test> poetry add requestsThe Poetry configuration is invalid: - project.name must match pattern ^([a-zA-Z\d]|[a-zA-Z\d][\w.-]*[a-zA-Z\d])$
Impact
Prevent the user from creating projects with invalid names.
While the current behaviour is not in any way problematic or breaking, it's unexpected and should be improved in my opinion.
Workarounds
Use a project name with no + :)
The text was updated successfully, but these errors were encountered:
Issue Kind
Change in current behaviour
Description
Using Poetry 2.0.1 on Windows 11.
When creating a poetry project with a
+
in the project name - might be the same for other invalid characters -, generation runs smoothly:Then, when trying to add a new dependency with
poetry add
, it fails due to an invalid project name:Impact
Prevent the user from creating projects with invalid names.
While the current behaviour is not in any way problematic or breaking, it's unexpected and should be improved in my opinion.
Workarounds
Use a project name with no
+
:)The text was updated successfully, but these errors were encountered: