-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The Gradio custom component CLI does not support publishing packages with an alpha version, e.g. 0.26.0-alpha.1.
This is because it attempts to parse the version from the wheel built using gradio cc build, which uses PEP440 (0.26.0a1) versioning instead of semver.
Code responsible:
gradio/gradio/cli/commands/components/publish.py
Lines 113 to 116 in 1ae2a57
| wheel_file = max( | |
| (p for p in distribution_files if p.suffix == ".whl"), | |
| key=lambda s: semantic_version.Version(str(s.name).split("-")[1]), | |
| ) |
Have you searched existing issues? 🔎
- I have searched and found no existing issues
Reproduction
Set the version of your custom gradio component to an alpha version (can be in PEP440 or SemVer)
[project]
name = "gradio_rerun"
version = "0.26.0-alpha.1"Run
gradio cc build
# and then
gradio cc publishSystem Info
Gradio Environment Information:
------------------------------
Operating System: Darwin
gradio version: 5.47.2
gradio_client version: 1.13.3
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
anyio: 4.6.2.post1
audioop-lts is not installed.
brotli: 1.1.0
fastapi: 0.115.2
ffmpy: 0.4.0
gradio-client: 1.13.3
groovy: 0.1.2
httpx: 0.27.2
huggingface-hub: 0.35.3
jinja2: 3.1.4
markupsafe: 2.1.5
numpy: 2.2.5
orjson: 3.10.7
packaging: 24.1
pandas: 2.2.3
pillow: 10.4.0
pydantic: 2.9.2
pydub: 0.25.1
python-multipart: 0.0.20
pyyaml: 6.0.2
ruff: 0.11.0
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.40.0
tomlkit: 0.12.0
typer: 0.12.5
typing-extensions: 4.12.2
uvicorn: 0.32.0
mcp is not installed.
pydantic: 2.9.2
authlib is not installed.
itsdangerous is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.9.0
httpx: 0.27.2
huggingface-hub: 0.35.3
packaging: 24.1
typing-extensions: 4.12.2
websockets: 15.0.1Severity
I can work around it
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working