Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test requirements to be compatible with python 3.11 #7225

Merged
merged 11 commits into from Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strong-bugs-stick.md
@@ -0,0 +1,5 @@
---
"gradio": patch
---

feat:Fix test requirements to be compatible with python 3.11
6 changes: 3 additions & 3 deletions gradio/themes/base.py
Expand Up @@ -4,9 +4,9 @@
import re
import tempfile
import textwrap
import warnings
from pathlib import Path
from typing import Iterable
import warnings

import huggingface_hub
import semantic_version as semver
Expand Down Expand Up @@ -95,8 +95,8 @@ def repl_func(match):
return f"{css_code}\n{dark_css_code}"

def _get_computed_value(self, property: str, depth=0) -> str:
MAX_DEPTH = 100
if depth > MAX_DEPTH:
max_depth = 100
if depth > max_depth:
warnings.warn(f"Cannot resolve '{property}' - circular reference detected.")
return ""
is_dark = property.endswith("_dark")
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Expand Up @@ -100,7 +100,8 @@ exclude = [
"gradio/_frontend_code/",
"gradio/components/*_plot.py",
"gradio/ipython_ext.py",
"gradio/node"
"gradio/node/*.py",
"gradio/_frontend_code/*.py"
]

[tool.ruff]
Expand Down
3 changes: 1 addition & 2 deletions test/requirements.in
Expand Up @@ -9,14 +9,13 @@ gradio_pdf==0.0.3
httpx
huggingface_hub
polars==0.20.5
pydantic
pydantic[email]
pytest
pytest-asyncio
pytest-cov
ruff>=0.1.7
respx
scikit-image
shap
torch
tqdm
transformers
Expand Down
33 changes: 7 additions & 26 deletions test/requirements.txt
Expand Up @@ -32,8 +32,6 @@ certifi==2022.6.15
# requests
charset-normalizer==2.1.0
# via requests
cloudpickle==2.1.0
# via shap
decorator==5.1.1
# via ipython
entrypoints==0.4
Expand Down Expand Up @@ -79,40 +77,32 @@ 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
networkx==2.6.3
# via scikit-image
numba==0.55.2
# via shap
numpy==1.21.6
numpy==1.24.4
# 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.5.3
# via
# altair
# shap
# vega-datasets
parso==0.8.3
# via jedi
Expand All @@ -134,6 +124,8 @@ polars==0.20.5
# via -r requirements.in
py==1.11.0
# via pytest
pydantic[email]
# via requirements.in
pyparsing==3.0.9
# via packaging
pyrsistent==0.18.1
Expand Down Expand Up @@ -177,19 +169,12 @@ 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
scipy==1.10.0
# 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
Expand All @@ -201,26 +186,25 @@ threadpoolctl==3.1.0
# via scikit-learn
tifffile==2021.11.2
# via scikit-image
tokenizers==0.12.1
tokenizers==0.15.1
# via transformers
tomli==2.0.1
# via
# pytest
toolz==0.12.0
# via altair
torch==1.12.0
torch==2.1.2
# 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
transformers==4.37.2
# via -r requirements.in
urllib3==1.26.10
# via
Expand All @@ -230,6 +214,3 @@ vega-datasets==0.9.0
# via -r requirements.in
wcwidth==0.2.5
# via prompt-toolkit
pydantic[email]
# The following packages are considered to be unsafe in a requirements file:
# setuptools