Skip to content

Commit 5d7a9ba

Browse files
hannahblairgradio-pr-botfreddyaboulton
authored
update pypi prompt (#13380)
* update pypi prompt * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Freddy Boulton <41651716+freddyaboulton@users.noreply.github.com>
1 parent 5d9c9fe commit 5d7a9ba

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.changeset/rotten-jars-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gradio": patch
3+
---
4+
5+
fix:update pypi prompt

gradio/cli/commands/components/publish.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,13 @@ def _get_wheel_version(path: Path):
157157
config_file = str(Path.home() / ".pypirc")
158158
elif upload_pypi:
159159
print(
160-
":light_bulb: If you have Two Factor Authentication enabled, the username is __token__ and your password is your API key."
160+
":light_bulb: You can generate an API token at [blue]https://pypi.org/manage/account/token/[/]"
161161
)
162-
pypi_username = Prompt.ask(":laptop_computer: Enter your pypi username")
163-
pypi_password = Prompt.ask(
164-
":closed_lock_with_key: Enter your pypi password", password=True
162+
pypi_token = Prompt.ask(
163+
":closed_lock_with_key: Enter your pypi API token", password=True
165164
)
165+
pypi_username = "__token__"
166+
pypi_password = pypi_token
166167
if upload_pypi:
167168
try:
168169
from twine.commands.upload import upload as twine_upload # type: ignore

0 commit comments

Comments
 (0)