poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Period(s) in repository "name" causes issues

Open Caligatio opened this issue 6 years ago • 7 comments

  • [x] I am on the latest Poetry version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Win10
  • Poetry version: 1.0.0b1
  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

Adding a custom [[tool.poetry.source]] whose name includes a period causes issues when paired with http_basic settings. The add_property method on the ConfigSource object blindly splits on periods, including those in the repo name. The side effect of this is that the resulting TOML becomes very "deep."

I'm happy to do a PR but I'm curious to know how much name checking is appropriate.

Caligatio avatar Aug 25 '19 14:08 Caligatio

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Nov 13 '19 10:11 stale[bot]

This is still an issue. The following does not work, when parsing the property we either need to canonicalise the name or qoute the key.

poetry config http-basic."foo.bar" username password

abn avatar Apr 28 '22 01:04 abn

@abn What is the desired behavior?

John15321 avatar Jun 13 '22 17:06 John15321

@abn Hi, can I work on this if available?

Mohsin-Ul-Islam avatar Aug 31 '22 04:08 Mohsin-Ul-Islam

Is this still an issue, as of August 2023? If yes, then can I have some pointers on how to fix this? Thank you.

rumbleFTW avatar Aug 20 '23 21:08 rumbleFTW

The relevant code that handles the parsing of name is at https://github.com/python-poetry/poetry/blob/9b3893a46f20d422ae1912109428b00bcce320b5/src/poetry/console/commands/config.py#L209-L237.

Fixing this also requires handling the repository configuration regexes, both fetching values and setting values.

abn avatar Mar 23 '24 01:03 abn

This seemed to be solved in main. @abn

jawadMansoor avatar Sep 11 '24 01:09 jawadMansoor