mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
Deprecate python 3.7 (#4484)
* Remove versions from 3.7 * CHANGELOG * from typing import Literal * Remaning places 3.7 * Last few spots * Use 3.8 in lint
This commit is contained in:
parent
4729457929
commit
afcc20801e
20
.github/workflows/backend.yml
vendored
20
.github/workflows/backend.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
matrix:
|
||||
os: ["ubuntu-latest", "windows-latest"]
|
||||
test-type: ["not flaky", "flaky"]
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.8"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ matrix.test-type == 'flaky' }}
|
||||
defaults:
|
||||
@ -36,7 +36,6 @@ jobs:
|
||||
cache-dependency-path: |
|
||||
client/python/requirements.txt
|
||||
requirements.txt
|
||||
test/requirements-37.txt
|
||||
test/requirements.txt
|
||||
- name: Install Client
|
||||
run: |
|
||||
@ -56,12 +55,11 @@ jobs:
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
python-version: "3.8"
|
||||
cache: pip
|
||||
cache-dependency-path: |
|
||||
client/python/requirements.txt
|
||||
requirements.txt
|
||||
test/requirements-37.txt
|
||||
test/requirements.txt
|
||||
- name: Install Client
|
||||
run: |
|
||||
@ -75,7 +73,7 @@ jobs:
|
||||
matrix:
|
||||
os: ["ubuntu-latest", "windows-latest"]
|
||||
test-type: ["not flaky", "flaky"]
|
||||
python-version: ["3.9", "3.7"]
|
||||
python-version: ["3.8"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ matrix.test-type == 'flaky' }}
|
||||
steps:
|
||||
@ -88,7 +86,6 @@ jobs:
|
||||
cache-dependency-path: |
|
||||
client/python/requirements.txt
|
||||
requirements.txt
|
||||
test/requirements-37.txt
|
||||
test/requirements.txt
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
@ -104,16 +101,10 @@ jobs:
|
||||
run: |
|
||||
pip install -e .
|
||||
python -m pip install --upgrade pip
|
||||
- name: Install 3.9 Test Dependencies
|
||||
- name: Install 3.8 Test Dependencies
|
||||
shell: bash
|
||||
if: ${{ matrix.python-version == '3.9' }}
|
||||
run: |
|
||||
pip install -r test/requirements.txt
|
||||
- name: Install 3.7 Test Dependencies
|
||||
shell: bash
|
||||
if: ${{ matrix.python-version == '3.7' }}
|
||||
run: |
|
||||
pip install -r test/requirements-37.txt
|
||||
- name: Build frontend
|
||||
shell: bash
|
||||
run: |
|
||||
@ -134,12 +125,11 @@ jobs:
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
python-version: "3.8"
|
||||
cache: pip
|
||||
cache-dependency-path: |
|
||||
client/python/requirements.txt
|
||||
requirements.txt
|
||||
test/requirements-37.txt
|
||||
test/requirements.txt
|
||||
- name: Install Test Dependencies
|
||||
run: pip install -e . -r test/requirements.txt
|
||||
|
@ -45,6 +45,7 @@ demo.launch()
|
||||
## Breaking Changes:
|
||||
|
||||
- The behavior of the `Clear` button has been changed for `Slider`, `CheckboxGroup`, `Radio`, `Dropdown` components by [@abidlabs](https://github.com/abidlabs) in [PR 4456](https://github.com/gradio-app/gradio/pull/4456). The Clear button now sets the value of these components to be empty as opposed to the original default set by the developer. This is to make them in line with the rest of the Gradio components.
|
||||
- Python 3.7 end of life is June 27 2023. Gradio will no longer support python 3.7 by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4484](https://github.com/gradio-app/gradio/pull/4484)
|
||||
|
||||
# 3.34.0
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- [Python 3.7+](https://www.python.org/downloads/)
|
||||
- [Python 3.8+](https://www.python.org/downloads/)
|
||||
- [Node.js v16.14+](https://nodejs.dev/en/download/package-manager/) (only needed if you are making changes to the frontend)
|
||||
- [pnpm 8.1+](https://pnpm.io/8.x/installation) (only needed if you are making changes to the frontend)
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
[](https://github.com/gradio-app/gradio/actions/workflows/ui.yml)
|
||||
[](https://pypi.org/project/gradio/)
|
||||
[](https://pypi.org/project/gradio/)
|
||||

|
||||

|
||||
[](https://twitter.com/gradio)
|
||||
|
||||
[Website](https://gradio.app)
|
||||
@ -39,7 +39,7 @@ Gradio is useful for:
|
||||
|
||||
## Quickstart
|
||||
|
||||
**Prerequisite**: Gradio requires Python 3.7 or higher, that's all!
|
||||
**Prerequisite**: Gradio requires Python 3.8 or higher, that's all!
|
||||
|
||||
### What Does Gradio Do?
|
||||
|
||||
|
@ -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 versions 3.9 or higher:
|
||||
Otherwise, the lightweight `gradio_client` package can be installed from pip (or pip3) and works with Python versions 3.8 or higher:
|
||||
|
||||
```bash
|
||||
$ pip install gradio_client
|
||||
|
@ -13,7 +13,7 @@ from concurrent.futures import Future, TimeoutError
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from threading import Lock
|
||||
from typing import Any, Callable
|
||||
from typing import Any, Callable, Literal
|
||||
|
||||
import huggingface_hub
|
||||
import requests
|
||||
@ -25,7 +25,6 @@ from huggingface_hub.utils import (
|
||||
send_telemetry,
|
||||
)
|
||||
from packaging import version
|
||||
from typing_extensions import Literal
|
||||
|
||||
from gradio_client import serializing, utils
|
||||
from gradio_client.documentation import document, set_documentation_group
|
||||
|
@ -1,6 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing_extensions import NotRequired, TypedDict
|
||||
from typing import TypedDict
|
||||
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
||||
class FileData(TypedDict):
|
||||
|
@ -7,7 +7,7 @@ name = "gradio_client"
|
||||
dynamic = ["version", "dependencies", "readme"]
|
||||
description = "Python library for easily interacting with trained machine learning models"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.7"
|
||||
requires-python = ">=3.8"
|
||||
authors = [
|
||||
{ name = "Abubakar Abid", email = "team@gradio.app" },
|
||||
{ name = "Ali Abid", email = "team@gradio.app" },
|
||||
@ -25,7 +25,6 @@ classifiers = [
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3 :: Only',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
|
@ -12,7 +12,7 @@ import warnings
|
||||
import webbrowser
|
||||
from abc import abstractmethod
|
||||
from types import ModuleType
|
||||
from typing import TYPE_CHECKING, Any, AsyncIterator, Callable
|
||||
from typing import TYPE_CHECKING, Any, AsyncIterator, Callable, Literal
|
||||
|
||||
import anyio
|
||||
import requests
|
||||
@ -21,7 +21,6 @@ from gradio_client import serializing
|
||||
from gradio_client import utils as client_utils
|
||||
from gradio_client.documentation import document, set_documentation_group
|
||||
from packaging import version
|
||||
from typing_extensions import Literal
|
||||
|
||||
from gradio import (
|
||||
analytics,
|
||||
|
@ -20,7 +20,7 @@ from copy import deepcopy
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from types import ModuleType
|
||||
from typing import TYPE_CHECKING, Any, Callable, Dict
|
||||
from typing import TYPE_CHECKING, Any, Callable, Dict, Literal
|
||||
|
||||
import aiofiles
|
||||
import altair as alt
|
||||
@ -50,7 +50,6 @@ from gradio_client.serializing import (
|
||||
)
|
||||
from pandas.api.types import is_numeric_dtype
|
||||
from PIL import Image as _Image # using _ to minimize namespace pollution
|
||||
from typing_extensions import Literal
|
||||
|
||||
from gradio import processing_utils, utils
|
||||
from gradio.blocks import Block, BlockContext
|
||||
|
@ -4,10 +4,9 @@ of the on-page-load event, which is defined in gr.Blocks().load()."""
|
||||
from __future__ import annotations
|
||||
|
||||
import warnings
|
||||
from typing import TYPE_CHECKING, Any, Callable
|
||||
from typing import TYPE_CHECKING, Any, Callable, Literal
|
||||
|
||||
from gradio_client.documentation import document, set_documentation_group
|
||||
from typing_extensions import Literal
|
||||
|
||||
from gradio.blocks import Block
|
||||
from gradio.helpers import EventData
|
||||
|
@ -368,13 +368,6 @@ class Queue:
|
||||
elif response.json.get("is_generating", False):
|
||||
old_response = response
|
||||
while response.json.get("is_generating", False):
|
||||
# Python 3.7 doesn't have named tasks.
|
||||
# In order to determine if a task was cancelled, we
|
||||
# ping the websocket to see if it was closed mid-iteration.
|
||||
if sys.version_info < (3, 8):
|
||||
is_alive = await self.send_message(event, {"msg": "alive?"})
|
||||
if not is_alive:
|
||||
return
|
||||
old_response = response
|
||||
open_ws = []
|
||||
for event in awake_events:
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Quickstart
|
||||
|
||||
**Prerequisite**: Gradio requires Python 3.7 or higher, that's all!
|
||||
**Prerequisite**: Gradio requires Python 3.8 or higher, that's all!
|
||||
|
||||
## What Does Gradio Do?
|
||||
|
||||
|
@ -7,7 +7,7 @@ name = "gradio"
|
||||
dynamic = ["version", "dependencies", "readme"]
|
||||
description = "Python library for easily interacting with trained machine learning models"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.7"
|
||||
requires-python = ">=3.8"
|
||||
authors = [
|
||||
{ name = "Abubakar Abid", email = "team@gradio.app" },
|
||||
{ name = "Ali Abid", email = "team@gradio.app" },
|
||||
@ -25,7 +25,6 @@ classifiers = [
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3 :: Only',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
|
@ -10,7 +10,7 @@
|
||||
[](https://github.com/gradio-app/gradio/actions/workflows/ui.yml)
|
||||
[](https://pypi.org/project/gradio/)
|
||||
[](https://pypi.org/project/gradio/)
|
||||

|
||||

|
||||
[](https://twitter.com/gradio)
|
||||
|
||||
[官网](https://gradio.app)
|
||||
|
@ -7,7 +7,7 @@
|
||||
[](https://github.com/gradio-app/gradio/actions/workflows/ui.yml)
|
||||
[](https://pypi.org/project/gradio/)
|
||||
[](https://pypi.org/project/gradio/)
|
||||

|
||||

|
||||
[](https://twitter.com/gradio)
|
||||
|
||||
[Website](https://gradio.app)
|
||||
|
@ -1,280 +0,0 @@
|
||||
#
|
||||
# This file is autogenerated by pip-compile with Python 3.7
|
||||
# by the following command:
|
||||
#
|
||||
# pip-compile --output-file=requirements-37.txt requirements.in
|
||||
#
|
||||
altair==4.2.0
|
||||
# via -r requirements.in
|
||||
anyio==3.6.1
|
||||
# via
|
||||
# httpcore
|
||||
# starlette
|
||||
asyncio==3.4.3
|
||||
# via -r requirements.in
|
||||
attrs==21.4.0
|
||||
# via
|
||||
# jsonschema
|
||||
# pytest
|
||||
backcall==0.2.0
|
||||
# via ipython
|
||||
black==23.3.0
|
||||
# via -r requirements.in
|
||||
boto3==1.26.65
|
||||
# via -r requirements.in
|
||||
botocore==1.29.87
|
||||
# via
|
||||
# boto3
|
||||
# s3transfer
|
||||
certifi==2022.6.15
|
||||
# via
|
||||
# httpcore
|
||||
# httpx
|
||||
# requests
|
||||
charset-normalizer==2.1.0
|
||||
# via requests
|
||||
click==8.1.3
|
||||
# via black
|
||||
cloudpickle==2.1.0
|
||||
# via shap
|
||||
coverage[toml]==6.4.2
|
||||
# via
|
||||
# -r requirements.in
|
||||
# pytest-cov
|
||||
decorator==5.1.1
|
||||
# via ipython
|
||||
entrypoints==0.4
|
||||
# via altair
|
||||
fastapi==0.87.0
|
||||
# via -r requirements.in
|
||||
filelock==3.7.1
|
||||
# via
|
||||
# huggingface-hub
|
||||
# transformers
|
||||
h11==0.12.0
|
||||
# via httpcore
|
||||
httpcore==0.15.0
|
||||
# via httpx
|
||||
httpx==0.23.0
|
||||
# via
|
||||
# -r requirements.in
|
||||
# respx
|
||||
huggingface-hub==0.14.0
|
||||
# via
|
||||
# -r requirements.in
|
||||
# transformers
|
||||
idna==3.3
|
||||
# via
|
||||
# anyio
|
||||
# requests
|
||||
# rfc3986
|
||||
imageio==2.19.5
|
||||
# via scikit-image
|
||||
importlib-metadata==4.2.0
|
||||
# via
|
||||
# click
|
||||
# huggingface-hub
|
||||
# jsonschema
|
||||
# pluggy
|
||||
# pytest
|
||||
# transformers
|
||||
importlib-resources==5.12.0
|
||||
# via jsonschema
|
||||
iniconfig==1.1.1
|
||||
# via pytest
|
||||
ipython==7.34.0
|
||||
# via -r requirements.in
|
||||
jedi==0.18.1
|
||||
# via ipython
|
||||
jinja2==3.1.2
|
||||
# via altair
|
||||
jmespath==1.0.1
|
||||
# via
|
||||
# boto3
|
||||
# botocore
|
||||
joblib==1.1.0
|
||||
# via scikit-learn
|
||||
jsonschema==4.7.2
|
||||
# via altair
|
||||
llvmlite==0.38.1
|
||||
# via numba
|
||||
markupsafe==2.1.1
|
||||
# via jinja2
|
||||
matplotlib-inline==0.1.3
|
||||
# via ipython
|
||||
mypy-extensions==0.4.3
|
||||
# via black
|
||||
networkx==2.6.3
|
||||
# via scikit-image
|
||||
numba==0.55.2
|
||||
# via shap
|
||||
numpy==1.21.6
|
||||
# via
|
||||
# altair
|
||||
# imageio
|
||||
# numba
|
||||
# pandas
|
||||
# pywavelets
|
||||
# scikit-image
|
||||
# scikit-learn
|
||||
# scipy
|
||||
# shap
|
||||
# tifffile
|
||||
# transformers
|
||||
packaging==22.0
|
||||
# via
|
||||
# huggingface-hub
|
||||
# pytest
|
||||
# scikit-image
|
||||
# shap
|
||||
# transformers
|
||||
pandas==1.3.5
|
||||
# via
|
||||
# altair
|
||||
# shap
|
||||
# vega-datasets
|
||||
parso==0.8.3
|
||||
# via jedi
|
||||
pathspec==0.9.0
|
||||
# via black
|
||||
pexpect==4.8.0
|
||||
# via ipython
|
||||
pickleshare==0.7.5
|
||||
# via ipython
|
||||
pillow==9.2.0
|
||||
# via
|
||||
# imageio
|
||||
# scikit-image
|
||||
platformdirs==2.5.2
|
||||
# via black
|
||||
pluggy==1.0.0
|
||||
# via pytest
|
||||
prompt-toolkit==3.0.30
|
||||
# via ipython
|
||||
ptyprocess==0.7.0
|
||||
# via pexpect
|
||||
py==1.11.0
|
||||
# via pytest
|
||||
pydantic==1.9.1
|
||||
# via
|
||||
# -r requirements.in
|
||||
# fastapi
|
||||
pygments==2.12.0
|
||||
# via ipython
|
||||
pyparsing==3.0.9
|
||||
# via packaging
|
||||
pyright==1.1.305
|
||||
pyrsistent==0.18.1
|
||||
# via jsonschema
|
||||
pytest==7.1.2
|
||||
# via
|
||||
# -r requirements.in
|
||||
# pytest-asyncio
|
||||
# pytest-cov
|
||||
pytest-asyncio==0.19.0
|
||||
# via -r requirements.in
|
||||
pytest-cov==3.0.0
|
||||
# via -r requirements.in
|
||||
python-dateutil==2.8.2
|
||||
# via
|
||||
# botocore
|
||||
# pandas
|
||||
pytz==2022.1
|
||||
# via pandas
|
||||
pywavelets==1.3.0
|
||||
# via scikit-image
|
||||
pyyaml==6.0
|
||||
# via
|
||||
# huggingface-hub
|
||||
# transformers
|
||||
regex==2022.7.9
|
||||
# via transformers
|
||||
requests==2.28.1
|
||||
# via
|
||||
# huggingface-hub
|
||||
# transformers
|
||||
respx==0.19.2
|
||||
# via -r requirements.in
|
||||
rfc3986[idna2008]==1.5.0
|
||||
# via httpx
|
||||
ruff==0.0.264
|
||||
# via -r requirements.in
|
||||
s3transfer==0.6.0
|
||||
# via boto3
|
||||
scikit-image==0.19.3
|
||||
# via -r requirements.in
|
||||
scikit-learn==1.0.2
|
||||
# via shap
|
||||
scipy==1.7.3
|
||||
# via
|
||||
# scikit-image
|
||||
# scikit-learn
|
||||
# shap
|
||||
shap==0.41.0
|
||||
# via -r requirements.in
|
||||
six==1.16.0
|
||||
# via python-dateutil
|
||||
slicer==0.0.7
|
||||
# via shap
|
||||
sniffio==1.2.0
|
||||
# via
|
||||
# anyio
|
||||
# httpcore
|
||||
# httpx
|
||||
starlette==0.21.0
|
||||
# via fastapi
|
||||
threadpoolctl==3.1.0
|
||||
# via scikit-learn
|
||||
tifffile==2021.11.2
|
||||
# via scikit-image
|
||||
tokenizers==0.12.1
|
||||
# via transformers
|
||||
tomli==2.0.1
|
||||
# via
|
||||
# black
|
||||
# coverage
|
||||
# pytest
|
||||
toolz==0.12.0
|
||||
# via altair
|
||||
torch==1.12.0
|
||||
# via -r requirements.in
|
||||
tqdm==4.64.0
|
||||
# via
|
||||
# -r requirements.in
|
||||
# huggingface-hub
|
||||
# shap
|
||||
# transformers
|
||||
traitlets==5.3.0
|
||||
# via
|
||||
# ipython
|
||||
# matplotlib-inline
|
||||
transformers==4.20.1
|
||||
# via -r requirements.in
|
||||
typed-ast==1.5.4
|
||||
# via black
|
||||
typing-extensions==4.3.0
|
||||
# via
|
||||
# anyio
|
||||
# black
|
||||
# huggingface-hub
|
||||
# importlib-metadata
|
||||
# jsonschema
|
||||
# pydantic
|
||||
# pytest-asyncio
|
||||
# starlette
|
||||
# torch
|
||||
urllib3==1.26.10
|
||||
# via
|
||||
# botocore
|
||||
# requests
|
||||
vega-datasets==0.9.0
|
||||
# via -r requirements.in
|
||||
wcwidth==0.2.5
|
||||
# via prompt-toolkit
|
||||
zipp==3.8.1
|
||||
# via
|
||||
# importlib-metadata
|
||||
# importlib-resources
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
Loading…
x
Reference in New Issue
Block a user