Skip to content

Commit

Permalink
Add passing 3.11 CI by exempting blackd tests (psf#3234)
Browse files Browse the repository at this point in the history
- Had to exempt blackd tests for now due to aiohttp
  - Skip by using `sys.version_info` tuple
  - aiohttp does not compile in 3.11 yet - refer to psf#3230
- Add a deadsnakes ubuntu workflow to run 3.11-dev to ensure we don't regress
  - Have it also format ourselves

Test:
- `tox -e 311`

Co-authored-by: Cooper Ry Lees <me@wcooperlees.com>
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
  • Loading branch information
3 people authored and hugovk committed Sep 3, 2022
1 parent dbbc976 commit 8fa87bd
Show file tree
Hide file tree
Showing 5 changed files with 279 additions and 187 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/test-311.yml
@@ -0,0 +1,57 @@
name: Partially test 3.11 dev

on:
push:
paths-ignore:
- "docs/**"
- "*.md"

pull_request:
paths-ignore:
- "docs/**"
- "*.md"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
main:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11.0-rc - 3.11"]
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
- name: Run tests via tox
run: |
python -m tox -e 311
- name: Format ourselves
run: |
python -m pip install .
python -m black --check src/
2 changes: 2 additions & 0 deletions CHANGES.md
Expand Up @@ -69,6 +69,8 @@

<!-- Changes to how Black is packaged, such as dependency requirements -->

- Python 3.11 is now supported, except for `blackd` (#3234)

### Parser

<!-- Changes to the parser or to version autodetection -->
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -127,6 +127,7 @@ def find_python_files(base: Path) -> List[Path]:
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
Expand Down

0 comments on commit 8fa87bd

Please sign in to comment.