Skip to content

Commit

Permalink
Add support for Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
seddonym committed Dec 2, 2022
1 parent b990352 commit 7cc9346
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 61 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
tests:
name: tox on ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade coverage[toml] tox tox-gh-actions
- name: Run tox targets for ${{ matrix.python-version }}
run: python -m tox
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ pip-wheel-metadata
# vscode
.vscode/
.history/

*/pyvenv.cfg
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

latest
------

* Officially support Python 3.11.

1.4.0 (2022-10-04)
------------------

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ For merging, you should:
3. Add a note to ``CHANGELOG.rst`` about the changes.
4. Add yourself to ``AUTHORS.rst``.

.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will
`run the tests <https://app.travis-ci.com/github/seddonym/import-linter/pull_requests>`_ for each change you add in the pull request.
.. [1] If you don't have all the necessary python versions available locally you can rely on Github Actions - it will
run the tests for each change you add in the pull request.
It will be slower though ...
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Import Linter
:alt: Python versions
:target: https://pypi.org/project/import-linter/

.. image:: https://api.travis-ci.com/seddonym/import-linter.svg?branch=master
:target: https://app.travis-ci.com/github/seddonym/import-linter

.. image:: https://github.com/seddonym/import-linter/workflows/CI/badge.svg?branch=master
:target: https://github.com/seddonym/import-linter/actions?workflow=CI
:alt: CI Status

Import Linter allows you to define and enforce rules for the imports within and between Python packages.

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def read(*names, **kwargs):
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Utilities",
],
Expand Down
6 changes: 3 additions & 3 deletions tests/adapters/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
class FakeFileSystem(ports.FileSystem):
def __init__(
self,
contents: str = None,
content_map: Dict[str, str] = None,
working_directory: str = None,
contents: Optional[str] = None,
content_map: Optional[Dict[str, str]] = None,
working_directory: Optional[str] = None,
) -> None:
"""
Files can be declared as existing in the file system in two different ways, either
Expand Down
16 changes: 12 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ envlist =
clean,
check,
docs,
{py37,py38,py39,py310}-{notoml,toml},
{py37,py38,py39,py310,py311}-{notoml,toml},
report

[testenv]
Expand All @@ -12,6 +12,7 @@ basepython =
py38: {env:TOXPYTHON:python3.8}
py39: {env:TOXPYTHON:python3.9}
py310: {env:TOXPYTHON:python3.10}
py311: {env:TOXPYTHON:python3.11}
{clean,check,docs,report}: {env:TOXPYTHON:python3}
setenv =
PYTHONPATH={toxinidir}/tests
Expand All @@ -21,13 +22,12 @@ passenv =
usedevelop = false
deps =
pytest~=7.0.1
pytest-travis-fold~=1.3.0
pytest-cov~=3.0.0
PyYAML~=6.0
commands =
{posargs:pytest -m "not toml_installed" --cov --cov-report=term-missing -vv tests}

[testenv:{py37,py38,py39,py310}-toml]
[testenv:{py37,py38,py39,py310,py311}-toml]
deps =
{[testenv]deps}
toml~=0.10.2
Expand All @@ -37,7 +37,7 @@ commands =

[testenv:check]
deps =
{[testenv:py310-toml]deps}
{[testenv:py311-toml]deps}
black~=22.3.0
flake8~=4.0.1
mypy~=0.730
Expand Down Expand Up @@ -67,3 +67,11 @@ commands =
commands = coverage erase
skip_install = true
deps = coverage

[gh-actions]
python =
3.7: py37, report
3.8: py38, report
3.9: py39, report
3.10: py310, report
3.11: py311, report, check, docs

0 comments on commit 7cc9346

Please sign in to comment.