Skip to content

Commit 5f617e3

Browse files
Merge pull request #49 from pytest-dev/rework-types
rework types, migrate parsing and add encoding
2 parents 6bc5528 + 180065c commit 5f617e3

14 files changed

Lines changed: 436 additions & 294 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ jobs:
2020
with:
2121
python-version: ${{ matrix.python }}
2222
- name: Install tox
23-
run: |
24-
python -m pip install --upgrade pip setuptools setuptools_scm
25-
pip install tox
26-
- name: Test
27-
run: |
28-
tox -e py
23+
run: python -m pip install --upgrade pip setuptools_scm hatch hatch-vcs
24+
- name: install package local
25+
run: pip install --no-build-isolation .
2926

3027
pre-commit:
3128
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build/
66
dist/
77
__pycache__
88
.tox/
9+
src/iniconfig/_version.py

.pre-commit-config.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.2.0
3+
rev: v3.3.1
44
hooks:
55
- id: pyupgrade
66
args: [--py37-plus]
7-
- repo: https://github.com/asottile/setup-cfg-fmt
8-
rev: v2.2.0
9-
hooks:
10-
- id: setup-cfg-fmt
11-
args: [--include-version-classifiers]
7+
- repo: https://github.com/tox-dev/pyproject-fmt
8+
rev: "0.4.1"
9+
hooks:
10+
- id: pyproject-fmt
11+
1212
- repo: https://github.com/psf/black
13-
rev: 22.10.0
13+
rev: 22.12.0
1414
hooks:
1515
- id: black
1616
language_version: python3
17+
- repo: https://github.com/pre-commit/mirrors-mypy
18+
rev: 'v0.991'
19+
hooks:
20+
- id: mypy
21+
args: []
22+
additional_dependencies:
23+
- "pytest==7.2.0"
24+
- "tomli"

CHANGELOG

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
Unreleased
2-
==========
1+
2.0.0
2+
======
33

4-
* add support for Python 3.6-3.10
5-
* drop support for Python 2.6-2.7, 3.3-3.5
4+
* add support for Python 3.7-3.11
5+
* drop support for Python 2.6-3.6
6+
* add encoding argument defaulting to utf-8
7+
* inline and clarify type annotations
8+
* move parsing code from inline to extra file
9+
* add typing overloads for helper methods
10+
11+
12+
.. note::
13+
14+
major release due to the major changes in python versions supported + changes in packaging
15+
16+
the api is expected to be compatible
617

718

819
1.1.1

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ include LICENSE
22
include example.ini
33
include tox.ini
44
include src/iniconfig/py.typed
5-
recursive-include src *.pyi

pyproject.toml

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,70 @@
11
[build-system]
2-
requires = ["setuptools>=41.2.0", "wheel", "setuptools_scm>3"]
2+
build-backend = "hatchling.build"
3+
requires = [
4+
"hatch-vcs",
5+
"hatchling",
6+
]
37

4-
build-backend = "setuptools.build_meta"
8+
[project]
9+
name = "iniconfig"
10+
description = "brain-dead simple config-ini parsing"
11+
readme = "README.rst"
12+
license = "MIT"
13+
authors = [
14+
{ name = "Ronny Pfannschmidt", email = "opensource@ronnypfannschmidt.de" },
15+
{ name = "Holger Krekel", email = "holger.krekel@gmail.com" },
16+
]
17+
requires-python = ">=3.7"
18+
dynamic = [
19+
"version",
20+
]
21+
classifiers = [
22+
"Development Status :: 4 - Beta",
23+
"Intended Audience :: Developers",
24+
"License :: OSI Approved :: MIT License",
25+
"Operating System :: MacOS :: MacOS X",
26+
"Operating System :: Microsoft :: Windows",
27+
"Operating System :: POSIX",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3 :: Only",
30+
"Programming Language :: Python :: 3.7",
31+
"Programming Language :: Python :: 3.8",
32+
"Programming Language :: Python :: 3.9",
33+
"Programming Language :: Python :: 3.10",
34+
"Programming Language :: Python :: 3.11",
35+
"Topic :: Software Development :: Libraries",
36+
"Topic :: Utilities",
37+
]
38+
[project.urls]
39+
Homepage = "https://github.com/pytest-dev/iniconfig"
540

6-
[tool.setuptools_scm]
41+
42+
[tool.hatch.version]
43+
source = "vcs"
44+
45+
[tool.hatch.build.hooks.vcs]
46+
version-file = "src/iniconfig/_version.py"
47+
48+
[tool.hatch.build.targets.sdist]
49+
include = [
50+
"/src",
51+
]
52+
53+
[tool.hatch.envs.test]
54+
dependencies = [
55+
"pytest"
56+
]
57+
[tool.hatch.envs.test.scripts]
58+
default = "pytest"
59+
60+
[[tool.hatch.envs.test.matrix]]
61+
python = ["3.7", "3.8", "3.9", "3.10", "3.11"]
62+
63+
[tool.setuptools_scm]
64+
65+
[tool.mypy]
66+
strict = true
67+
68+
69+
[tool.pytest.ini_options]
70+
testpaths = "testing"

setup.cfg

Lines changed: 0 additions & 34 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)