Skip to content

fix: git subdirectory dependencies fail to resolve with a TypeError on name#4922

Closed
steved wants to merge 2 commits into
python-poetry:masterfrom
steved:steved/git-canonicalize-name
Closed

fix: git subdirectory dependencies fail to resolve with a TypeError on name#4922
steved wants to merge 2 commits into
python-poetry:masterfrom
steved:steved/git-canonicalize-name

Conversation

@steved
Copy link
Copy Markdown

@steved steved commented Dec 21, 2021

Pull Request Check List

Resolves: #4678

  • Added tests for changed code.
  • Updated documentation for changed code.

This is an attempt to create a fix and test for #4678 where the addition of subdirectory support for Git repositories (python-poetry/poetry-core#192) does seem to require some added code for package name discovery. The error manifests as the TypeError in the associated issue when creating a Git dependency with a subdirectory (hyphen actually ends up not mattering).

I'm having trouble creating a clean unit test, however, as the bug is actually partially in the _pep517_metadata method that is entirely mocked out. There may be a way to craft an UNKNOWN.egg-info directory instead, but some direction for a better test would be helpful.

FAILED tests/puzzle/test_provider.py::test_search_for_vcs_hyphenated_name - TypeError: expected string or bytes-like object
@steved
Copy link
Copy Markdown
Author

steved commented Dec 21, 2021

cc @sdispater

@steved steved closed this Mar 1, 2022
@steved steved deleted the steved/git-canonicalize-name branch March 1, 2022 00:30
@github-actions
Copy link
Copy Markdown

This pull request 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git repo with hypthens fails with error

1 participant