diff --git a/.github/mypyc-requirements.txt b/.github/mypyc-requirements.txt deleted file mode 100644 index 352d36c0070..00000000000 --- a/.github/mypyc-requirements.txt +++ /dev/null @@ -1,14 +0,0 @@ -mypy == 0.971 - -# A bunch of packages for type information -mypy-extensions >= 0.4.3 -tomli >= 0.10.2 -types-typed-ast >= 1.4.2 -types-dataclasses >= 0.1.3 -typing-extensions > 3.10.0.1 -click >= 8.0.0 -platformdirs >= 2.1.0 - -# And because build isolation is disabled, we'll need to pull this too -setuptools-scm[toml] >= 6.3.1 -wheel diff --git a/.github/workflows/diff_shades.yml b/.github/workflows/diff_shades.yml index fef9637c92f..a126756f102 100644 --- a/.github/workflows/diff_shades.yml +++ b/.github/workflows/diff_shades.yml @@ -3,10 +3,10 @@ name: diff-shades on: push: branches: [main] - paths: ["src/**", "setup.*", "pyproject.toml", ".github/workflows/*"] + paths: ["src/**", "pyproject.toml", ".github/workflows/*"] pull_request: - paths: ["src/**", "setup.*", "pyproject.toml", ".github/workflows/*"] + paths: ["src/**", "pyproject.toml", ".github/workflows/*"] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} @@ -41,6 +41,7 @@ jobs: needs: configure runs-on: ubuntu-latest env: + HATCH_BUILD_HOOKS_ENABLE: "1" # Clang is less picky with the C code it's given than gcc (and may # generate faster binaries too). CC: clang-12 @@ -64,7 +65,6 @@ jobs: 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 -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 git config user.name "diff-shades-gha" @@ -83,8 +83,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} run: > ${{ matrix.baseline-setup-cmd }} - && python setup.py --use-mypyc bdist_wheel - && python -m pip install dist/*.whl && rm build dist -r + && python -m pip install . - name: Analyze baseline revision if: steps.baseline-cache.outputs.cache-hit != 'true' @@ -97,8 +96,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} run: > ${{ matrix.target-setup-cmd }} - && python setup.py --use-mypyc bdist_wheel - && python -m pip install dist/*.whl + && python -m pip install . - name: Analyze target revision run: > diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index a2810e25f77..ebb8a9fda9e 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index ae26a814c9e..2c288284444 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -61,8 +61,6 @@ jobs: uses: pypa/cibuildwheel@v2.10.0 env: CIBW_ARCHS_MACOS: "${{ matrix.macos_arch }}" - # This isn't supported in pyproject.toml which makes sense (but is annoying). - CIBW_PROJECT_REQUIRES_PYTHON: ">=3.6.2" - name: Upload wheels as workflow artifacts uses: actions/upload-artifact@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7cc55d1bf76..372d1fd5d38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.7", "pypy-3.8"] + python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7", "pypy-3.8"] os: [ubuntu-latest, macOS-latest, windows-latest] steps: diff --git a/CHANGES.md b/CHANGES.md index 432618a2b31..6fb099040b3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,10 +6,16 @@ +- Runtime support for Python 3.6 has been removed. Formatting 3.6 code will still be + supported until further notice. + ### Stable style +- Fix a crash when `# fmt: on` is used on a different block level than `# fmt: off` + (#3281) + ### Preview style @@ -28,6 +34,8 @@ - Executables made with PyInstaller will no longer crash when formatting several files at once on macOS. Native x86-64 executables for macOS are available once again. (#3275) +- Hatchling is now used as the build backend. This will not have any effect for users + who install Black with its wheels from PyPI. (#3233) - Faster compiled wheels are now available for CPython 3.11 (#3276) ### Parser @@ -50,6 +58,9 @@ +- Update GitHub Action to support use of version specifiers (e.g. `<23`) for Black + version (#3265) + ### Documentation