diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a4451cd..b6942e9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: deploy-${{ hashFiles('**/pyproject.toml') }} @@ -27,7 +27,7 @@ jobs: deploy- - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" @@ -50,7 +50,7 @@ jobs: - name: Publish package to PyPI if: github.event.action == 'published' - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.pypi_password }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 524973f..f491e17 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ name: build -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: build: @@ -10,23 +10,26 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - - name: Install tox - run: python -m pip install --upgrade pip setuptools_scm hatch hatch-vcs - - name: install package local - run: pip install --no-build-isolation . + allow-prereleases: true + - name: Install hatch + run: python -m pip install --upgrade pip hatch hatch-vcs + - name: Run tests + run: hatch run +py=${{ matrix.python }} test:default --color=yes pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - uses: pre-commit/action@v3.0.0 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09cb80b..20e04ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: rev: v3.3.1 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py38-plus] - repo: https://github.com/tox-dev/pyproject-fmt rev: "0.4.1" hooks: diff --git a/CHANGELOG b/CHANGELOG index 5b7570a..cc3a51a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,11 @@ -2.0.0 +2.1.0 +===== + +* fix artifact building - pin minimal version of hatch +* drop eol python 3.8 +* add python 3.12 and 3.13 + +2.0.0 ====== * add support for Python 3.7-3.11 diff --git a/LICENSE b/LICENSE index 31ecdfb..46f4b28 100644 --- a/LICENSE +++ b/LICENSE @@ -1,19 +1,21 @@ +The MIT License (MIT) - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. +Copyright (c) 2010 - 2023 Holger Krekel and others +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/pyproject.toml b/pyproject.toml index 6eee6ef..78dcdc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "hatchling.build" requires = [ "hatch-vcs", - "hatchling", + "hatchling>=1.26", ] [project] @@ -14,7 +14,7 @@ authors = [ { name = "Ronny Pfannschmidt", email = "opensource@ronnypfannschmidt.de" }, { name = "Holger Krekel", email = "holger.krekel@gmail.com" }, ] -requires-python = ">=3.7" +requires-python = ">=3.8" dynamic = [ "version", ] @@ -27,11 +27,12 @@ classifiers = [ "Operating System :: POSIX", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "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", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Software Development :: Libraries", "Topic :: Utilities", ] @@ -55,10 +56,10 @@ dependencies = [ "pytest" ] [tool.hatch.envs.test.scripts] -default = "pytest" +default = "pytest {args}" [[tool.hatch.envs.test.matrix]] -python = ["3.7", "3.8", "3.9", "3.10", "3.11"] +python = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] [tool.setuptools_scm] diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py index c18a8e4..3c40bc9 100644 --- a/src/iniconfig/__init__.py +++ b/src/iniconfig/__init__.py @@ -20,7 +20,7 @@ import os if TYPE_CHECKING: - from typing_extensions import Final + from typing import Final __all__ = ["IniConfig", "ParseError", "COMMENTCHARS", "iscommentline"] diff --git a/src/iniconfig/exceptions.py b/src/iniconfig/exceptions.py index bc898e6..8c4dc9a 100644 --- a/src/iniconfig/exceptions.py +++ b/src/iniconfig/exceptions.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: - from typing_extensions import Final + from typing import Final class ParseError(Exception):