We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support python=3.10
Python 3.10 has been out for a while but we seem to not test for it. What are the roadblocks for us to support 3.10 and maybe deprecate 3.6? (Many packages now support 3.8-3.10 and older versions are not supported anymore).

Ping @LysandreJik @osanseviero maybe?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 from setuptools import find_packages, setup
2 
3 
4 def get_version() -> str:
5     rel_path = "src/huggingface_hub/__init__.py"
6     with open(rel_path, "r") as fp:
7         for line in fp.read().splitlines():
8             if line.startswith("__version__"):
9                 delim = '"' if '"' in line else "'"
10                 return line.split(delim)[1]
11     raise RuntimeError("Unable to find version string.")
12 
13 
14 install_requires = [
15     "filelock",
16     "requests",
17     "tqdm",
18     "pyyaml",
19     "typing-extensions>=3.7.4.3",  # to be able to import TypeAlias
20     "importlib_metadata;python_version<'3.8'",
21     "packaging>=20.9",
22 ]
23 
24 extras = {}
25 
26 extras["torch"] = [
27     "torch",
28 ]
29 
30 extras["tensorflow"] = [
31     "tensorflow",
32     "pydot",
33     "graphviz"
34 ]
35 
36 extras["testing"] = [
37     "pytest",
38     "datasets",
39     "soundfile",
40 ]
41 
42 extras["quality"] = [
43     "black~=22.0",
44     "isort>=5.5.4",
45     "flake8>=3.8.3",
46 ]
47 
48 extras["all"] = extras["testing"] + extras["quality"]
49 
50 extras["dev"] = extras["all"]
51 
52 
53 setup(
54     name="huggingface_hub",
55     version=get_version(),
56     author="Hugging Face, Inc.",
57     author_email="julien@huggingface.co",
58     description="Client library to download and publish models on the huggingface.co hub",
59     long_description=open("README.md", "r", encoding="utf-8").read(),
60     long_description_content_type="text/markdown",
61     keywords="model-hub machine-learning models natural-language-processing deep-learning pytorch pretrained-models",
62     license="Apache",
63     url="https://github.com/huggingface/huggingface_hub",
64     package_dir={"": "src"},
65     packages=find_packages("src"),
66     extras_require=extras,
67     entry_points={
68         "console_scripts": [
69             "huggingface-cli=huggingface_hub.commands.huggingface_cli:main"
70         ]
71     },
72     python_requires=">=3.6.0",
73     install_requires=install_requires,
74     classifiers=[
75         "Intended Audience :: Developers",
76         "Intended Audience :: Education",
77         "Intended Audience :: Science/Research",
78         "License :: OSI Approved :: Apache Software License",
79         "Operating System :: OS Independent",
80         "Programming Language :: Python :: 3",
81         "Topic :: Scientific/Engineering :: Artificial Intelligence",
82     ],
83 )
84
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -69,7 +69,7 @@
             "huggingface-cli=huggingface_hub.commands.huggingface_cli:main"
         ]
     },
-    python_requires=">=3.6.0",
+    python_requires=">=3.7.0",
     install_requires=install_requires,
     classifiers=[
         "Intended Audience :: Developers",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -69,7 +69,7 @@\n             \"huggingface-cli=huggingface_hub.commands.huggingface_cli:main\"\n         ]\n     },\n-    python_requires=\">=3.6.0\",\n+    python_requires=\">=3.7.0\",\n     install_requires=install_requires,\n     classifiers=[\n         \"Intended Audience :: Developers\",\n", "issue": "Support python=3.10\nPython 3.10 has been out for a while but we seem to not test for it. What are the roadblocks for us to support 3.10 and maybe deprecate 3.6? (Many packages now support 3.8-3.10 and older versions are not supported anymore).\r\n\r\nPing @LysandreJik @osanseviero maybe?\n", "before_files": [{"content": "from setuptools import find_packages, setup\n\n\ndef get_version() -> str:\n    rel_path = \"src/huggingface_hub/__init__.py\"\n    with open(rel_path, \"r\") as fp:\n        for line in fp.read().splitlines():\n            if line.startswith(\"__version__\"):\n                delim = '\"' if '\"' in line else \"'\"\n                return line.split(delim)[1]\n    raise RuntimeError(\"Unable to find version string.\")\n\n\ninstall_requires = [\n    \"filelock\",\n    \"requests\",\n    \"tqdm\",\n    \"pyyaml\",\n    \"typing-extensions>=3.7.4.3\",  # to be able to import TypeAlias\n    \"importlib_metadata;python_version<'3.8'\",\n    \"packaging>=20.9\",\n]\n\nextras = {}\n\nextras[\"torch\"] = [\n    \"torch\",\n]\n\nextras[\"tensorflow\"] = [\n    \"tensorflow\",\n    \"pydot\",\n    \"graphviz\"\n]\n\nextras[\"testing\"] = [\n    \"pytest\",\n    \"datasets\",\n    \"soundfile\",\n]\n\nextras[\"quality\"] = [\n    \"black~=22.0\",\n    \"isort>=5.5.4\",\n    \"flake8>=3.8.3\",\n]\n\nextras[\"all\"] = extras[\"testing\"] + extras[\"quality\"]\n\nextras[\"dev\"] = extras[\"all\"]\n\n\nsetup(\n    name=\"huggingface_hub\",\n    version=get_version(),\n    author=\"Hugging Face, Inc.\",\n    author_email=\"julien@huggingface.co\",\n    description=\"Client library to download and publish models on the huggingface.co hub\",\n    long_description=open(\"README.md\", \"r\", encoding=\"utf-8\").read(),\n    long_description_content_type=\"text/markdown\",\n    keywords=\"model-hub machine-learning models natural-language-processing deep-learning pytorch pretrained-models\",\n    license=\"Apache\",\n    url=\"https://github.com/huggingface/huggingface_hub\",\n    package_dir={\"\": \"src\"},\n    packages=find_packages(\"src\"),\n    extras_require=extras,\n    entry_points={\n        \"console_scripts\": [\n            \"huggingface-cli=huggingface_hub.commands.huggingface_cli:main\"\n        ]\n    },\n    python_requires=\">=3.6.0\",\n    install_requires=install_requires,\n    classifiers=[\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Education\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python :: 3\",\n        \"Topic :: Scientific/Engineering :: Artificial Intelligence\",\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "from setuptools import find_packages, setup\n\n\ndef get_version() -> str:\n    rel_path = \"src/huggingface_hub/__init__.py\"\n    with open(rel_path, \"r\") as fp:\n        for line in fp.read().splitlines():\n            if line.startswith(\"__version__\"):\n                delim = '\"' if '\"' in line else \"'\"\n                return line.split(delim)[1]\n    raise RuntimeError(\"Unable to find version string.\")\n\n\ninstall_requires = [\n    \"filelock\",\n    \"requests\",\n    \"tqdm\",\n    \"pyyaml\",\n    \"typing-extensions>=3.7.4.3\",  # to be able to import TypeAlias\n    \"importlib_metadata;python_version<'3.8'\",\n    \"packaging>=20.9\",\n]\n\nextras = {}\n\nextras[\"torch\"] = [\n    \"torch\",\n]\n\nextras[\"tensorflow\"] = [\n    \"tensorflow\",\n    \"pydot\",\n    \"graphviz\"\n]\n\nextras[\"testing\"] = [\n    \"pytest\",\n    \"datasets\",\n    \"soundfile\",\n]\n\nextras[\"quality\"] = [\n    \"black~=22.0\",\n    \"isort>=5.5.4\",\n    \"flake8>=3.8.3\",\n]\n\nextras[\"all\"] = extras[\"testing\"] + extras[\"quality\"]\n\nextras[\"dev\"] = extras[\"all\"]\n\n\nsetup(\n    name=\"huggingface_hub\",\n    version=get_version(),\n    author=\"Hugging Face, Inc.\",\n    author_email=\"julien@huggingface.co\",\n    description=\"Client library to download and publish models on the huggingface.co hub\",\n    long_description=open(\"README.md\", \"r\", encoding=\"utf-8\").read(),\n    long_description_content_type=\"text/markdown\",\n    keywords=\"model-hub machine-learning models natural-language-processing deep-learning pytorch pretrained-models\",\n    license=\"Apache\",\n    url=\"https://github.com/huggingface/huggingface_hub\",\n    package_dir={\"\": \"src\"},\n    packages=find_packages(\"src\"),\n    extras_require=extras,\n    entry_points={\n        \"console_scripts\": [\n            \"huggingface-cli=huggingface_hub.commands.huggingface_cli:main\"\n        ]\n    },\n    python_requires=\">=3.7.0\",\n    install_requires=install_requires,\n    classifiers=[\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Education\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python :: 3\",\n        \"Topic :: Scientific/Engineering :: Artificial Intelligence\",\n    ],\n)\n", "path": "setup.py"}]}