diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9cf530b..a8986c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-case-conflict - id: check-merge-conflict @@ -11,13 +11,12 @@ repos: - id: trailing-whitespace - repo: https://github.com/tox-dev/pyproject-fmt - rev: 1.7.0 + rev: 2.1.3 hooks: - id: pyproject-fmt - additional_dependencies: [tox] - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.16 + rev: v0.18 hooks: - id: validate-pyproject diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4783afd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +## 1.2.1 + +- Fix `python3 -m blurb`. +- Undocument removed `blurb split`. + +## 1.2.0 + +- Replace spaces with underscores in news directory. +- Drop support for Python 3.7. +- Remove `blurb split` command. +- Replace `gh-issue-NNNN:` with `gh-NNNN:` in the output. +- Accept GitHub issues numbered only 32426 or above. +- Improve error checking when parsing a Blurb. +- Loosen README check for CPython forks. +- Move code from `python/core-workflow` to own `python/blurb` repo. +- Deploy to PyPI via Trusted Publishers. + +## 1.1.0 + +- Support GitHub Issues in addition to b.p.o (bugs.python.org). + If `gh-issue` is in the metadata, then the filename will contain + `gh-issue-` instead of `bpo-`. + +## 1.0.7 + +- When word wrapping, don't break on long words or hyphens. +- Use the `-f` flag when adding **blurb** files to a Git + commit. This forces them to be added, even when the files + might normally be ignored based on a `.gitignore` directive. +- Explicitly support the `-help` command-line option. +- Fix Travis CI integration. diff --git a/README.md b/README.md index 74bf91b..d477343 100644 --- a/README.md +++ b/README.md @@ -191,32 +191,6 @@ uses the name of the directory CPython is checked out to. version I'm releasing, and using this shortcut saves me some typing.) -### blurb split - -`blurb split` only needs to be run once per-branch, ever. -It reads in `Misc/NEWS` -and splits it into individual `.rst` files. -The text files are stored as follows:: - - Misc/NEWS.d/.rst - -`` is the version number of Python where the -change was committed. Pre-release versions are denoted -with an abbreviation: `a` for alphas, `b` for betas, -and `rc` for release candidates. - -The individual `.rst` files actually (usually) -contain multiple entries. Each entry is delimited by a -single line containing `..` by itself. - -The assumption is, at the point we convert over to *blurb*, -we'll run `blurb split` on each active branch, -remove `Misc/NEWS` from the repo entirely, -never run `blurb split` ever again, -and ride off into the sunset, confident that the world is now -a better place. - - ## The "next" directory @@ -237,36 +211,11 @@ the right thing. If `NEWS` entries were already written to the final version directory, you'd have to move those around as part of the cherry-picking process. -## Changelog - -### 1.2.0 - -- Replace spaces with underscores in news directory. -- Drop support for Python 3.7. -- Remove `blurb split` command. -- Replace `gh-issue-NNNN:` with `gh-NNNN:` in the output. -- Accept GitHub issues numbered only 32426 or above. -- Improve error checking when parsing a Blurb. -- Loosen README check for CPython forks. -- Move code from `python/core-workflow` to own `python/blurb` repo. -- Deploy to PyPI via Trusted Publishers. - -### 1.1.0 - -- Support GitHub Issues in addition to b.p.o (bugs.python.org). - If "gh-issue" is in the metadata, then the filename will contain - "gh-issue-" instead of "bpo-". - -### 1.0.7 - -- When word wrapping, don't break on long words or hyphens. -- Use the `-f` flag when adding **blurb** files to a Git - commit. This forces them to be added, even when the files - might normally be ignored based on a `.gitignore` directive. -- Explicitly support the `-help` command-line option. -- Fix Travis CI integration. - ## Copyright **blurb** is Copyright 2015-2018 by Larry Hastings. Licensed to the PSF under a contributor agreement. + +## Changelog + +See [CHANGELOG.md](CHANGELOG.md). diff --git a/pyproject.toml b/pyproject.toml index 22371b6..0843f61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,8 +9,12 @@ requires = [ name = "blurb" description = "Command-line tool to manage CPython Misc/NEWS.d entries." readme = "README.md" -maintainers = [{name = "Python Core Developers", email="core-workflow@mail.python.org"}] -authors = [{ name="Larry Hastings", email="larry@hastings.org"}] +maintainers = [ + { name = "Python Core Developers", email = "core-workflow@mail.python.org" }, +] +authors = [ + { name = "Larry Hastings", email = "larry@hastings.org" }, +] requires-python = ">=3.8" classifiers = [ "Intended Audience :: Developers", @@ -26,21 +30,21 @@ classifiers = [ dynamic = [ "version", ] -[project.optional-dependencies] -tests = [ +optional-dependencies.tests = [ "pyfakefs", "pytest", "pytest-cov", ] -[project.urls] -Changelog = "https://github.com/python/blurb/blob/main/README.md#changelog" -Homepage = "https://github.com/python/blurb" -Source = "https://github.com/python/blurb" -[project.scripts] -blurb = "blurb.blurb:main" +urls.Changelog = "https://github.com/python/blurb/blob/main/CHANGELOG.md" +urls.Homepage = "https://github.com/python/blurb" +urls.Source = "https://github.com/python/blurb" +scripts.blurb = "blurb.blurb:main" [tool.hatch] version.source = "vcs" [tool.hatch.version.raw-options] local_scheme = "no-local-version" + +[tool.pyproject-fmt] +max_supported_python = "3.13" diff --git a/src/blurb/__main__.py b/src/blurb/__main__.py index 6aff72b..a173b94 100644 --- a/src/blurb/__main__.py +++ b/src/blurb/__main__.py @@ -1,5 +1,5 @@ -"""Run blurb using `python3 blurb/`.""" -import blurb +"""Run blurb using ``python3 -m blurb``.""" +from blurb import blurb if __name__ == '__main__': diff --git a/tox.ini b/tox.ini index 29d8a8a..793f226 100644 --- a/tox.ini +++ b/tox.ini @@ -19,3 +19,5 @@ commands = {posargs} blurb test blurb help + {envpython} -I -m blurb test + {envpython} -I -m blurb help