question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for git refs in poetry add

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.

Hi! Thanks for the tool. Migrating from pipenv to poetry. It would be great to see git refs support in poetry add. Every so often I install packages from Git branches/pull requests. Currently this syntax does not work:

-> % poetry add nornir --git https://github.com/nornir-automation/nornir.git@2.0

Updating dependencies
Resolving dependencies... (0.6s)

[CalledProcessError]
Command '['git', 'clone', 'https://github.com/nornir-automation/nornir.git@2.0', '/var/folders/js/jzwkkbb53nd7ns_53g069nlr0000gn/T/pyp
oetry-git-norniryq5f776b']' returned non-zero exit status 128.

add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...

I have to add it manually in pyproject.toml, but I would love to avoid that:

[tool.poetry.dependencies]
python = "*"
nornir = { git = "https://github.com/nornir-automation/nornir.git", branch = "2.0" }

I don’t exclude that requested functionality is already available, but I could find it in the docs. Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
agronholmcommented, Jan 4, 2019

There seems to be no way to specify the branch in poetry add but still this is somehow supported in pyproject.toml?

0reactions
sdispatercommented, Oct 30, 2019

This has been added in #1221 and is currently available in the latest prereleases of the 1.0.0 version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support for git refs in poetry add · Issue #357 - GitHub
There seems to be no way to specify the branch in poetry add but still this is somehow supported in pyproject.toml ?
Read more >
Contributing to Poetry | master | Documentation
You can help by adding missing sections, editing the existing content to be more accessible, or creating new content such as tutorials, FAQs,...
Read more >
How to specify repository branch for poetry? - Stack Overflow
I want to test a feature. How can i tell poetry to look at a specific branch ? Is this possible ? repository...
Read more >
Poetry - The Blue Book
poetry add git +https://github.com/sdispater/pendulum.git#develop poetry add ... For a full list of the supported settings see Available settings.
Read more >
Python implementation of Git — dulwich 0.20.46 documentation
Changelog¶ · Add support for remembering remote refs after push/pull. · Support passing tree and output encoding to dulwich. · Fix pushing of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found