Skip to content

Commit

Permalink
Drop 3.7 support (#28)
Browse files Browse the repository at this point in the history
* drop 3.7 support

* update deps and tox

* update docs
  • Loading branch information
bagel897 authored Jan 10, 2024
1 parent ec036bb commit dafc81d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The goal of this project is to manage configuration for python tools, such as
rope and add support for a pyproject.toml configuration file.
[Documentation](https://pytoolconfig.readthedocs.io/en/latest/) This library
only supports python 3.7 to 3.11. 3.12 plus may work, but isn't tested.
only supports python 3.8 to 3.12. 3.13+ may work, but isn't tested.

## Development

Expand Down
19 changes: 7 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ name = "pytoolconfig"
dynamic = ["version"]
description = 'Python tool configuration'
license = { text = 'LGPL-3.0-or-later' }
dependencies = [
"tomli>=2.0.1; python_version < \"3.11\"",
"packaging>=22.0",
"typing-extensions>=4.4.0; python_version < \"3.8\"",
]
requires-python = '>=3.7'
dependencies = ["tomli>=2.0.1; python_version < \"3.11\"", "packaging>=22.0"]
requires-python = '>=3.8'
readme = "README.md"

[[project.authors]]
Expand Down Expand Up @@ -70,8 +66,8 @@ ignore = [
"SLF001",
"FA100",
]
# Always generate Python 3.7-compatible code.
target-version = "py37"
# Always generate Python 3.8-compatible code.
target-version = "py38"
force-exclude = true
[tool.ruff.per-file-ignores]
"tests/**" = ["D", "ANN201", "ANN001"]
Expand All @@ -83,20 +79,19 @@ extend-immutable-calls = ["pytoolconfig.field"]
[tool.tox]
legacy_tox_ini = '''
[tox]
envlist = py37,py38, py39, py310, py311, py312
min_version = 4.0
envlist = py38, py39, py310, py311, py312
isolated_build = True
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[testenv]
extras = doc, global
groups = dev
groups = dev, doc, global
commands = pytest
'''
[tool.pylint.format]
Expand Down
8 changes: 2 additions & 6 deletions src/pytoolconfig/documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from __future__ import annotations

import sys
from dataclasses import is_dataclass
from typing import TYPE_CHECKING, Any, Generator

Expand All @@ -15,18 +14,15 @@
from .pytoolconfig import PyToolConfig
from .types import ConfigField

from typing import get_origin

from sphinx.ext.autodoc import ClassDocumenter
from tabulate import tabulate

from .fields import _gather_config_fields
from .sources import Source
from .universal_config import UniversalConfig

if sys.version_info < (3, 8, 0):
from typing_extensions import get_origin
else:
from typing import get_origin


def _type_to_str(type_to_print: type[Any]) -> str | None:
if type_to_print is None:
Expand Down

0 comments on commit dafc81d

Please sign in to comment.