Open dsuess opened 3 months ago
Invalid object name b'5bab98c\n'
looks like something has introduced an unwanted newline.
I doubt that this was poetry, you likely will want to report this to dulwich
Thanks for the quick reply! The issue seems to be caused by using the shortened git hash, which doesn't seem to be handled here: https://github.com/jelmer/dulwich/blob/master/dulwich/object_store.py#L558. Replace the sha in the pyproject with the long version 5bab98c9500f1050c6bb6adfb55580a23173f18d
fixes the issue. I think you're right, this should be handled on dulwich's side. So please feel free to close.
Description
The current default git-client seems to only create a shallow clone of the target git repo, which means that
rev
s, which aren't assigned to a branch, can't be used as a dependency. For example, the followingpyproject.toml
fails to create a lockfile with the error messageWorkarounds
Switching to system git client fixes the issue:
Once the venv is created and the repo cloned to
$VENV_PATH/src/
, switching back to the deafult client and re-runningpoetry lock
works as well, suggesting that once the repo is cloned correctly, everything works as expectedPoetry Installation Method
system package manager (eg: dnf, apt etc.)
Operating System
macOS 14.5
Poetry Version
Poetry (version 1.8.3)
Poetry Configuration
Python Sysconfig
Example pyproject.toml
Poetry Runtime Logs