File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525 - name : Install diff-shades and support dependencies
2626 run : |
27- python -m pip install click packaging urllib3
27+ python -m pip install ' click<8.1.0' packaging urllib3
2828 python -m pip install https://github.com/ichard26/diff-shades/archive/stable.zip
2929
3030 - name : Calculate run configuration & metadata
5959 - name : Install diff-shades and support dependencies
6060 run : |
6161 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
6363 python -m pip install -r .github/mypyc-requirements.txt
6464 # After checking out old revisions, this might not exist so we'll use a copy.
6565 cat scripts/diff_shades_gha_helper.py > helper.py
Original file line number Diff line number Diff line change 5555
5656<!-- Changes to how Black is packaged, such as dependency requirements -->
5757
58+ - Fix Black to work with Click 8.1.0 (#2966 )
5859- On Python 3.11 and newer, use the standard library's ` tomllib ` instead of ` tomli `
5960 (#2903 )
6061- ` 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:
14271427 file paths is minimal since it's Python source code. Moreover, this crash was
14281428 spurious on Python 3.7 thanks to PEP 538 and PEP 540.
14291429 """
1430+ modules : List [Any ] = []
14301431 try :
14311432 from click import core
1433+ except ImportError :
1434+ pass
1435+ else :
1436+ modules .append (core )
1437+ try :
14321438 from click import _unicodefun
1433- except ModuleNotFoundError :
1434- return
1439+ except ImportError :
1440+ pass
1441+ else :
1442+ modules .append (_unicodefun )
14351443
1436- for module in ( core , _unicodefun ) :
1444+ for module in modules :
14371445 if hasattr (module , "_verify_python3_env" ):
14381446 module ._verify_python3_env = lambda : None # type: ignore
14391447 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:
12571257 def test_shhh_click (self ) -> None :
12581258 try :
12591259 from click import _unicodefun
1260- except ModuleNotFoundError :
1260+ except ImportError :
12611261 self .skipTest ("Incompatible Click version" )
12621262 if not hasattr (_unicodefun , "_verify_python3_env" ):
12631263 self .skipTest ("Incompatible Click version" )
You can’t perform that action at this time.
0 commit comments