Skip to content

Commit

Permalink
added audioop-lts module to support pydub for python3.13+ (#9757)
Browse files Browse the repository at this point in the history
* added audioop-lts module to support pydub for python3.13+

* add changeset

* add changeset

* Revert "update prerequisite note to mention python 3.13 issue (#9710)"

This reverts commit 2735e89.

* fixes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent 3b9ed29 commit f971ca6
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-peaches-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": patch
---

fix:added audioop-lts module to support pydub for python3.13+
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ It just takes a few lines of Python to create your own demo, so let's get starte

### Installation

**Prerequisite**: Gradio 5 supports [Python 3.10 - 3.12](https://www.python.org/downloads/).
**Prerequisite**: Gradio 5 requires [Python 3.10 or higher](https://www.python.org/downloads/)


We recommend installing Gradio using `pip`, which is included by default in Python. Run this in your terminal or command prompt:
Expand Down
2 changes: 1 addition & 1 deletion client/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The Gradio client works with any Gradio Space, whether it be an image generator,

If you already have a recent version of `gradio`, then the `gradio_client` is included as a dependency.

Otherwise, the lightweight `gradio_client` package can be installed from pip (or pip3) and works with [Python 3.10 - 3.12]:
Otherwise, the lightweight `gradio_client` package can be installed from pip (or pip3) and works with Python versions 3.10 or higher:

```bash
$ pip install gradio_client
Expand Down
2 changes: 1 addition & 1 deletion guides/01_getting-started/01_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It just takes a few lines of Python to create your own demo, so let's get starte

## Installation

**Prerequisite**: Gradio 5 supports [Python 3.10 - 3.12](https://www.python.org/downloads/).
**Prerequisite**: Gradio requires [Python 3.10 or higher](https://www.python.org/downloads/).


We recommend installing Gradio using `pip`, which is included by default in Python. Run this in your terminal or command prompt:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The Gradio client works with any hosted Gradio app! Although the Client is mostl

If you already have a recent version of `gradio`, then the `gradio_client` is included as a dependency. But note that this documentation reflects the latest version of the `gradio_client`, so upgrade if you're not sure!

The lightweight `gradio_client` package can be installed from pip (or pip3) and is tested to work with [**Python 3.10 - 3.12**]:
The lightweight `gradio_client` package can be installed from pip (or pip3) and is tested to work with **Python versions 3.10 or higher**:

```bash
$ pip install --upgrade gradio_client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Using virtual environments ensures that you can work on multiple Python projects

To install Gradio on a Windows system in a virtual environment, follow these steps:

1. **Install Python**: Ensure you have [Python 3.10 - 3.12] installed. You can download it from [python.org](https://www.python.org/). You can verify the installation by running `python --version` or `python3 --version` in Command Prompt.
1. **Install Python**: Ensure you have Python 3.10 or higher installed. You can download it from [python.org](https://www.python.org/). You can verify the installation by running `python --version` or `python3 --version` in Command Prompt.


2. **Create a Virtual Environment**:
Expand Down Expand Up @@ -62,7 +62,7 @@ The installation steps on MacOS and Linux are similar to Windows but with some d
1. **Install Python**:
Python usually comes pre-installed on MacOS and most Linux distributions. You can verify the installation by running `python --version` in the terminal (note that depending on how Python is installed, you might have to use `python3` instead of `python` throughout these steps).

Ensure you have [Python 3.10 - 3.12] installed. If you do not have it installed, you can download it from [python.org](https://www.python.org/).
Ensure you have Python 3.10 or higher installed. If you do not have it installed, you can download it from [python.org](https://www.python.org/).

2. **Create a Virtual Environment**:
Open Terminal and navigate to your project directory. Then create a virtual environment using:
Expand Down
9 changes: 5 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
aiofiles>=22.0,<24.0
anyio>=3.0,<5.0
audioop-lts<1.0; python_version >= "3.13" #it provides support for 'audioop' module removed in latest python version used by pydub
fastapi>=0.115.2,<1.0
ffmpy
gradio_client==1.4.2
Expand All @@ -16,11 +17,11 @@ pydantic>=2.0
python-multipart>=0.0.9,!=0.0.13 # required for fastapi forms. 0.0.13 was yanked from PyPI but micropip now ignores the yanked flag so we explicitly exclude it.
pydub
pyyaml>=5.0,<7.0
ruff>=0.2.2; sys.platform != 'emscripten'
semantic_version~=2.0
starlette>=0.40.0,<1.0; sys.platform != 'emscripten'
tomlkit==0.12.0
typer>=0.12,<1.0; sys.platform != 'emscripten'
typing_extensions~=4.0
urllib3~=2.0; sys.platform == 'emscripten' # urllib3 is used for Lite support. Version spec can be omitted because urllib3==2.1.0 is prebuilt for Pyodide and urllib>=2.2.0 supports Pyodide as well.
uvicorn>=0.14.0; sys.platform != 'emscripten'
typer>=0.12,<1.0; sys.platform != 'emscripten'
tomlkit==0.12.0
ruff>=0.2.2; sys.platform != 'emscripten'
uvicorn>=0.14.0; sys.platform != 'emscripten'

0 comments on commit f971ca6

Please sign in to comment.