Error adding a git dependency : parsing the package version?
See original GitHub issue-
[ 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 : Linux Mint 20.2
-
Poetry version : 1.2.0a2
-
pyenv version: 2.2.0
Issue
Adding a git dependency terminates in an error after either poetry add git+ssh://git@github.com/path/repo.git
or manually modifying pyproject.toml
and running poetry update
, see the error message below. I’ve tried everything possible, like tweaking the version of the git package or trying different python or poetry versions. Have anyone encountered something like this?
4 ~/.local/lib/python3.8/site-packages/poetry/installation/pip_installer.py:266 in install_git
264│ pkg.develop = package.develop
265│
→ 266│ self.install_directory(pkg)
267│
3 ~/.local/lib/python3.8/site-packages/poetry/installation/pip_installer.py:204 in install_directory
202│ # so we need to check the version of pip to know
203│ # if we can rely on the build system
→ 204│ legacy_pip = self._env.pip_version < self._env.pip_version.__class__(
205│ 19, 0, 0
206│ )
2 <string>:10 in __init__
1 ~/.local/lib/python3.8/site-packages/poetry/core/version/pep440/version.py:44 in __post_init__
42│ # we do this here to handle both None and tomlkit string values
43│ object.__setattr__(
→ 44│ self, "text", self.to_string() if not self.text else str(self.text)
45│ )
46│
AttributeError
'int' object has no attribute 'to_string'
at ~/.local/lib/python3.8/site-packages/poetry/core/version/pep440/version.py:113 in to_string
109│ version_string = dash.join(
110│ filter(
111│ bool,
112│ [
→ 113│ self.release.to_string(),
114│ self.pre.to_string(short) if self.pre else self.pre,
115│ self.post.to_string(short) if self.post else self.post,
116│ self.dev.to_string(short) if self.dev else self.dev,
117│ ],
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Swift Package Manager - Failed to parse the manifest
I'm trying to migrate a CocoaPod to SPM. It should be very simple, but for some reason I keep getting the error "Failed...
Read more >Common errors | npm Docs
Common errors · Errors · Broken npm installation · Random errors · No compatible version found · Permissions errors · Error: ENOENT, stat...
Read more >NuGet Package Version Reference - Microsoft Learn
The package's own version is SemVer v2.0.0 compliant but not SemVer v1.0.0 compliant, as defined above. Any of the package's dependency version ......
Read more >Troubleshooting - Composer
In this case add the --with-dependencies argument or add all dependencies which need an update to the command. Package is not updating to...
Read more >PyPI packages in the Package Registry - GitLab Docs
Then install the packages whenever you need to use them as a dependency. ... To authenticate with a deploy token, edit your ~/.pypirc...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To be able to work I currently
setup.py
python setup.py develop
That defeats the purpose of using poetry…
Can confirm the combo of
mypackage = { path = "../mypackage/", develop = true }
wheremypackage
is using Poetry too and the new-installer is disabled results in a 100% crash.