Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.11 and drop EOL 3.6 #46

Merged
merged 7 commits into from Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Expand Up @@ -14,22 +14,22 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow

- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: deploy-${{ hashFiles('**/setup.py') }}
restore-keys: |
deploy-

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"

- name: Install dependencies
run: |
Expand Down
25 changes: 7 additions & 18 deletions .github/workflows/main.yml
Expand Up @@ -10,24 +10,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest]
include:
- python: "3.6"
tox_env: "py36"
- python: "3.7"
tox_env: "py37"
- python: "3.8"
tox_env: "py38"
- python: "3.9"
tox_env: "py39"
- python: "3.10"
tox_env: "py310"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install tox
Expand All @@ -36,11 +25,11 @@ jobs:
pip install tox
- name: Test
run: |
tox -e ${{ matrix.tox_env }}
tox -e py

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
@@ -1,15 +1,16 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
rev: v3.2.0
hooks:
- id: pyupgrade
args: [--py36-plus]
args: [--py37-plus]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.19.0
rev: v2.2.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers]
- repo: https://github.com/psf/black
rev: 21.10b0
rev: 22.10.0
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
language_version: python3
4 changes: 2 additions & 2 deletions setup.cfg
Expand Up @@ -18,17 +18,17 @@ classifiers =
Operating System :: POSIX
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Software Development :: Libraries
Topic :: Utilities

[options]
packages = iniconfig
python_requires = >=3.6
python_requires = >=3.7
include_package_data = True
package_dir = =src
zip_safe = False
9 changes: 4 additions & 5 deletions testing/test_iniconfig.py
@@ -1,4 +1,3 @@
import py
import pytest
from iniconfig import IniConfig, ParseError, __all__ as ALL
from iniconfig import iscommentline
Expand All @@ -17,7 +16,7 @@
[(0, None, "names", "Alice\nBob")],
),
"value with aligned continuation": (
"names = Alice\n" " Bob",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was originally intentionally multiline, it's something for a follow-up

"names = Alice\n Bob",
[(0, None, "names", "Alice\nBob")],
),
"blank line": (
Expand Down Expand Up @@ -63,7 +62,7 @@ def parse(input):


def parse_a_error(input):
return py.test.raises(ParseError, parse, input)
return pytest.raises(ParseError, parse, input)


def test_tokenize(input, expected):
Expand Down Expand Up @@ -98,7 +97,7 @@ def test_section_cant_be_empty():
assert excinfo.value.lineno == 0


@py.test.mark.parametrize(
@pytest.mark.parametrize(
"line",
[
"!!",
Expand Down Expand Up @@ -142,7 +141,7 @@ def test_iniconfig_duplicate_key_fails():
def test_iniconfig_lineof():
config = IniConfig(
"x.ini",
data=("[section]\n" "value = 1\n" "[section2]\n" "# comment\n" "value =2"),
data=("[section]\nvalue = 1\n[section2]\n# comment\nvalue =2"),
)

assert config.lineof("missing") is None
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist=py{36,37,38,39,310}
envlist=py{37,38,39,310,311}
isolated_build=True

[testenv]
Expand Down