Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve redirect error message for trailing slash #812

Merged
merged 6 commits into from
Sep 17, 2021

Conversation

bhrutledge
Copy link
Contributor

@bhrutledge bhrutledge commented Sep 14, 2021

Towards #310, following up on #809 (comment).

Improving Twine's existing EAFP approach feels better to me than adding more LBYL conditions. This might also cover more repositories than PyPI, though #310 (comment) shows that devpi returns "Not Found" instead of redirecting. I'm inclined to follow up with a commit or PR to handle that case in utils.check_status_code, if the approach in this PR gets approval.

FYI @meowmeowmeowcat

@bhrutledge bhrutledge merged commit 3040bf9 into pypa:main Sep 17, 2021
@bhrutledge bhrutledge deleted the 310-redirect-slash branch September 17, 2021 09:45
mergify bot pushed a commit to andrewbolster/bolster that referenced this pull request Nov 3, 2021
Bumps [twine](https://github.com/pypa/twine) from 3.4.2 to 3.5.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/twine/blob/main/docs/changelog.rst">twine's changelog</a>.</em></p>
<blockquote>
<h2>Twine 3.5.0 (2021-11-02)</h2>
<p>Features
^^^^^^^^</p>
<ul>
<li>Show more helpful messages for invalid passwords. (<code>[#815](pypa/twine#815) &lt;https://github.com/pypa/twine/issues/815&gt;</code>_)</li>
<li>Allow the <code>--skip-existing</code> option to work with GCP Artifact Registry. (<code>[#823](pypa/twine#823) &lt;https://github.com/pypa/twine/issues/823&gt;</code>_)</li>
</ul>
<p>Bugfixes
^^^^^^^^</p>
<ul>
<li>Add a helpful error message when an upload fails due to missing a trailing
slash in the URL. (<code>[#812](pypa/twine#812) &lt;https://github.com/pypa/twine/issues/812&gt;</code>_)</li>
<li>Generalize <code>--verbose</code> suggestion when an upload fails. (<code>[#817](pypa/twine#817) &lt;https://github.com/pypa/twine/issues/817&gt;</code>_)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/twine/commit/7deea5833918cdb8496587119900e8a3cde57dfc"><code>7deea58</code></a> Update changelog for 3.5.0 (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/824">#824</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/f0fc7e8824fe9a93e817c5a7bc1d73f3c9af3ad1"><code>f0fc7e8</code></a> Reorder installation in .readthedocs.yaml (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/825">#825</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/ee97836671f4a494d6b7f7dec21d237a84320e1d"><code>ee97836</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/twine/issues/823">#823</a> from zware/skip-existing_on_gcp</li>
<li><a href="https://github.com/pypa/twine/commit/34cfed4aac708a9bcb4de04e3fccf619bdadb6c2"><code>34cfed4</code></a> Support --skip-existing with GCP Artifact Registry</li>
<li><a href="https://github.com/pypa/twine/commit/658037f05898b4dc96113628153aa2691b0dbfa3"><code>658037f</code></a> Add intersphinx links for <code>requests</code> (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/819">#819</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/9d26a5f2ec7f176cdad8dea21a4e17d97c962d82"><code>9d26a5f</code></a> Show more helpful messages for invalid  passwords (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/815">#815</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/040a62c749e0015724d93e82ea37bb7e826fef00"><code>040a62c</code></a> Tweak upload --verbose suggestion (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/817">#817</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/28d8571f7e2f908890649f33624fa3bfed7294e1"><code>28d8571</code></a> Add auto-generated API documention (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/810">#810</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/3be41f65176a4ee4909b3307d3705f670dfb0330"><code>3be41f6</code></a> Adding missing docstrings to <code>twine/commands</code> (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/799">#799</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/cf5e0fd7c87d5b1b609c25c59f3ec0d09dc54316"><code>cf5e0fd</code></a> Add a section about proxy support (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/814">#814</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/twine/compare/3.4.2...3.5.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=twine&package-manager=pip&previous-version=3.4.2&new-version=3.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants