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
base: unstable/v1
Are you sure you want to change the base?
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. |
Closes #229. I looked at
twine
's help and added a new inputno-color
for this action.