Closed shenxianpeng closed 5 months ago
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.
Also, it might make sense to just do this unconditionally.
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 --no-color
from my local, the right command should be twine --no-color upload dist/*
not twine upload --no-color dist/*
, I hope I can adjust --no-color
before upload
.
I have moved the position of --no-color
before upload
when no-color=true
. could you approve to run CI again? thank you.
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.
twine --no-color upload dist/* --repository testpypi
twine upload dist/* --repository testpypi
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 --no-animation
instead and keep the color on.
Thanks for the hint. twine upload
supports --disable-progress-bar
, which I hadn't realized before. this should be what you need.
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 works in my local environment. 🤔
pre-commit.ci upgraded their runtime to Python 3.12 yesterday which is incompatible with some linting configuration present. I'll address that separately.
pre-commit.ci upgraded their runtime to Python 3.12 yesterday which is incompatible with some linting configuration present. I'll address that separately.
Maybe can use default_language_version
to pin the runtime version to the previous version. for example:
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.
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.