diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7ec7f2..66986ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,11 +60,11 @@ repos: - id: "check-readthedocs" - repo: "https://github.com/rhysd/actionlint" - rev: "v1.7.4" + rev: "v1.7.6" hooks: - id: "actionlint" - repo: "https://github.com/kurtmckee/pre-commit-hooks" - rev: "v0.1.1" + rev: "v1.0.0" hooks: - id: "verify-consistent-pyproject-toml-python-requirements" diff --git a/LICENSE.txt b/LICENSE.txt index d05652e..8163387 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright 2009-2024 Kurt McKee +Copyright 2009-2025 Kurt McKee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.rst b/README.rst index 70c116c..02c24b5 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,8 @@ +.. + This file is part of listparser. + Copyright 2009-2025 Kurt McKee + SPDX-License-Identifier: MIT + .. image:: docs/_static/banner.png :alt: listparser: Parse OPML subscription lists in Python. diff --git a/changelog.d/20250105_142751_kurtmckee_use_pep_621_metadata.rst b/changelog.d/20250105_142751_kurtmckee_use_pep_621_metadata.rst new file mode 100644 index 0000000..8140ee3 --- /dev/null +++ b/changelog.d/20250105_142751_kurtmckee_use_pep_621_metadata.rst @@ -0,0 +1,4 @@ +Development +----------- + +* Migrate to PEP 621 metadata in ``pyproject.toml``. diff --git a/docs/conf.py b/docs/conf.py index 6ad5de7..1829bda 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,7 +23,7 @@ # General information about the project. project = "listparser" -copyright = "2009-2024 Kurt McKee" +copyright = "2009-2025 Kurt McKee" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -31,7 +31,7 @@ # pyproject = pathlib.Path(__file__).parent.parent / "pyproject.toml" info = tomllib.loads(pyproject.read_text()) -version = release = info["tool"]["poetry"]["version"] +version = release = info["project"]["version"] # List of directories, relative to source directory, that shouldn't be searched # for source files. diff --git a/pyproject.toml b/pyproject.toml index dc709d1..8c75b34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,35 +2,37 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" - -# poetry -# ------ - -[tool.poetry] +[project] name = "listparser" version = "0.20" description = "Parse OPML subscription lists" -authors = ["Kurt McKee "] +authors = [ + { name = "Kurt McKee", email = "contactme@kurtmckee.org" }, +] license = "MIT" readme = "README.rst" -repository = "https://github.com/kurtmckee/listparser/" -documentation = "https://listparser.readthedocs.io/en/latest/" keywords = ["opml", "foaf", "feed"] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", "Topic :: Text Processing :: Markup :: XML", ] +requires-python = ">=3.9" -[tool.poetry.dependencies] -python = ">=3.9" -# The dependencies here must match the minimums tested in `tox.ini`. -requests = {version = ">=2.32.0,<3", optional = true} -lxml = {version = ">=4.6.2,<6", optional = true} +[project.urls] +Repository = "https://github.com/kurtmckee/listparser/" +Documentation = "https://listparser.readthedocs.io/en/latest/" -[tool.poetry.extras] -http = ["requests"] -lxml = ["lxml"] +[project.optional-dependencies] +# The dependencies here must match the minimums tested in `tox.ini`. +http = [ + "requests >=2.32.0, <3", +] +lxml = [ + "lxml >=4.6.2, <6", +] # coverage diff --git a/requirements/docs/requirements.txt b/requirements/docs/requirements.txt index debfdfb..06dd9de 100644 --- a/requirements/docs/requirements.txt +++ b/requirements/docs/requirements.txt @@ -1,7 +1,7 @@ alabaster==0.7.16 ; python_version >= "3.9" babel==2.16.0 ; python_version >= "3.9" certifi==2024.12.14 ; python_version >= "3.9" -charset-normalizer==3.4.0 ; python_version >= "3.9" +charset-normalizer==3.4.1 ; python_version >= "3.9" colorama==0.4.6 ; python_version >= "3.9" and sys_platform == "win32" docutils==0.21.2 ; python_version >= "3.9" idna==3.10 ; python_version >= "3.9" @@ -10,7 +10,7 @@ importlib-metadata==8.5.0 ; python_version < "3.10" and python_version >= "3.9" jinja2==3.1.5 ; python_version >= "3.9" markupsafe==3.0.2 ; python_version >= "3.9" packaging==24.2 ; python_version >= "3.9" -pygments==2.18.0 ; python_version >= "3.9" +pygments==2.19.0 ; python_version >= "3.9" requests==2.32.3 ; python_version >= "3.9" snowballstemmer==2.2.0 ; python_version >= "3.9" sphinx==7.4.7 ; python_version >= "3.9" @@ -21,5 +21,5 @@ sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.9" sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" tomli==2.2.1 ; python_version < "3.11" and python_version >= "3.9" -urllib3==2.2.3 ; python_version >= "3.9" +urllib3==2.3.0 ; python_version >= "3.9" zipp==3.21.0 ; python_version < "3.10" and python_version >= "3.9" diff --git a/requirements/mypy/requirements.txt b/requirements/mypy/requirements.txt index 44c8e5e..1945c07 100644 --- a/requirements/mypy/requirements.txt +++ b/requirements/mypy/requirements.txt @@ -1,8 +1,8 @@ lxml-stubs==0.5.1 ; python_version >= "3.9" mypy-extensions==1.0.0 ; python_version >= "3.9" -mypy==1.14.0 ; python_version >= "3.9" +mypy==1.14.1 ; python_version >= "3.9" tomli==2.2.1 ; python_version < "3.11" and python_version >= "3.9" types-requests==2.32.0.20241016 ; python_version >= "3.9" types-toml==0.10.8.20240310 ; python_version >= "3.9" typing-extensions==4.12.2 ; python_version >= "3.9" -urllib3==2.2.3 ; python_version >= "3.9" +urllib3==2.3.0 ; python_version >= "3.9" diff --git a/requirements/test/requirements.txt b/requirements/test/requirements.txt index cf25fab..3e5e2cd 100644 --- a/requirements/test/requirements.txt +++ b/requirements/test/requirements.txt @@ -1,5 +1,5 @@ colorama==0.4.6 ; python_version >= "3.9" and sys_platform == "win32" -coverage[toml]==7.6.9 ; python_version >= "3.9" +coverage[toml]==7.6.10 ; python_version >= "3.9" exceptiongroup==1.2.2 ; python_version < "3.11" and python_version >= "3.9" importlib-metadata==8.5.0 ; python_version < "3.10" and python_version >= "3.9" iniconfig==2.0.0 ; python_version >= "3.9" diff --git a/src/listparser/__init__.py b/src/listparser/__init__.py index 21264d8..3b65a13 100644 --- a/src/listparser/__init__.py +++ b/src/listparser/__init__.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/src/listparser/common.py b/src/listparser/common.py index 9d1067a..6d89a09 100644 --- a/src/listparser/common.py +++ b/src/listparser/common.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/src/listparser/dates.py b/src/listparser/dates.py index ea0e073..4dddb24 100644 --- a/src/listparser/dates.py +++ b/src/listparser/dates.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/src/listparser/exceptions.py b/src/listparser/exceptions.py index d6dbbdd..47f9bab 100644 --- a/src/listparser/exceptions.py +++ b/src/listparser/exceptions.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/src/listparser/foaf.py b/src/listparser/foaf.py index f428e4f..063ce26 100644 --- a/src/listparser/foaf.py +++ b/src/listparser/foaf.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/src/listparser/opml.py b/src/listparser/opml.py index 40c011b..2f8e3f9 100644 --- a/src/listparser/opml.py +++ b/src/listparser/opml.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/src/listparser/xml_handler.py b/src/listparser/xml_handler.py index 5246685..e52f43d 100644 --- a/src/listparser/xml_handler.py +++ b/src/listparser/xml_handler.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/tests/test_dates.py b/tests/test_dates.py index 1b325cc..322fdcd 100644 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/tests/test_http.py b/tests/test_http.py index baa4e64..5f925d8 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/tests/test_super_dict.py b/tests/test_super_dict.py index 31101eb..bbf2354 100644 --- a/tests/test_super_dict.py +++ b/tests/test_super_dict.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/tests/test_xml.py b/tests/test_xml.py index a363163..d3064a6 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -1,5 +1,5 @@ # This file is part of listparser. -# Copyright 2009-2024 Kurt McKee +# Copyright 2009-2025 Kurt McKee # SPDX-License-Identifier: MIT # diff --git a/tox.ini b/tox.ini index 21d3717..69568f5 100644 --- a/tox.ini +++ b/tox.ini @@ -69,9 +69,6 @@ base_python = py3.13 recreate = true description = Update tool dependency versions skip_install = true -setenv = - # The actionlint pre-commit hook needs the GOCACHE environment variables. - GOCACHE={env_dir}/.gocache deps = poetry poetry-plugin-export @@ -80,19 +77,16 @@ deps = commands = # Update test requirements poetry update --directory="requirements/docs" --lock - poetry export --directory="requirements/docs" --output="requirements/docs/requirements.txt" --without-hashes + poetry export --directory="requirements/docs" --output="requirements.txt" --without-hashes poetry update --directory="requirements/mypy" --lock - poetry export --directory="requirements/mypy" --output="requirements/mypy/requirements.txt" --without-hashes + poetry export --directory="requirements/mypy" --output="requirements.txt" --without-hashes poetry update --directory="requirements/test" --lock - poetry export --directory="requirements/test" --output="requirements/test/requirements.txt" --without-hashes + poetry export --directory="requirements/test" --output="requirements.txt" --without-hashes # Update pre-commit hook versions pre-commit autoupdate upadup - # Run pre-commit immediately, but ignore its exit code - - pre-commit run -a - [flake8] max-line-length = 88