From 142e281220bc52888eff38738060d4560cd89cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar?= Date: Wed, 6 Mar 2024 02:35:00 +0100 Subject: [PATCH] Drop support for Python3.7 (#292) * Set `importlib-metadata-argparse-version` dependency version range * Drop support for Python3.7 --- .github/workflows/ci.yml | 6 ------ docs/pre-commit-hooks.rst | 16 ++++++++-------- pyproject.toml | 17 ++++++++--------- src/mdpo/cli.py | 2 +- 4 files changed, 17 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff05245..c79d175 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,9 +31,6 @@ jobs: fail-fast: false matrix: include: - - platform: ubuntu-latest - python-version: 3.7 - py: py37 - platform: ubuntu-latest python-version: 3.8 py: py38 @@ -46,9 +43,6 @@ jobs: - platform: ubuntu-latest python-version: "3.11" py: py311 - - platform: macos-latest - python-version: 3.7 - py: py37 - platform: macos-latest python-version: 3.9 py: py39 diff --git a/docs/pre-commit-hooks.rst b/docs/pre-commit-hooks.rst index cf1c902..20f5c85 100644 --- a/docs/pre-commit-hooks.rst +++ b/docs/pre-commit-hooks.rst @@ -19,7 +19,7 @@ so you don't need to specify them. .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v1.1.5 + rev: v1.1.6 hooks: - id: md2po args: @@ -32,7 +32,7 @@ so you don't need to specify them. .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v1.1.5 + rev: v1.1.6 hooks: - id: md2po files: ^README\.md @@ -53,7 +53,7 @@ po2md .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v1.1.5 + rev: v1.1.6 hooks: - id: po2md args: @@ -68,7 +68,7 @@ po2md .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v1.1.5 + rev: v1.1.6 hooks: - id: po2md files: ^README\.md @@ -91,7 +91,7 @@ md2po2md .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v1.1.5 + rev: v1.1.6 hooks: - id: md2po2md args: @@ -107,7 +107,7 @@ md2po2md .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v1.1.5 + rev: v1.1.6 hooks: - id: md2po2md files: ^README\.md @@ -126,7 +126,7 @@ mdpo2html .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v1.1.5 + rev: v1.1.6 hooks: - id: mdpo2html args: @@ -141,7 +141,7 @@ mdpo2html .. code-block:: yaml - repo: https://github.com/mondeja/mdpo - rev: v1.1.5 + rev: v1.1.6 hooks: - id: mdpo2html files: ^README\.html diff --git a/pyproject.toml b/pyproject.toml index 5f17a18..cc3fed5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "mdpo" -version = "1.1.5" +version = "2.0.0" description = "Markdown files translation using PO files." readme = "README.md" license = "BSD-3-Clause" authors = [{ name = "Álvaro Mondéjar Rubio", email = "mondejar1994@gmail.com" }] -requires-python = ">=3.7,<3.13" +requires-python = ">=3.8,<3.13" classifiers = [ "Development Status :: 5 - Production/Stable", "Operating System :: OS Independent", @@ -15,7 +15,6 @@ classifiers = [ "Topic :: Text Processing", "Topic :: Text Processing :: Markup :: Markdown", "Environment :: Console", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -27,7 +26,7 @@ dependencies = [ "polib>=1.1,<2", "pymd4c>=1.3,<2", "md-ulb-pwrap>=0.1,<1", - "importlib-metadata-argparse-version", + "importlib-metadata-argparse-version>=2,<3", "importlib-metadata; python_version < '3.10'", "contextlib-chdir>=1,<2", ] @@ -83,7 +82,7 @@ cov = [ ] [[tool.hatch.envs.tests.matrix]] -python = ["py37", "py38", "py39", "py310", "py311", "py312"] +python = ["py38", "py39", "py310", "py311", "py312"] [tool.hatch.envs.docs] python = "3.10" @@ -109,9 +108,9 @@ targets = [{ file = "pyproject.toml" }, { file = "docs/pre-commit-hooks.rst" }] [tool.project-config] cache = "2 days" style = [ - "gh://mondeja/project-config-styles@v5.2/python/base.json5", - "gh://mondeja/project-config-styles@v5.2/python/sphinx.json5", - "gh://mondeja/project-config-styles@v5.2/python/readthedocs.json5", + "gh://mondeja/project-config-styles@v5.2.1/python/base.json5", + "gh://mondeja/project-config-styles@v5.2.1/python/sphinx.json5", + "gh://mondeja/project-config-styles@v5.2.1/python/readthedocs.json5", ] [tool.pytest.ini_options] @@ -131,7 +130,7 @@ exclude_lines = [ [tool.ruff] line-length = 80 -target-version = "py37" +target-version = "py38" [tool.ruff.lint] select = [ diff --git a/src/mdpo/cli.py b/src/mdpo/cli.py index 5d4eb02..3ea05b8 100644 --- a/src/mdpo/cli.py +++ b/src/mdpo/cli.py @@ -128,8 +128,8 @@ def add_common_cli_first_arguments(parser, quiet=True): ) parser.add_argument( '-v', '--version', action=ImportlibMetadataVersionAction, + version_from='mdpo', version='%(prog)s %(version)s', - importlib_metadata_version_from='mdpo', help='Show program version number and exit.', ) if quiet: