drop end of life python versions
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parent f14b750 · Browse files · 17 files·+27 added−24 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
17 files+27 added−24 removed
- tests:+2 added−2 removed
- other:+25 added−22 removed
Provenance
- Commit
ba770cb- Tree
40497be- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
f14b750
17 files changed+27 added−24 removed
modified:.github/workflows/tests.yaml+1 added-3 removed
17 unmodified lines18192021222324222324252622 unmodified lines17 unmodified lines - {name: Windows, python: '3.12', os: windows-latest} - {name: Mac, python: '3.12', os: macos-latest} - {python: '3.11'} - {python: '3.10'} - {python: '3.9'} - {python: '3.8'} - {name: PyPy, python: 'pypy-3.10', tox: pypy310} - {name: PyPy, python: 'pypy-3.11', tox: pypy311} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with:22 unmodified linesmodified:examples/aliases/pyproject.toml+1 added-1 removed
12345567899 unmodified lines[project]name = "click-example-aliases"version = "1.0.0"description = "Click aliases example"requires-python = ">=3.8"requires-python = ">=3.10"dependencies = [ "click>=8.1",]
9 unmodified linesmodified:examples/colors/pyproject.toml+1 added-1 removed
12345567899 unmodified lines[project]name = "click-example-colors"version = "1.0.0"description = "Click colors example"requires-python = ">=3.8"requires-python = ">=3.10"dependencies = [ "click>=8.1",]
9 unmodified linesmodified:examples/completion/pyproject.toml+1 added-1 removed
12345567899 unmodified lines[project]name = "click-example-completion"version = "1.0.0"description = "Click completion example"requires-python = ">=3.8"requires-python = ">=3.10"dependencies = [ "click>=8.1",]
9 unmodified linesmodified:examples/complex/pyproject.toml+1 added-1 removed
12345567899 unmodified lines[project]name = "click-example-complex"version = "1.0.0"description = "Click complex example"requires-python = ">=3.8"requires-python = ">=3.10"dependencies = [ "click>=8.1",]
9 unmodified linesmodified:examples/imagepipe/pyproject.toml+1 added-1 removed
123455678910 unmodified lines[project]name = "click-example-imagepipe"version = "1.0.0"description = "Click imagepipe example"requires-python = ">=3.8"requires-python = ">=3.10"dependencies = [ "click>=8.1", "pillow",]10 unmodified linesmodified:examples/inout/pyproject.toml+1 added-1 removed
12345567899 unmodified lines[project]name = "click-example-inout"version = "1.0.0"description = "Click inout example"requires-python = ">=3.8"requires-python = ">=3.10"dependencies = [ "click>=8.1",]
9 unmodified linesmodified:examples/naval/pyproject.toml+1 added-1 removed
12345567899 unmodified lines[project]name = "click-example-naval"version = "1.0.0"description = "Click naval example"requires-python = ">=3.8"requires-python = ">=3.10"dependencies = [ "click>=8.1",]
9 unmodified linesmodified:examples/repo/pyproject.toml+1 added-1 removed
1 [project]2 name = "click-example-repo"3 version = "1.0.0"4 description = "Click repo example"5-requires-python = ">=3.8"5+requires-python = ">=3.10"6 dependencies = [7 "click>=8.1",8 ]9 9 unmodified linesmodified:examples/termui/pyproject.toml+1 added-1 removed
1 [project]2 name = "click-example-termui"3 version = "1.0.0"4 description = "Click termui example"5-requires-python = ">=3.8"5+requires-python = ">=3.10"6 dependencies = [7 "click>=8.1",8 ]9 9 unmodified linesmodified:examples/validation/pyproject.toml+1 added-1 removed
1 [project]2 name = "click-example-validation"3 version = "1.0.0"4 description = "Click validation example"5-requires-python = ">=3.8"5+requires-python = ">=3.10"6 dependencies = [7 "click>=8.1",8 ]9 9 unmodified linesmodified:src/click/core.py+1 added-1 removed
88 unmodified lines89 raise RuntimeError(message)90 91 92 def batch(iterable: cabc.Iterable[V], batch_size: int) -> list[tuple[V, ...]]:93- return list(zip(*repeat(iter(iterable), batch_size)))93+ return list(zip(*repeat(iter(iterable), batch_size), strict=False))94 95 96 @contextmanager97 def augment_usage_errors(3037 unmodified linesmodified:src/click/types.py+4 added-2 removed
650 unmodified lines651 def _clamp(self, bound: float, dir: t.Literal[1, -1], open: bool) -> float:652 if not open:653 return bound654 655- # Could use Python 3.9's math.nextafter here, but clamping an655+ # Could use math.nextafter here, but clamping an656 # open float range doesn't seem to be particularly useful. It's657 # left up to the user to write a callback to do it if needed.658 raise RuntimeError("Clamping is not supported for open bounds.")659 399 unmodified lines1059 param=param,1060 ctx=ctx,1061 )1062 1063- return tuple(ty(x, param, ctx) for ty, x in zip(self.types, value))1063+ return tuple(1064+ ty(x, param, ctx) for ty, x in zip(self.types, value, strict=False)1065+ )1066 1067 1068 def convert_type(ty: t.Any | None, default: t.Any | None = None) -> ParamType:1069 """Find the most appropriate :class:`ParamType` for the given Python96 unmodified linesmodified:tests/test_utils.py+2 added-2 removed
572 unmodified lines573 expected = list(map(str, range(10)))574 p = tmpdir.mkdir("testdir").join("testfile")575 p.write("\n".join(expected))576 with p.open() as f:577- for e_line, a_line in zip(expected, click.utils.KeepOpenFile(f)):577+ for e_line, a_line in zip(expected, click.utils.KeepOpenFile(f), strict=False):578 assert e_line == a_line.strip()579 580 581 def test_iter_lazyfile(tmpdir):1 unmodified line583 p = tmpdir.mkdir("testdir").join("testfile")584 p.write("\n".join(expected))585 with p.open() as f:586 with click.utils.LazyFile(f.name) as lf:587- for e_line, a_line in zip(expected, lf):587+ for e_line, a_line in zip(expected, lf, strict=False):588 assert e_line == a_line.strip()589 590 591 class MockMain:67 unmodified linesmodified:CHANGES.rst+1 added-1 removed
3 unmodified lines4 -------------5 6 Released 2025-03-267 8-- Drop support for Python 3.7. :pr:`2588`8+- Drop support for Python 3.7, 3.8, and 3.9. :pr:`2588` :pr:`2892`9 - Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.10 :pr:`2438`11 - Use ``flit_core`` instead of ``setuptools`` as build backend. :pr:`2543`12 - Deprecate the ``__version__`` attribute. Use feature detection, or1224 unmodified linesmodified:pyproject.toml+6 added-3 removed
11 unmodified lines12 "Operating System :: OS Independent",13 "Programming Language :: Python",14 "Typing :: Typed",15 ]16-requires-python = ">=3.8"16+requires-python = ">=3.10"17 dependencies = [18 "colorama; platform_system == 'Windows'",19 ]20 36 unmodified lines57 [tool.coverage.paths]58 source = ["src", "*/site-packages"]59 60 [tool.mypy]61-python_version = "3.8"61+python_version = "3.10"62 files = ["src/click", "tests/typing"]63 show_error_codes = true64 pretty = true65 strict = true4 unmodified lines70 ]71 ignore_missing_imports = true72 73 [tool.pyright]74-pythonVersion = "3.8"74+pythonVersion = "3.10"75 include = ["src/click", "tests/typing"]76 typeCheckingMode = "basic"77 78 [tool.ruff]11 unmodified lines90 "I", # isort91 "UP", # pyupgrade92 "W", # pycodestyle warning93 ]94+ignore = [95+ "UP038", # keep isinstance tuples96+]97 98 [tool.ruff.lint.isort]99 force-single-line = true100 order-by-type = false5 unmodified linesmodified:tox.ini+2 added-2 removed
1 [tox]2 envlist =3- py3{13,12,11,10,9,8}4- pypy3103+ py3{13,12,11,10}4+ pypy3115 style6 typing7 docs8 skip_missing_interpreters = true53 unmodified lines