-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Disable the progress bar when exec twine upload
#231
Disable the progress bar when exec twine upload
#231
Conversation
The CI doesn't test this case, which is necessary to ensure this keeps working over time. Also, it might make sense to just do this unconditionally. |
So let's see if the output is good enough to avoid exposing another API toggle to the end-users. |
OK. I'll leave it on by default, this time could be as a test. |
The CI run is now approved, let's see.. |
Looks like the lockfile needs updating. |
I retried the option |
I have moved the position of |
Sure. Though, I'm not sure anymore if disabling color altogether is good. I'd rather disable progress bars but not the colorizarion. Perhaps, the Twine upstream needs to be consulted.. |
I have tested the following commands to upload to testpypi, and both work with Python 3.11. and Python 3.12.
root@eca5ed1e5006:/src# twine --no-color upload dist/* --repository testpypi
Uploading distributions to https://test.pypi.org/legacy/
WARNING Error getting password from keyring
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/twine/auth.py", line 81, in get_password_from_keyring
return cast(str, keyring.get_password(system, username))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/keyring/core.py", line 56, in get_password
return get_keyring().get_password(service_name, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/keyring/backends/fail.py", line 28, in get_password
raise NoKeyringError(msg)
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the
keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.
Enter your API token:
Uploading clang_tools-0.11.1.post1.dev5-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.9/19.9 kB • 00:00 • 19.3 MB/s
Uploading clang_tools-0.11.1.post1.dev5.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.1/79.1 kB • 00:00 • 171.3 MB/s
View at:
https://test.pypi.org/project/clang-tools/0.11.1.post1.dev5/
root@eca5ed1e5006:/src# python3 -V
Python 3.12.3
root@eca5ed1e5006:/src# I'll try again soon to find the cause. |
I still think that it's best to get Twine to implement something like |
435fee8
to
fa90a32
Compare
Thanks for the hint. |
no-color
to support disabling colored outputdisable-progress-bar
to disable the progress bar
pre-commit.ci works in my local environment. 🤔 ~/r/s/gh-action-pypi-publish (feature/support-no-color)> pre-commit run --all-files
Add trailing commas.......................................................Passed
isort.....................................................................Passed
Tabs remover..............................................................Passed
Validate GitHub Actions...................................................Passed
Validate GitHub Workflows.................................................Passed
Check GitHub Workflows set timeout-minutes................................Passed
Validate ReadTheDocs Config...........................(no files to check)Skipped
fix end of files..........................................................Passed
trim trailing whitespace..................................................Passed
mixed line ending.........................................................Passed
python tests naming...................................(no files to check)Skipped
check for added large files...............................................Passed
check BOM - deprecated: use fix-byte-order-marker.........................Passed
check for case conflicts..................................................Passed
check that executables have shebangs......................................Passed
check for merge conflicts.................................................Passed
check json............................................(no files to check)Skipped
check for broken symlinks.............................(no files to check)Skipped
check yaml................................................................Passed
detect private key........................................................Passed
check python ast..........................................................Passed
debug statements (python).................................................Passed
codespell.................................................................Passed
yamllint..................................................................Passed
flake8 WPS-excluded.......................................................Passed
flake8 WPS-only...........................................................Passed
pylint....................................................................Passed
Verify that enforced flake8 version stays unchanged.......................Passed |
pre-commit.ci upgraded their runtime to Python 3.12 yesterday which is incompatible with some linting configuration present. I'll address that separately. |
disable-progress-bar
to disable the progress bartwine upload
Maybe can use default_language_version:
python: python3.11 |
That's what I used elsewhere. But it's not something that's in the scope of this PR so let's keep it atomic. |
91d5b4d
to
6013b72
Compare
Yes. I rebased my commits and it's ready to run CI and your review. |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [pypa/gh-action-pypi-publish](https://togithub.com/pypa/gh-action-pypi-publish) | action | minor | `v1.8.14` -> `v1.9.0` | --- ### Release Notes <details> <summary>pypa/gh-action-pypi-publish (pypa/gh-action-pypi-publish)</summary> ### [`v1.9.0`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.9.0) [Compare Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.8.14...v1.9.0) #### 💅 Cosmetic Output Improvements - [@​woodruffw](https://togithub.com/woodruffw)[💰](https://togithub.com/sponsors/woodruffw) updated the tense on password nudge in [#​234](https://togithub.com/pypa/gh-action-pypi-publish/issues/234) - [@​shenxianpeng](https://togithub.com/shenxianpeng)[💰](https://togithub.com/sponsors/shenxianpeng) helped us disable the progress bar that was being produced by the `twine upload` command via [#​231](https://togithub.com/pypa/gh-action-pypi-publish/issues/231) - [@​woodruffw](https://togithub.com/woodruffw)[💰](https://togithub.com/sponsors/woodruffw) also linked the PyPI status dashboard in the trusted publishing error message via [https://github.com/pypa/gh-action-pypi-publish/pull/243](https://togithub.com/pypa/gh-action-pypi-publish/pull/243) #### 🛠️ Internal Dependencies - pre-commit linters got auto-updated @​ [#​225](https://togithub.com/pypa/gh-action-pypi-publish/issues/225) - some notable dependency bumps include - `cryptography == 42.0.7` - `id == 1.4.0` - `idna == 3.7` via [#​228](https://togithub.com/pypa/gh-action-pypi-publish/issues/228) - `requests == 2.32.0` via [#​240](https://togithub.com/pypa/gh-action-pypi-publish/issues/240) - `Twine == 5.1.0` #### ⚙️ Secret Stuff In [#​241](https://togithub.com/pypa/gh-action-pypi-publish/issues/241), [@​br3ndonland](https://togithub.com/br3ndonland)[💰](https://togithub.com/sponsors/br3ndonland) added a Docker label linking the container image to this repository for GHCR to display it nicely. This is preparatory work for a big performance-focused refactoring he's working on in [#​230](https://togithub.com/pypa/gh-action-pypi-publish/issues/230). #### 💪 New Contributors - [@​shenxianpeng](https://togithub.com/shenxianpeng) made their first contribution in [https://github.com/pypa/gh-action-pypi-publish/pull/231](https://togithub.com/pypa/gh-action-pypi-publish/pull/231) - [@​br3ndonland](https://togithub.com/br3ndonland) made their first contribution in [https://github.com/pypa/gh-action-pypi-publish/pull/241](https://togithub.com/pypa/gh-action-pypi-publish/pull/241) **🪞 Full Diff**: pypa/gh-action-pypi-publish@v1.8.14...v1.9.0 **🧔♂️ Release Manager:** [@​webknjaz 🇺🇦](https://togithub.com/sponsors/webknjaz) **🙏 Special Thanks** to [@​pradyunsg](https://togithub.com/pradyunsg)[💰](https://togithub.com/sponsors/pradyunsg) for promptly unblocking this release to Marketplace as GitHub started asking for yet another developer agreement signature from the organization admins. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ansible-community/molecule-hetznercloud). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [pypa/gh-action-pypi-publish](https://togithub.com/pypa/gh-action-pypi-publish) | action | minor | `v1.8.14` -> `v1.9.0` | --- ### Release Notes <details> <summary>pypa/gh-action-pypi-publish (pypa/gh-action-pypi-publish)</summary> ### [`v1.9.0`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.9.0) [Compare Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.8.14...v1.9.0) #### 💅 Cosmetic Output Improvements - [@​woodruffw](https://togithub.com/woodruffw)[💰](https://togithub.com/sponsors/woodruffw) updated the tense on password nudge in [#​234](https://togithub.com/pypa/gh-action-pypi-publish/issues/234) - [@​shenxianpeng](https://togithub.com/shenxianpeng)[💰](https://togithub.com/sponsors/shenxianpeng) helped us disable the progress bar that was being produced by the `twine upload` command via [#​231](https://togithub.com/pypa/gh-action-pypi-publish/issues/231) - [@​woodruffw](https://togithub.com/woodruffw)[💰](https://togithub.com/sponsors/woodruffw) also linked the PyPI status dashboard in the trusted publishing error message via [https://github.com/pypa/gh-action-pypi-publish/pull/243](https://togithub.com/pypa/gh-action-pypi-publish/pull/243) #### 🛠️ Internal Dependencies - pre-commit linters got auto-updated @​ [#​225](https://togithub.com/pypa/gh-action-pypi-publish/issues/225) - some notable dependency bumps include - `cryptography == 42.0.7` - `id == 1.4.0` - `idna == 3.7` via [#​228](https://togithub.com/pypa/gh-action-pypi-publish/issues/228) - `requests == 2.32.0` via [#​240](https://togithub.com/pypa/gh-action-pypi-publish/issues/240) - `Twine == 5.1.0` #### ⚙️ Secret Stuff In [#​241](https://togithub.com/pypa/gh-action-pypi-publish/issues/241), [@​br3ndonland](https://togithub.com/br3ndonland)[💰](https://togithub.com/sponsors/br3ndonland) added a Docker label linking the container image to this repository for GHCR to display it nicely. This is preparatory work for a big performance-focused refactoring he's working on in [#​230](https://togithub.com/pypa/gh-action-pypi-publish/issues/230). #### 💪 New Contributors - [@​shenxianpeng](https://togithub.com/shenxianpeng) made their first contribution in [https://github.com/pypa/gh-action-pypi-publish/pull/231](https://togithub.com/pypa/gh-action-pypi-publish/pull/231) - [@​br3ndonland](https://togithub.com/br3ndonland) made their first contribution in [https://github.com/pypa/gh-action-pypi-publish/pull/241](https://togithub.com/pypa/gh-action-pypi-publish/pull/241) **🪞 Full Diff**: pypa/gh-action-pypi-publish@v1.8.14...v1.9.0 **🧔♂️ Release Manager:** [@​webknjaz 🇺🇦](https://togithub.com/sponsors/webknjaz) **🙏 Special Thanks** to [@​pradyunsg](https://togithub.com/pradyunsg)[💰](https://togithub.com/sponsors/pradyunsg) for promptly unblocking this release to Marketplace as GitHub started asking for yet another developer agreement signature from the organization admins. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/hetznercloud/hcloud-python). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | patch | `v4.1.6` -> `v4.1.7` | | [github/codeql-action](https://togithub.com/github/codeql-action) | action | patch | `v2.25.8` -> `v2.25.11` | | [pypa/gh-action-pypi-publish](https://togithub.com/pypa/gh-action-pypi-publish) | action | minor | `v1.8.14` -> `v1.9.0` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v4.1.7`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v417) [Compare Source](https://togithub.com/actions/checkout/compare/v4.1.6...v4.1.7) - Bump the minor-npm-dependencies group across 1 directory with 4 updates by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/actions/checkout/pull/1739](https://togithub.com/actions/checkout/pull/1739) - Bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/actions/checkout/pull/1697](https://togithub.com/actions/checkout/pull/1697) - Check out other refs/\* by commit by [@​orhantoy](https://togithub.com/orhantoy) in [https://github.com/actions/checkout/pull/1774](https://togithub.com/actions/checkout/pull/1774) - Pin actions/checkout's own workflows to a known, good, stable version. by [@​jww3](https://togithub.com/jww3) in [https://github.com/actions/checkout/pull/1776](https://togithub.com/actions/checkout/pull/1776) </details> <details> <summary>github/codeql-action (github/codeql-action)</summary> ### [`v2.25.11`](https://togithub.com/github/codeql-action/compare/v2.25.10...v2.25.11) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.25.10...v2.25.11) ### [`v2.25.10`](https://togithub.com/github/codeql-action/compare/v2.25.9...v2.25.10) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.25.9...v2.25.10) ### [`v2.25.9`](https://togithub.com/github/codeql-action/compare/v2.25.8...v2.25.9) [Compare Source](https://togithub.com/github/codeql-action/compare/v2.25.8...v2.25.9) </details> <details> <summary>pypa/gh-action-pypi-publish (pypa/gh-action-pypi-publish)</summary> ### [`v1.9.0`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.9.0) [Compare Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.8.14...v1.9.0) #### 💅 Cosmetic Output Improvements - [@​woodruffw](https://togithub.com/woodruffw)[💰](https://togithub.com/sponsors/woodruffw) updated the tense on password nudge in [#​234](https://togithub.com/pypa/gh-action-pypi-publish/issues/234) - [@​shenxianpeng](https://togithub.com/shenxianpeng)[💰](https://togithub.com/sponsors/shenxianpeng) helped us disable the progress bar that was being produced by the `twine upload` command via [#​231](https://togithub.com/pypa/gh-action-pypi-publish/issues/231) - [@​woodruffw](https://togithub.com/woodruffw)[💰](https://togithub.com/sponsors/woodruffw) also linked the PyPI status dashboard in the trusted publishing error message via [https://github.com/pypa/gh-action-pypi-publish/pull/243](https://togithub.com/pypa/gh-action-pypi-publish/pull/243) #### 🛠️ Internal Dependencies - pre-commit linters got auto-updated @​ [#​225](https://togithub.com/pypa/gh-action-pypi-publish/issues/225) - some notable dependency bumps include - `cryptography == 42.0.7` - `id == 1.4.0` - `idna == 3.7` via [#​228](https://togithub.com/pypa/gh-action-pypi-publish/issues/228) - `requests == 2.32.0` via [#​240](https://togithub.com/pypa/gh-action-pypi-publish/issues/240) - `Twine == 5.1.0` #### ⚙️ Secret Stuff In [#​241](https://togithub.com/pypa/gh-action-pypi-publish/issues/241), [@​br3ndonland](https://togithub.com/br3ndonland)[💰](https://togithub.com/sponsors/br3ndonland) added a Docker label linking the container image to this repository for GHCR to display it nicely. This is preparatory work for a big performance-focused refactoring he's working on in [#​230](https://togithub.com/pypa/gh-action-pypi-publish/issues/230). #### 💪 New Contributors - [@​shenxianpeng](https://togithub.com/shenxianpeng) made their first contribution in [https://github.com/pypa/gh-action-pypi-publish/pull/231](https://togithub.com/pypa/gh-action-pypi-publish/pull/231) - [@​br3ndonland](https://togithub.com/br3ndonland) made their first contribution in [https://github.com/pypa/gh-action-pypi-publish/pull/241](https://togithub.com/pypa/gh-action-pypi-publish/pull/241) **🪞 Full Diff**: pypa/gh-action-pypi-publish@v1.8.14...v1.9.0 **🧔♂️ Release Manager:** [@​webknjaz 🇺🇦](https://togithub.com/sponsors/webknjaz) **🙏 Special Thanks** to [@​pradyunsg](https://togithub.com/pradyunsg)[💰](https://togithub.com/sponsors/pradyunsg) for promptly unblocking this release to Marketplace as GitHub started asking for yet another developer agreement signature from the organization admins. </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on wednesday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/google/osv.dev). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS45IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: Xueqin Cui <[email protected]>
Closes #229. I looked at
twine
's help and added a new inputno-color
for this action.