parent
ac7402cbf6
commit
e9681a40dc
4
.github/workflows/diff_shades.yml
vendored
4
.github/workflows/diff_shades.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
|
||||
- name: Install diff-shades and support dependencies
|
||||
run: |
|
||||
python -m pip install click packaging urllib3
|
||||
python -m pip install 'click<8.1.0' packaging urllib3
|
||||
python -m pip install https://github.com/ichard26/diff-shades/archive/stable.zip
|
||||
|
||||
- name: Calculate run configuration & metadata
|
||||
@ -59,7 +59,7 @@ jobs:
|
||||
- name: Install diff-shades and support dependencies
|
||||
run: |
|
||||
python -m pip install https://github.com/ichard26/diff-shades/archive/stable.zip
|
||||
python -m pip install click packaging urllib3
|
||||
python -m pip install 'click<8.1.0' packaging urllib3
|
||||
python -m pip install -r .github/mypyc-requirements.txt
|
||||
# After checking out old revisions, this might not exist so we'll use a copy.
|
||||
cat scripts/diff_shades_gha_helper.py > helper.py
|
||||
|
@ -55,6 +55,7 @@
|
||||
|
||||
<!-- Changes to how Black is packaged, such as dependency requirements -->
|
||||
|
||||
- Fix Black to work with Click 8.1.0 (#2966)
|
||||
- On Python 3.11 and newer, use the standard library's `tomllib` instead of `tomli`
|
||||
(#2903)
|
||||
- `black-primer`, the deprecated internal devtool, has been removed and copied to a
|
||||
|
@ -1427,13 +1427,21 @@ def patch_click() -> None:
|
||||
file paths is minimal since it's Python source code. Moreover, this crash was
|
||||
spurious on Python 3.7 thanks to PEP 538 and PEP 540.
|
||||
"""
|
||||
modules: List[Any] = []
|
||||
try:
|
||||
from click import core
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
modules.append(core)
|
||||
try:
|
||||
from click import _unicodefun
|
||||
except ModuleNotFoundError:
|
||||
return
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
modules.append(_unicodefun)
|
||||
|
||||
for module in (core, _unicodefun):
|
||||
for module in modules:
|
||||
if hasattr(module, "_verify_python3_env"):
|
||||
module._verify_python3_env = lambda: None # type: ignore
|
||||
if hasattr(module, "_verify_python_env"):
|
||||
|
@ -1257,7 +1257,7 @@ def test_assert_equivalent_different_asts(self) -> None:
|
||||
def test_shhh_click(self) -> None:
|
||||
try:
|
||||
from click import _unicodefun
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
self.skipTest("Incompatible Click version")
|
||||
if not hasattr(_unicodefun, "_verify_python3_env"):
|
||||
self.skipTest("Incompatible Click version")
|
||||
|
Loading…
Reference in New Issue
Block a user