We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
htcondor extra not installable with Toil > 5.5
This came up here: https://github.com/ComparativeGenomicsToolkit/cactus/issues/903

example
```
pip install -U toil[htcondor]
toil --version
cwltool is not installed.
5.5.0
```
trying to force a more recent version
```
pip install toil[htcondor]==5.8.0
Collecting toil[htcondor]==5.8.0
  Using cached toil-5.8.0-py3-none-any.whl (679 kB)
Requirement already satisfied: python-dateutil in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (2.8.2)
Requirement already satisfied: dill<0.4,>=0.3.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (0.3.6)
Requirement already satisfied: requests<3,>=2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (2.28.2)
Requirement already satisfied: enlighten<2,>=1.5.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (1.11.1)
Collecting PyPubSub<5,>=4.0.3
  Using cached Pypubsub-4.0.3-py3-none-any.whl (61 kB)
Collecting py-tes<1,>=0.4.2
  Using cached py_tes-0.4.2-py3-none-any.whl
Requirement already satisfied: psutil<6,>=3.0.1 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (5.9.4)
Requirement already satisfied: docker<6,>=3.7.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (4.3.1)
Requirement already satisfied: pytz>=2012 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (2022.7.1)
Collecting typing-extensions
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Requirement already satisfied: addict<2.5,>=2.2.1 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (2.2.1)
ERROR: Ignored the following versions that require a different python version: 3.4.2 Requires-Python ==2.7.*
ERROR: Could not find a version that satisfies the requirement htcondor<9,>=8.6.0; sys_platform != "darwin" and extra == "htcondor" (from toil[htcondor]) (from versions: 9.4.0, 9.5.0, 9.7.0, 9.8.0, 9.8.1, 9.9.0, 9.10.0.post1, 9.11.0, 9.11.1, 9.12.0, 10.0.0, 10.0.1, 10.0.1.post1, 10.1.0, 10.1.1, 10.2.0, 10.2.0.post1)
ERROR: No matching distribution found for htcondor<9,>=8.6.0; sys_platform != "darwin" and extra == "htcondor"
```

```
pip install toil[htcondor]==5.6.0
Collecting toil[htcondor]==5.6.0
  Using cached toil-5.6.0-py3-none-any.whl (592 kB)
Collecting py-tes<1,>=0.4.2
  Using cached py_tes-0.4.2-py3-none-any.whl
Requirement already satisfied: addict<2.5,>=2.2.1 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (2.2.1)
Requirement already satisfied: python-dateutil in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (2.8.2)
Requirement already satisfied: requests<3,>=2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (2.28.2)
Requirement already satisfied: psutil<6,>=3.0.1 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (5.9.4)
Requirement already satisfied: dill<0.4,>=0.3.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (0.3.6)
Requirement already satisfied: enlighten<2,>=1.5.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (1.11.1)
Requirement already satisfied: docker<6,>=3.7.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (4.3.1)
Requirement already satisfied: pytz>=2012 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (2022.7.1)
ERROR: Could not find a version that satisfies the requirement htcondor<9,>=8.6.0; sys_platform != "darwin" and extra == "htcondor" (from toil[htcondor]) (from versions: 9.4.0, 9.5.0, 9.7.0, 9.8.0, 9.8.1, 9.9.0, 9.10.0.post1, 9.11.0, 9.11.1, 9.12.0, 10.0.0, 10.0.1, 10.0.1.post1, 10.1.0, 10.1.1, 10.2.0, 10.2.0.post1)
ERROR: No matching distribution found for htcondor<9,>=8.6.0; sys_platform != "darwin" and extra == "htcondor"
```

┆Issue is synchronized with this [Jira Story](https://ucsc-cgl.atlassian.net/browse/TOIL-1261)
┆Issue Number: TOIL-1261


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/toil/cwl/__init__.py`
Content:
```
1 # Copyright (C) 2015-2021 Regents of the University of California
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 import logging
15 from functools import lru_cache
16 
17 from pkg_resources import DistributionNotFound, get_distribution
18 
19 from toil.version import cwltool_version
20 
21 logger = logging.getLogger(__name__)
22 
23 
24 @lru_cache(maxsize=None)
25 def check_cwltool_version() -> None:
26     """
27     Check if the installed cwltool version matches Toil's expected version. A
28     warning is printed if the versions differ.
29     """
30     try:
31         installed_version = get_distribution("cwltool").version
32 
33         if installed_version != cwltool_version:
34             logger.warning(
35                 f"You are using cwltool version {installed_version}, which might not be compatible with "
36                 f"version {cwltool_version} used by Toil. You should consider running 'pip install cwltool=="
37                 f"{cwltool_version}' to match Toil's cwltool version."
38             )
39     except DistributionNotFound:
40         logger.debug("cwltool is not installed.")
41 
42 
43 check_cwltool_version()
44
```
--- 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/src/toil/cwl/__init__.py b/src/toil/cwl/__init__.py
--- a/src/toil/cwl/__init__.py
+++ b/src/toil/cwl/__init__.py
@@ -15,6 +15,14 @@
 from functools import lru_cache
 
 from pkg_resources import DistributionNotFound, get_distribution
+try:
+    # Setuptools 66+ will raise this if any package on the system has a version that isn't PEP440.
+    # See https://github.com/pypa/setuptools/issues/3772
+    from setuptools.extern.packaging.version import InvalidVersion # type: ignore
+except ImportError:
+    # It's not clear that this exception is really part fo the public API, so fake it.
+    class InvalidVersion(Exception): # type: ignore
+        pass
 
 from toil.version import cwltool_version
 
@@ -38,6 +46,9 @@
             )
     except DistributionNotFound:
         logger.debug("cwltool is not installed.")
+    except InvalidVersion as e:
+        logger.warning(f"Could not determine the installed version of cwltool because a package "
+                       f"with an unacceptable version is installed: {e}")
 
 
 check_cwltool_version()

{"golden_diff": "diff --git a/src/toil/cwl/__init__.py b/src/toil/cwl/__init__.py\n--- a/src/toil/cwl/__init__.py\n+++ b/src/toil/cwl/__init__.py\n@@ -15,6 +15,14 @@\n from functools import lru_cache\n \n from pkg_resources import DistributionNotFound, get_distribution\n+try:\n+    # Setuptools 66+ will raise this if any package on the system has a version that isn't PEP440.\n+    # See https://github.com/pypa/setuptools/issues/3772\n+    from setuptools.extern.packaging.version import InvalidVersion # type: ignore\n+except ImportError:\n+    # It's not clear that this exception is really part fo the public API, so fake it.\n+    class InvalidVersion(Exception): # type: ignore\n+        pass\n \n from toil.version import cwltool_version\n \n@@ -38,6 +46,9 @@\n             )\n     except DistributionNotFound:\n         logger.debug(\"cwltool is not installed.\")\n+    except InvalidVersion as e:\n+        logger.warning(f\"Could not determine the installed version of cwltool because a package \"\n+                       f\"with an unacceptable version is installed: {e}\")\n \n \n check_cwltool_version()\n", "issue": "htcondor extra not installable with Toil > 5.5\nThis came up here: https://github.com/ComparativeGenomicsToolkit/cactus/issues/903\n\nexample\n```\npip install -U toil[htcondor]\ntoil --version\ncwltool is not installed.\n5.5.0\n```\ntrying to force a more recent version\n```\npip install toil[htcondor]==5.8.0\nCollecting toil[htcondor]==5.8.0\n  Using cached toil-5.8.0-py3-none-any.whl (679 kB)\nRequirement already satisfied: python-dateutil in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (2.8.2)\nRequirement already satisfied: dill<0.4,>=0.3.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (0.3.6)\nRequirement already satisfied: requests<3,>=2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (2.28.2)\nRequirement already satisfied: enlighten<2,>=1.5.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (1.11.1)\nCollecting PyPubSub<5,>=4.0.3\n  Using cached Pypubsub-4.0.3-py3-none-any.whl (61 kB)\nCollecting py-tes<1,>=0.4.2\n  Using cached py_tes-0.4.2-py3-none-any.whl\nRequirement already satisfied: psutil<6,>=3.0.1 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (5.9.4)\nRequirement already satisfied: docker<6,>=3.7.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (4.3.1)\nRequirement already satisfied: pytz>=2012 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (2022.7.1)\nCollecting typing-extensions\n  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)\nRequirement already satisfied: addict<2.5,>=2.2.1 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.8.0) (2.2.1)\nERROR: Ignored the following versions that require a different python version: 3.4.2 Requires-Python ==2.7.*\nERROR: Could not find a version that satisfies the requirement htcondor<9,>=8.6.0; sys_platform != \"darwin\" and extra == \"htcondor\" (from toil[htcondor]) (from versions: 9.4.0, 9.5.0, 9.7.0, 9.8.0, 9.8.1, 9.9.0, 9.10.0.post1, 9.11.0, 9.11.1, 9.12.0, 10.0.0, 10.0.1, 10.0.1.post1, 10.1.0, 10.1.1, 10.2.0, 10.2.0.post1)\nERROR: No matching distribution found for htcondor<9,>=8.6.0; sys_platform != \"darwin\" and extra == \"htcondor\"\n```\n\n```\npip install toil[htcondor]==5.6.0\nCollecting toil[htcondor]==5.6.0\n  Using cached toil-5.6.0-py3-none-any.whl (592 kB)\nCollecting py-tes<1,>=0.4.2\n  Using cached py_tes-0.4.2-py3-none-any.whl\nRequirement already satisfied: addict<2.5,>=2.2.1 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (2.2.1)\nRequirement already satisfied: python-dateutil in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (2.8.2)\nRequirement already satisfied: requests<3,>=2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (2.28.2)\nRequirement already satisfied: psutil<6,>=3.0.1 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (5.9.4)\nRequirement already satisfied: dill<0.4,>=0.3.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (0.3.6)\nRequirement already satisfied: enlighten<2,>=1.5.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (1.11.1)\nRequirement already satisfied: docker<6,>=3.7.2 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (4.3.1)\nRequirement already satisfied: pytz>=2012 in ./test-venv/lib/python3.10/site-packages (from toil[htcondor]==5.6.0) (2022.7.1)\nERROR: Could not find a version that satisfies the requirement htcondor<9,>=8.6.0; sys_platform != \"darwin\" and extra == \"htcondor\" (from toil[htcondor]) (from versions: 9.4.0, 9.5.0, 9.7.0, 9.8.0, 9.8.1, 9.9.0, 9.10.0.post1, 9.11.0, 9.11.1, 9.12.0, 10.0.0, 10.0.1, 10.0.1.post1, 10.1.0, 10.1.1, 10.2.0, 10.2.0.post1)\nERROR: No matching distribution found for htcondor<9,>=8.6.0; sys_platform != \"darwin\" and extra == \"htcondor\"\n```\n\n\u2506Issue is synchronized with this [Jira Story](https://ucsc-cgl.atlassian.net/browse/TOIL-1261)\n\u2506Issue Number: TOIL-1261\n\n", "before_files": [{"content": "# Copyright (C) 2015-2021 Regents of the University of California\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.\nimport logging\nfrom functools import lru_cache\n\nfrom pkg_resources import DistributionNotFound, get_distribution\n\nfrom toil.version import cwltool_version\n\nlogger = logging.getLogger(__name__)\n\n\n@lru_cache(maxsize=None)\ndef check_cwltool_version() -> None:\n    \"\"\"\n    Check if the installed cwltool version matches Toil's expected version. A\n    warning is printed if the versions differ.\n    \"\"\"\n    try:\n        installed_version = get_distribution(\"cwltool\").version\n\n        if installed_version != cwltool_version:\n            logger.warning(\n                f\"You are using cwltool version {installed_version}, which might not be compatible with \"\n                f\"version {cwltool_version} used by Toil. You should consider running 'pip install cwltool==\"\n                f\"{cwltool_version}' to match Toil's cwltool version.\"\n            )\n    except DistributionNotFound:\n        logger.debug(\"cwltool is not installed.\")\n\n\ncheck_cwltool_version()\n", "path": "src/toil/cwl/__init__.py"}], "after_files": [{"content": "# Copyright (C) 2015-2021 Regents of the University of California\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.\nimport logging\nfrom functools import lru_cache\n\nfrom pkg_resources import DistributionNotFound, get_distribution\ntry:\n    # Setuptools 66+ will raise this if any package on the system has a version that isn't PEP440.\n    # See https://github.com/pypa/setuptools/issues/3772\n    from setuptools.extern.packaging.version import InvalidVersion # type: ignore\nexcept ImportError:\n    # It's not clear that this exception is really part fo the public API, so fake it.\n    class InvalidVersion(Exception): # type: ignore\n        pass\n\nfrom toil.version import cwltool_version\n\nlogger = logging.getLogger(__name__)\n\n\n@lru_cache(maxsize=None)\ndef check_cwltool_version() -> None:\n    \"\"\"\n    Check if the installed cwltool version matches Toil's expected version. A\n    warning is printed if the versions differ.\n    \"\"\"\n    try:\n        installed_version = get_distribution(\"cwltool\").version\n\n        if installed_version != cwltool_version:\n            logger.warning(\n                f\"You are using cwltool version {installed_version}, which might not be compatible with \"\n                f\"version {cwltool_version} used by Toil. You should consider running 'pip install cwltool==\"\n                f\"{cwltool_version}' to match Toil's cwltool version.\"\n            )\n    except DistributionNotFound:\n        logger.debug(\"cwltool is not installed.\")\n    except InvalidVersion as e:\n        logger.warning(f\"Could not determine the installed version of cwltool because a package \"\n                       f\"with an unacceptable version is installed: {e}\")\n\n\ncheck_cwltool_version()\n", "path": "src/toil/cwl/__init__.py"}]}