Skip to content

Commit

Permalink
Support Python 3.12 (#131)
Browse files Browse the repository at this point in the history
Closes #134
  • Loading branch information
AlexWaygood committed Oct 8, 2023
1 parent 6fc9335 commit f472720
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ env:
# see https://github.com/python/mypy/issues/13817
TERM: xterm-256color
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -48,7 +47,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false

steps:
Expand All @@ -59,29 +58,14 @@ jobs:
cache: "pip"
cache-dependency-path: "pyproject.toml"
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- run: pip install "wheel<1"
- run: pip install "coveralls>=3.3" -e .[pytest]
- run: pip install -e .[pytest]
- run: pip freeze --all
- name: Run tests under coverage
run: |
coverage run -m pytest --doctest-modules
coverage report --no-skip-covered
- name: Upload coverage to coveralls
if: github.repository == 'AlexWaygood/typeshed-stats'
env:
COVERALLS_FLAG_NAME: ${{ matrix.os }}-${{ matrix.python-version }}
run: coveralls --service=github

coveralls-finish:
name: Indicate completion to coveralls.io
needs: pytest-tests
if: github.repository == 'AlexWaygood/typeshed-stats'
runs-on: ubuntu-latest
container: python:3-slim
steps:
- run: |
pip install "coveralls>=3.3"
coveralls --service=github --finish
create-issue-on-failure:
name: Create an issue if daily test failed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<br>

[![website](https://img.shields.io/website?down_color=red&down_message=Offline&style=for-the-badge&up_color=green&up_message=Running&url=https%3A%2F%2Falexwaygood.github.io%2Ftypeshed-stats%2F)](https://alexwaygood.github.io/typeshed-stats/)[![build status](https://img.shields.io/github/actions/workflow/status/AlexWaygood/typeshed-stats/test.yml?branch=main&label=Tests&style=for-the-badge)](https://github.com/AlexWaygood/typeshed-stats/actions/workflows/test.yml)[![Coveralls](https://img.shields.io/coverallsCoverage/github/AlexWaygood/typeshed-stats?style=for-the-badge)](https://coveralls.io/github/AlexWaygood/typeshed-stats)
[![website](https://img.shields.io/website?down_color=red&down_message=Offline&style=for-the-badge&up_color=green&up_message=Running&url=https%3A%2F%2Falexwaygood.github.io%2Ftypeshed-stats%2F)](https://alexwaygood.github.io/typeshed-stats/)[![build status](https://img.shields.io/github/actions/workflow/status/AlexWaygood/typeshed-stats/test.yml?branch=main&label=Tests&style=for-the-badge)](https://github.com/AlexWaygood/typeshed-stats/actions/workflows/test.yml)
<br>
[![Checked with mypy](https://img.shields.io/badge/mypy-checked-blue?style=for-the-badge)](http://mypy-lang.org/)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://github.com/psf/black)[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=for-the-badge&labelColor=ef8336)](https://pycqa.github.io/isort/)[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge)](https://pre-commit.ci)
<br>
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development",
Expand All @@ -32,7 +33,8 @@ classifiers = [
dependencies = [
"attrs>=22.2.0",
"cattrs",
"aiohttp[speedups]",
"aiohttp[speedups]; python_version <'3.12'",
"aiohttp[speedups]>=3.9.0b0,<4; python_version >= '3.12'",
"packaging",
"pathspec>=0.10.3", # needs to be py.typed
"Jinja2>=3",
Expand Down Expand Up @@ -63,7 +65,7 @@ pytest = [
"typeshed-stats[rich]",
"beautifulsoup4>=4,<5",
"covdefaults==2.3.0",
"coverage==6.5.0",
"coverage==7.3.2",
"Markdown>=3,<4",
"pytest==7.4.2",
"pytest-antilru==1.1.1",
Expand Down

0 comments on commit f472720

Please sign in to comment.