We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`<1dev` is not a valid matcher for Python package versions in `setup.py`!
On the current master branch, you have this matcher for an `install_requires` package version in [setup.py](https://github.com/googleapis/google-api-python-client/blob/110667251e8b2c8852945bfe238f399742148cda/setup.py#L36):

```python
install_requires = [
    "httplib2>=0.15.0,<1dev",
```

The `<1dev` part is ~not~ a valid version specifier (edit: it is valid, just doesn't parse correctly with distlib) in the sense of [PEP 440](https://peps.python.org/pep-0440/) and causes problems with a number of packing tools, as seen here:

```shell
$ python -c 'from distlib.version import NormalizedMatcher; NormalizedMatcher("httplib2>=0.15.0,<1dev")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 125, in __init__
    vn, prefix = self.version_class(s), False
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 33, in __init__
    self._parts = parts = self.parse(s)
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 267, in parse
    result = _normalized_key(s)
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 188, in _pep_440_key
    raise UnsupportedVersionError('Not a valid version: %s' % s)
distlib.version.UnsupportedVersionError: Not a valid version: 1dev
```

This is just speculation, but it looks like it was either faultily auto-generated by some tool, is an incomplete copy & paste or you meant `<1.dev0`. However, development versions are not typically considered by tooling and it's considered bad practice to but an upper bound on python dependencies for no good reason. This should be corrected and ideally the artifact files of the effected versions fixed and re-uploaded on pypi.org.










`<1dev` is not a valid matcher for Python package versions in `setup.py`!
On the current master branch, you have this matcher for an `install_requires` package version in [setup.py](https://github.com/googleapis/google-api-python-client/blob/110667251e8b2c8852945bfe238f399742148cda/setup.py#L36):

```python
install_requires = [
    "httplib2>=0.15.0,<1dev",
```

The `<1dev` part is ~not~ a valid version specifier (edit: it is valid, just doesn't parse correctly with distlib) in the sense of [PEP 440](https://peps.python.org/pep-0440/) and causes problems with a number of packing tools, as seen here:

```shell
$ python -c 'from distlib.version import NormalizedMatcher; NormalizedMatcher("httplib2>=0.15.0,<1dev")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 125, in __init__
    vn, prefix = self.version_class(s), False
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 33, in __init__
    self._parts = parts = self.parse(s)
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 267, in parse
    result = _normalized_key(s)
  File "/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py", line 188, in _pep_440_key
    raise UnsupportedVersionError('Not a valid version: %s' % s)
distlib.version.UnsupportedVersionError: Not a valid version: 1dev
```

This is just speculation, but it looks like it was either faultily auto-generated by some tool, is an incomplete copy & paste or you meant `<1.dev0`. However, development versions are not typically considered by tooling and it's considered bad practice to but an upper bound on python dependencies for no good reason. This should be corrected and ideally the artifact files of the effected versions fixed and re-uploaded on pypi.org.











--- 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 # Copyright 2014 Google Inc. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 """Setup script for Google API Python client.
16 
17 Also installs included versions of third party libraries, if those libraries
18 are not already installed.
19 """
20 from __future__ import print_function
21 
22 import sys
23 
24 if sys.version_info < (3, 7):
25     print("google-api-python-client requires python3 version >= 3.7.", file=sys.stderr)
26     sys.exit(1)
27 
28 import io
29 import os
30 
31 from setuptools import setup
32 
33 packages = ["apiclient", "googleapiclient", "googleapiclient/discovery_cache"]
34 
35 install_requires = [
36     "httplib2>=0.15.0,<1dev",
37     # NOTE: Maintainers, please do not require google-auth>=2.x.x
38     # Until this issue is closed
39     # https://github.com/googleapis/google-cloud-python/issues/10566
40     "google-auth>=1.19.0,<3.0.0dev",
41     "google-auth-httplib2>=0.1.0",
42     # NOTE: Maintainers, please do not require google-api-core>=2.x.x
43     # Until this issue is closed
44     # https://github.com/googleapis/google-cloud-python/issues/10566
45     "google-api-core >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
46     "uritemplate>=3.0.1,<5",
47 ]
48 
49 package_root = os.path.abspath(os.path.dirname(__file__))
50 
51 readme_filename = os.path.join(package_root, "README.md")
52 with io.open(readme_filename, encoding="utf-8") as readme_file:
53     readme = readme_file.read()
54 
55 package_root = os.path.abspath(os.path.dirname(__file__))
56 
57 version = {}
58 with open(os.path.join(package_root, "googleapiclient/version.py")) as fp:
59     exec(fp.read(), version)
60 version = version["__version__"]
61 
62 setup(
63     name="google-api-python-client",
64     version=version,
65     description="Google API Client Library for Python",
66     long_description=readme,
67     long_description_content_type="text/markdown",
68     author="Google LLC",
69     author_email="googleapis-packages@google.com",
70     url="https://github.com/googleapis/google-api-python-client/",
71     install_requires=install_requires,
72     python_requires=">=3.7",
73     packages=packages,
74     package_data={"googleapiclient": ["discovery_cache/documents/*.json"]},
75     license="Apache 2.0",
76     keywords="google api client",
77     classifiers=[
78         "Programming Language :: Python :: 3",
79         "Programming Language :: Python :: 3.7",
80         "Programming Language :: Python :: 3.8",
81         "Programming Language :: Python :: 3.9",
82         "Programming Language :: Python :: 3.10",
83         "Programming Language :: Python :: 3.11",
84         "Development Status :: 5 - Production/Stable",
85         "Intended Audience :: Developers",
86         "License :: OSI Approved :: Apache Software License",
87         "Operating System :: OS Independent",
88         "Topic :: Internet :: WWW/HTTP",
89     ],
90 )
91
```
--- 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
@@ -33,16 +33,16 @@
 packages = ["apiclient", "googleapiclient", "googleapiclient/discovery_cache"]
 
 install_requires = [
-    "httplib2>=0.15.0,<1dev",
+    "httplib2>=0.15.0,<1.dev0",
     # NOTE: Maintainers, please do not require google-auth>=2.x.x
     # Until this issue is closed
     # https://github.com/googleapis/google-cloud-python/issues/10566
-    "google-auth>=1.19.0,<3.0.0dev",
+    "google-auth>=1.19.0,<3.0.0.dev0",
     "google-auth-httplib2>=0.1.0",
     # NOTE: Maintainers, please do not require google-api-core>=2.x.x
     # Until this issue is closed
     # https://github.com/googleapis/google-cloud-python/issues/10566
-    "google-api-core >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
+    "google-api-core >= 1.31.5, <3.0.0.dev0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
     "uritemplate>=3.0.1,<5",
 ]

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -33,16 +33,16 @@\n packages = [\"apiclient\", \"googleapiclient\", \"googleapiclient/discovery_cache\"]\n \n install_requires = [\n-    \"httplib2>=0.15.0,<1dev\",\n+    \"httplib2>=0.15.0,<1.dev0\",\n     # NOTE: Maintainers, please do not require google-auth>=2.x.x\n     # Until this issue is closed\n     # https://github.com/googleapis/google-cloud-python/issues/10566\n-    \"google-auth>=1.19.0,<3.0.0dev\",\n+    \"google-auth>=1.19.0,<3.0.0.dev0\",\n     \"google-auth-httplib2>=0.1.0\",\n     # NOTE: Maintainers, please do not require google-api-core>=2.x.x\n     # Until this issue is closed\n     # https://github.com/googleapis/google-cloud-python/issues/10566\n-    \"google-api-core >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0\",\n+    \"google-api-core >= 1.31.5, <3.0.0.dev0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0\",\n     \"uritemplate>=3.0.1,<5\",\n ]\n", "issue": "`<1dev` is not a valid matcher for Python package versions in `setup.py`!\nOn the current master branch, you have this matcher for an `install_requires` package version in [setup.py](https://github.com/googleapis/google-api-python-client/blob/110667251e8b2c8852945bfe238f399742148cda/setup.py#L36):\r\n\r\n```python\r\ninstall_requires = [\r\n    \"httplib2>=0.15.0,<1dev\",\r\n```\r\n\r\nThe `<1dev` part is ~not~ a valid version specifier (edit: it is valid, just doesn't parse correctly with distlib) in the sense of [PEP 440](https://peps.python.org/pep-0440/) and causes problems with a number of packing tools, as seen here:\r\n\r\n```shell\r\n$ python -c 'from distlib.version import NormalizedMatcher; NormalizedMatcher(\"httplib2>=0.15.0,<1dev\")'\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py\", line 125, in __init__\r\n    vn, prefix = self.version_class(s), False\r\n  File \"/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py\", line 33, in __init__\r\n    self._parts = parts = self.parse(s)\r\n  File \"/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py\", line 267, in parse\r\n    result = _normalized_key(s)\r\n  File \"/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py\", line 188, in _pep_440_key\r\n    raise UnsupportedVersionError('Not a valid version: %s' % s)\r\ndistlib.version.UnsupportedVersionError: Not a valid version: 1dev\r\n```\r\n\r\nThis is just speculation, but it looks like it was either faultily auto-generated by some tool, is an incomplete copy & paste or you meant `<1.dev0`. However, development versions are not typically considered by tooling and it's considered bad practice to but an upper bound on python dependencies for no good reason. This should be corrected and ideally the artifact files of the effected versions fixed and re-uploaded on pypi.org.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n`<1dev` is not a valid matcher for Python package versions in `setup.py`!\nOn the current master branch, you have this matcher for an `install_requires` package version in [setup.py](https://github.com/googleapis/google-api-python-client/blob/110667251e8b2c8852945bfe238f399742148cda/setup.py#L36):\r\n\r\n```python\r\ninstall_requires = [\r\n    \"httplib2>=0.15.0,<1dev\",\r\n```\r\n\r\nThe `<1dev` part is ~not~ a valid version specifier (edit: it is valid, just doesn't parse correctly with distlib) in the sense of [PEP 440](https://peps.python.org/pep-0440/) and causes problems with a number of packing tools, as seen here:\r\n\r\n```shell\r\n$ python -c 'from distlib.version import NormalizedMatcher; NormalizedMatcher(\"httplib2>=0.15.0,<1dev\")'\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py\", line 125, in __init__\r\n    vn, prefix = self.version_class(s), False\r\n  File \"/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py\", line 33, in __init__\r\n    self._parts = parts = self.parse(s)\r\n  File \"/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py\", line 267, in parse\r\n    result = _normalized_key(s)\r\n  File \"/home/jan/.local/share/virtualenvs/master_clean-V3vlFZeD/lib/python3.7/site-packages/distlib/version.py\", line 188, in _pep_440_key\r\n    raise UnsupportedVersionError('Not a valid version: %s' % s)\r\ndistlib.version.UnsupportedVersionError: Not a valid version: 1dev\r\n```\r\n\r\nThis is just speculation, but it looks like it was either faultily auto-generated by some tool, is an incomplete copy & paste or you meant `<1.dev0`. However, development versions are not typically considered by tooling and it's considered bad practice to but an upper bound on python dependencies for no good reason. This should be corrected and ideally the artifact files of the effected versions fixed and re-uploaded on pypi.org.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n", "before_files": [{"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Setup script for Google API Python client.\n\nAlso installs included versions of third party libraries, if those libraries\nare not already installed.\n\"\"\"\nfrom __future__ import print_function\n\nimport sys\n\nif sys.version_info < (3, 7):\n    print(\"google-api-python-client requires python3 version >= 3.7.\", file=sys.stderr)\n    sys.exit(1)\n\nimport io\nimport os\n\nfrom setuptools import setup\n\npackages = [\"apiclient\", \"googleapiclient\", \"googleapiclient/discovery_cache\"]\n\ninstall_requires = [\n    \"httplib2>=0.15.0,<1dev\",\n    # NOTE: Maintainers, please do not require google-auth>=2.x.x\n    # Until this issue is closed\n    # https://github.com/googleapis/google-cloud-python/issues/10566\n    \"google-auth>=1.19.0,<3.0.0dev\",\n    \"google-auth-httplib2>=0.1.0\",\n    # NOTE: Maintainers, please do not require google-api-core>=2.x.x\n    # Until this issue is closed\n    # https://github.com/googleapis/google-cloud-python/issues/10566\n    \"google-api-core >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0\",\n    \"uritemplate>=3.0.1,<5\",\n]\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nreadme_filename = os.path.join(package_root, \"README.md\")\nwith io.open(readme_filename, encoding=\"utf-8\") as readme_file:\n    readme = readme_file.read()\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nversion = {}\nwith open(os.path.join(package_root, \"googleapiclient/version.py\")) as fp:\n    exec(fp.read(), version)\nversion = version[\"__version__\"]\n\nsetup(\n    name=\"google-api-python-client\",\n    version=version,\n    description=\"Google API Client Library for Python\",\n    long_description=readme,\n    long_description_content_type=\"text/markdown\",\n    author=\"Google LLC\",\n    author_email=\"googleapis-packages@google.com\",\n    url=\"https://github.com/googleapis/google-api-python-client/\",\n    install_requires=install_requires,\n    python_requires=\">=3.7\",\n    packages=packages,\n    package_data={\"googleapiclient\": [\"discovery_cache/documents/*.json\"]},\n    license=\"Apache 2.0\",\n    keywords=\"google api client\",\n    classifiers=[\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: OS Independent\",\n        \"Topic :: Internet :: WWW/HTTP\",\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Setup script for Google API Python client.\n\nAlso installs included versions of third party libraries, if those libraries\nare not already installed.\n\"\"\"\nfrom __future__ import print_function\n\nimport sys\n\nif sys.version_info < (3, 7):\n    print(\"google-api-python-client requires python3 version >= 3.7.\", file=sys.stderr)\n    sys.exit(1)\n\nimport io\nimport os\n\nfrom setuptools import setup\n\npackages = [\"apiclient\", \"googleapiclient\", \"googleapiclient/discovery_cache\"]\n\ninstall_requires = [\n    \"httplib2>=0.15.0,<1.dev0\",\n    # NOTE: Maintainers, please do not require google-auth>=2.x.x\n    # Until this issue is closed\n    # https://github.com/googleapis/google-cloud-python/issues/10566\n    \"google-auth>=1.19.0,<3.0.0.dev0\",\n    \"google-auth-httplib2>=0.1.0\",\n    # NOTE: Maintainers, please do not require google-api-core>=2.x.x\n    # Until this issue is closed\n    # https://github.com/googleapis/google-cloud-python/issues/10566\n    \"google-api-core >= 1.31.5, <3.0.0.dev0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0\",\n    \"uritemplate>=3.0.1,<5\",\n]\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nreadme_filename = os.path.join(package_root, \"README.md\")\nwith io.open(readme_filename, encoding=\"utf-8\") as readme_file:\n    readme = readme_file.read()\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nversion = {}\nwith open(os.path.join(package_root, \"googleapiclient/version.py\")) as fp:\n    exec(fp.read(), version)\nversion = version[\"__version__\"]\n\nsetup(\n    name=\"google-api-python-client\",\n    version=version,\n    description=\"Google API Client Library for Python\",\n    long_description=readme,\n    long_description_content_type=\"text/markdown\",\n    author=\"Google LLC\",\n    author_email=\"googleapis-packages@google.com\",\n    url=\"https://github.com/googleapis/google-api-python-client/\",\n    install_requires=install_requires,\n    python_requires=\">=3.7\",\n    packages=packages,\n    package_data={\"googleapiclient\": [\"discovery_cache/documents/*.json\"]},\n    license=\"Apache 2.0\",\n    keywords=\"google api client\",\n    classifiers=[\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: OS Independent\",\n        \"Topic :: Internet :: WWW/HTTP\",\n    ],\n)\n", "path": "setup.py"}]}