diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb073ff9..d0e3d251 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3.5.3 diff --git a/Dockerfile b/Dockerfile index 88336d7d..84752705 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-alpine +FROM python:3.11-alpine COPY . /app WORKDIR /app diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 66690e7f..99e7a59a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - YYYY-MM-DD +## [1.1.0] - 2023-11-17 + +### Added + +- Support for Python version 3.11. + ## [1.0.1] - 2023-11-17 ### Changed diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index e2294733..690078bf 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -35,13 +35,15 @@ $ git rebase upstream/main ## Testing -Firstly make sure you have py3.6, py3.7, py3.8, py3.9 and py3.10 python versions -installed on your system. +First, make sure you have at least one of the python versions py3.6, py3.7, py3.8, +py3.9, py3.10 and py3.11. If not all versions are available, after opening PR, github +action will run the tests for each version, so you can be sure that you wrote the +correct code. You can skip the tox step below. After typing your codes, you should run the tests by typing the following command. ```shell -$ python3.10 -m pip install tox +$ python3.11 -m pip install tox $ tox ``` diff --git a/mkdocs.yml b/mkdocs.yml index ca5cae43..93fc24f0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -75,8 +75,6 @@ extra: searching for. With your consent, you're helping us to make our documentation better. social: - - icon: fontawesome/brands/discord - link: https://discord.com/invite/6z8YXy4 - icon: fontawesome/brands/twitter link: https://twitter.com/hakancelikdev - icon: fontawesome/brands/linkedin diff --git a/setup.cfg b/setup.cfg index 3114d139..47e9711b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,6 +23,7 @@ classifiers = 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 Environment :: Console Topic :: Software Development :: Libraries :: Python Modules @@ -32,7 +33,7 @@ project_urls = Changelog = https://unimport.hakancelik.dev/1.0.1/CHANGELOG/ [options] -python_requires = >=3.6 +python_requires = >=3.6, <3.12 include_package_data = true zip_safe = true packages = @@ -42,12 +43,16 @@ packages = package_dir = =src install_requires = - libcst>=0.3.7, <1; python_version >= '3.9' - libcst>=0.3.0, <1; python_version <= '3.8' + libcst>=0.4.10, <=1.1.0; python_version >= '3.11' + libcst>=0.3.7, <=1.1.0; python_version == '3.10' + libcst>=0.3.7, <=1.1.0; python_version == '3.9' + libcst>=0.3.0, <=1.1.0; python_version == '3.8' + libcst>=0.3.0, <=1.0.1; python_version == '3.7' + libcst>=0.3.0, <=0.4.1; python_version == '3.6' pathspec>=0.10.1, <1; python_version >= '3.7' - pathspec>=0.5.0, <0.10.0; python_version == '3.6' + pathspec>=0.5.0, <=0.9.0; python_version == '3.6' toml>=0.9.0, <1 - dataclasses>=0.5, <1; python_version < '3.7' + dataclasses>=0.5, <1; python_version == '3.6' typing-extensions>=3.7.4, <4; python_version < '3.8' [options.entry_points] @@ -56,15 +61,15 @@ console_scripts = [options.extras_require] docs = - mkdocs==1.4.3 - mkdocs-material==9.1.18 + mkdocs==1.5.3 + mkdocs-material==9.4.9 mkdocs-markdownextradata-plugin==0.2.5 - mkdocs-minify-plugin==0.6.4 - mkdocs-git-revision-date-localized-plugin==1.2.0 - mike==1.1.2 + mkdocs-minify-plugin==0.7.1 + mkdocs-git-revision-date-localized-plugin==1.2.1 + mike==2.0.0 test = pytest==6.2.4; python_version == '3.6' - pytest==7.4.0; python_version != '3.6' + pytest==7.4.3; python_version != '3.6' pytest-cov==4.0.0; python_version == '3.6' pytest-cov==4.1.0; python_version != '3.6' semantic-version==2.10.0 diff --git a/tests/cases/test_cases.py b/tests/cases/test_cases.py index 8bb9019f..faa705d4 100644 --- a/tests/cases/test_cases.py +++ b/tests/cases/test_cases.py @@ -34,7 +34,7 @@ def test_cases(path: Path, logger): skip = re.search("# skip; condition: (?P.*), reason: (?P.*)", source, re.IGNORECASE) if skip: condition = skip.group("condition") - if condition in ["not PY38_PLUS"] and eval(condition): + if condition in ("not PY38_PLUS",) and eval(condition): reason = skip.group("reason") pytest.skip(reason, allow_module_level=True) diff --git a/tox.ini b/tox.ini index a5410bcf..5570ddd9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = 3.6, 3.7, 3.8, 3.9, 3.10, pre-commit +envlist = 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, pre-commit isolated_build = true [testenv]