File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 24
24
25
25
- name : Install diff-shades and support dependencies
26
26
run : |
27
- python -m pip install click packaging urllib3
27
+ python -m pip install ' click<8.1.0' packaging urllib3
28
28
python -m pip install https://github.com/ichard26/diff-shades/archive/stable.zip
29
29
30
30
- name : Calculate run configuration & metadata
59
59
- name : Install diff-shades and support dependencies
60
60
run : |
61
61
python -m pip install https://github.com/ichard26/diff-shades/archive/stable.zip
62
- python -m pip install click packaging urllib3
62
+ python -m pip install ' click<8.1.0' packaging urllib3
63
63
python -m pip install -r .github/mypyc-requirements.txt
64
64
# After checking out old revisions, this might not exist so we'll use a copy.
65
65
cat scripts/diff_shades_gha_helper.py > helper.py
Original file line number Diff line number Diff line change 55
55
56
56
<!-- Changes to how Black is packaged, such as dependency requirements -->
57
57
58
+ - Fix Black to work with Click 8.1.0 (#2966 )
58
59
- On Python 3.11 and newer, use the standard library's ` tomllib ` instead of ` tomli `
59
60
(#2903 )
60
61
- ` black-primer ` , the deprecated internal devtool, has been removed and copied to a
Original file line number Diff line number Diff line change @@ -1427,13 +1427,21 @@ def patch_click() -> None:
1427
1427
file paths is minimal since it's Python source code. Moreover, this crash was
1428
1428
spurious on Python 3.7 thanks to PEP 538 and PEP 540.
1429
1429
"""
1430
+ modules : List [Any ] = []
1430
1431
try :
1431
1432
from click import core
1433
+ except ImportError :
1434
+ pass
1435
+ else :
1436
+ modules .append (core )
1437
+ try :
1432
1438
from click import _unicodefun
1433
- except ModuleNotFoundError :
1434
- return
1439
+ except ImportError :
1440
+ pass
1441
+ else :
1442
+ modules .append (_unicodefun )
1435
1443
1436
- for module in ( core , _unicodefun ) :
1444
+ for module in modules :
1437
1445
if hasattr (module , "_verify_python3_env" ):
1438
1446
module ._verify_python3_env = lambda : None # type: ignore
1439
1447
if hasattr (module , "_verify_python_env" ):
Original file line number Diff line number Diff line change @@ -1257,7 +1257,7 @@ def test_assert_equivalent_different_asts(self) -> None:
1257
1257
def test_shhh_click (self ) -> None :
1258
1258
try :
1259
1259
from click import _unicodefun
1260
- except ModuleNotFoundError :
1260
+ except ImportError :
1261
1261
self .skipTest ("Incompatible Click version" )
1262
1262
if not hasattr (_unicodefun , "_verify_python3_env" ):
1263
1263
self .skipTest ("Incompatible Click version" )
You can’t perform that action at this time.
0 commit comments