blurb
raw JSON → 2.0.0 verified Fri May 01 auth: no python
A command-line tool to manage CPython's Misc/NEWS.d entries. It helps CPython core developers and contributors create, list, merge, and render news blobs. The current version is 2.0.0, released in 2024. Release cadence is irregular, roughly once a year.
pip install blurb Common errors
error ModuleNotFoundError: No module named 'blurb' ↓
cause blurb is not installed or used as a library in the wrong context (it's meant to be used as a CLI tool, but can be imported).
fix
Run
pip install blurb and ensure the virtual environment is activated. error AttributeError: module 'blurb' has no attribute 'Blurb' ↓
cause The import path may be incorrect; try `from blurb import Blurb`.
fix
Use
from blurb import Blurb instead of import blurb. error ValueError: GitHub issue number must be an integer ↓
cause The `issue` property expects an integer, but a string or non-parsable value was provided.
fix
Convert the issue number to
int before assignment: b.issue = int('12345'). Warnings
breaking In v2.0.0, the `blurb test` subcommand was moved into the test suite; it is no longer available as a CLI command. ↓
fix Run tests via `python -m pytest` or `tox` instead of `blurb test`.
deprecated The `gh-issue-NNNN:` prefix is deprecated; use `gh-NNNN:` (without the extra 'issue-') since v1.2.0. ↓
fix Use `gh-{number}:` format in blurb entries.
gotcha GitHub issue numbers must be >= 32426 for CPython; lower numbers are rejected. ↓
fix Ensure the issue number is a well-known CPython issue. For own projects, this validation may not apply.
Imports
- Blurb
from blurb import Blurb
Quickstart
import os
from blurb import Blurb
# Create a new news entry
b = Blurb()
b.title = "My change"
b.type = "feature" # or 'bugfix', 'doc', etc.
b.body = "Description of the change."
b.issue = "12345" # GitHub issue number (>=32426 for CPython)
filepath = b.write()
print(f"Created {filepath}")