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.

Add --skip-existing option to poetry publish

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

Feature Request

The twine tool for publishing to PyPi style repos has a very useful option --skip-existing for the twine upload command. This option basically says “don’t error out if a file already exists on PyPi, continue to the next”.

This is super useful in a number of cases, including with CI/CD pipelines where, on branching, the pipeline will trigger a build for the new branch, but of course that first build will already have a corresponding package in PyPi as the commit it’s being built from has already been built on the branch that the new branch was created from. In that case, it’s fine for the pipeline to fail to upload the file as it already exists.

There are various other use cases for this flag. Could we have an equivalent flag for poetry publish ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:16
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
davidszottencommented, Aug 14, 2020

i would probably do something similar to twine (heuristics for a few package index implementations that try to detect this particular error)

i explicitly don’t want to ignore all errors, only “this file already exists”

0reactions
KRunchPLcommented, Oct 31, 2021

I agree that this feature would be great. The PR looks good too me (although I did not check all possible responses 😃 ).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commands | Documentation | Poetry - Python dependency ...
You can do this using the add command. Options #. --without : The dependency groups to ignore. --with : The optional dependency groups...
Read more >
How to Publish a Python Package to PyPI using Poetry
From your account page, click on the “Account Settings” link on the left-hand side. Scroll down until you see the “API Tokens” section...
Read more >
How to upload new versions of project to PyPI with twine?
It's ok if you move out the old versions, but I am not sure about possible implications. using --skip-existing option solves the above ......
Read more >
twine - Pants build system
The utility for publishing Python distributions to PyPI and other Python repositories ... pythonConfig section: [twine] Basic options skip --[no-]twine-skip ...
Read more >
twine 4.0.2 documentation
Twine is a utility for publishing Python packages to PyPI and other ... or token in the Command Prompt or PowerShell, Ctrl-V and...
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