Skip to content

Commit

Permalink
Add: Support for Python version 3.11.
Browse files Browse the repository at this point in the history
  • Loading branch information
hakancelikdev committed Nov 17, 2023
1 parent 6e3e9d3 commit 3832f95
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-alpine
FROM python:3.11-alpine

COPY . /app
WORKDIR /app
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 0 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 16 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand All @@ -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]
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_cases(path: Path, logger):
skip = re.search("# skip; condition: (?P<condition>.*), reason: (?P<reason>.*)", 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)

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

0 comments on commit 3832f95

Please sign in to comment.