From ce2cdee07539345b88b54b1ee04be19708cc4ab8 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Wed, 3 Sep 2025 11:13:42 -0400 Subject: [PATCH 01/18] Rename CHANGES.md to CHANGELOG.md --- CHANGES.md => CHANGELOG.md | 0 packages/aws-sdk-signers/{CHANGES.md => CHANGELOG.md} | 0 packages/aws-sdk-signers/pyproject.toml | 2 +- packages/smithy-aws-core/{CHANGES.md => CHANGELOG.md} | 0 packages/smithy-aws-core/pyproject.toml | 2 +- packages/smithy-aws-event-stream/{CHANGES.md => CHANGELOG.md} | 0 packages/smithy-aws-event-stream/pyproject.toml | 2 +- packages/smithy-core/{CHANGES.md => CHANGELOG.md} | 0 packages/smithy-core/pyproject.toml | 2 +- packages/smithy-http/{CHANGES.md => CHANGELOG.md} | 0 packages/smithy-http/pyproject.toml | 2 +- packages/smithy-json/{CHANGES.md => CHANGELOG.md} | 0 packages/smithy-json/pyproject.toml | 2 +- 13 files changed, 6 insertions(+), 6 deletions(-) rename CHANGES.md => CHANGELOG.md (100%) rename packages/aws-sdk-signers/{CHANGES.md => CHANGELOG.md} (100%) rename packages/smithy-aws-core/{CHANGES.md => CHANGELOG.md} (100%) rename packages/smithy-aws-event-stream/{CHANGES.md => CHANGELOG.md} (100%) rename packages/smithy-core/{CHANGES.md => CHANGELOG.md} (100%) rename packages/smithy-http/{CHANGES.md => CHANGELOG.md} (100%) rename packages/smithy-json/{CHANGES.md => CHANGELOG.md} (100%) diff --git a/CHANGES.md b/CHANGELOG.md similarity index 100% rename from CHANGES.md rename to CHANGELOG.md diff --git a/packages/aws-sdk-signers/CHANGES.md b/packages/aws-sdk-signers/CHANGELOG.md similarity index 100% rename from packages/aws-sdk-signers/CHANGES.md rename to packages/aws-sdk-signers/CHANGELOG.md diff --git a/packages/aws-sdk-signers/pyproject.toml b/packages/aws-sdk-signers/pyproject.toml index 3d9bae792..a3e0bd477 100644 --- a/packages/aws-sdk-signers/pyproject.toml +++ b/packages/aws-sdk-signers/pyproject.toml @@ -27,7 +27,7 @@ classifiers = [ ] [project.urls] -"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/aws-sdk-signers/CHANGES.md" +"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/aws-sdk-signers/CHANGELOG.md" "Code" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/aws-sdk-signers/" "Issue tracker" = "https://github.com/smithy-lang/smithy-python/issues" diff --git a/packages/smithy-aws-core/CHANGES.md b/packages/smithy-aws-core/CHANGELOG.md similarity index 100% rename from packages/smithy-aws-core/CHANGES.md rename to packages/smithy-aws-core/CHANGELOG.md diff --git a/packages/smithy-aws-core/pyproject.toml b/packages/smithy-aws-core/pyproject.toml index 02f825e04..f61aa4b39 100644 --- a/packages/smithy-aws-core/pyproject.toml +++ b/packages/smithy-aws-core/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ ] [project.urls] -"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-aws-core/CHANGES.md" +"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-aws-core/CHANGELOG.md" "Code" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-aws-core/" "Issue tracker" = "https://github.com/smithy-lang/smithy-python/issues" diff --git a/packages/smithy-aws-event-stream/CHANGES.md b/packages/smithy-aws-event-stream/CHANGELOG.md similarity index 100% rename from packages/smithy-aws-event-stream/CHANGES.md rename to packages/smithy-aws-event-stream/CHANGELOG.md diff --git a/packages/smithy-aws-event-stream/pyproject.toml b/packages/smithy-aws-event-stream/pyproject.toml index 809bbf6a0..25a219268 100644 --- a/packages/smithy-aws-event-stream/pyproject.toml +++ b/packages/smithy-aws-event-stream/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ ] [project.urls] -"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-aws-event-stream/CHANGES.md" +"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-aws-event-stream/CHANGELOG.md" "Code" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-aws-event-stream/" "Issue tracker" = "https://github.com/smithy-lang/smithy-python/issues" diff --git a/packages/smithy-core/CHANGES.md b/packages/smithy-core/CHANGELOG.md similarity index 100% rename from packages/smithy-core/CHANGES.md rename to packages/smithy-core/CHANGELOG.md diff --git a/packages/smithy-core/pyproject.toml b/packages/smithy-core/pyproject.toml index a7ee38a63..a0931d29c 100644 --- a/packages/smithy-core/pyproject.toml +++ b/packages/smithy-core/pyproject.toml @@ -28,7 +28,7 @@ classifiers = [ dependencies = [] [project.urls] -"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-core/CHANGES.md" +"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-core/CHANGELOG.md" "Code" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-core/" "Issue tracker" = "https://github.com/smithy-lang/smithy-python/issues" diff --git a/packages/smithy-http/CHANGES.md b/packages/smithy-http/CHANGELOG.md similarity index 100% rename from packages/smithy-http/CHANGES.md rename to packages/smithy-http/CHANGELOG.md diff --git a/packages/smithy-http/pyproject.toml b/packages/smithy-http/pyproject.toml index 6645bd180..c1da51e18 100644 --- a/packages/smithy-http/pyproject.toml +++ b/packages/smithy-http/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ ] [project.urls] -"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-http/CHANGES.md" +"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-http/CHANGELOG.md" "Code" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-http/" "Issue tracker" = "https://github.com/smithy-lang/smithy-python/issues" diff --git a/packages/smithy-json/CHANGES.md b/packages/smithy-json/CHANGELOG.md similarity index 100% rename from packages/smithy-json/CHANGES.md rename to packages/smithy-json/CHANGELOG.md diff --git a/packages/smithy-json/pyproject.toml b/packages/smithy-json/pyproject.toml index a79e7f922..b4c113e87 100644 --- a/packages/smithy-json/pyproject.toml +++ b/packages/smithy-json/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ ] [project.urls] -"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-json/CHANGES.md" +"Changelog" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-json/CHANGELOG.md" "Code" = "https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-json/" "Issue tracker" = "https://github.com/smithy-lang/smithy-python/issues" From 13fede3d14d1e4f17a892b3d5d665e033f7debcc Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:24:53 -0400 Subject: [PATCH 02/18] Add new-entry changelog script --- scripts/changelog/new-entry.py | 79 ++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100755 scripts/changelog/new-entry.py diff --git a/scripts/changelog/new-entry.py b/scripts/changelog/new-entry.py new file mode 100755 index 000000000..845331230 --- /dev/null +++ b/scripts/changelog/new-entry.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +""" +Create new changelog entries for a specific package. +""" + +import argparse +import json +from datetime import datetime +from pathlib import Path + +PROJECT_ROOT_DIR = Path(__file__).resolve().parent.parent.parent + + +def get_package_changes_dir(package_name: str) -> Path: + package_path = PROJECT_ROOT_DIR / "packages" / package_name + changes_dir = package_path / ".changes" + return changes_dir + + +def create_change_entry( + change_type: str, + description: str, + package_name: str, +) -> str: + # Get package .changes directory and ensure it exists + changes_dir = PROJECT_ROOT_DIR / "packages" / package_name / ".changes" + changes_dir.mkdir(exist_ok=True) + + # Create next-release directory for pending changes + next_release_dir = changes_dir / "next-release" + next_release_dir.mkdir(exist_ok=True) + + # Generate unique filename + timestamp = datetime.now().strftime("%Y%m%d%H%M%S") + filename = f"{package_name}-{change_type}-{timestamp}.json" + + entry_data = { + "type": change_type, + "description": description, + } + + entry_file = next_release_dir / filename + with open(entry_file, "w") as f: + json.dump(entry_data, f, indent=2) + + print(f"Created changelog entry: {entry_file}") + return str(entry_file) + + +def main(): + parser = argparse.ArgumentParser(description="Create a new changelog entry") + parser.add_argument( + "-t", + "--type", + # TODO: Remove the 'breaking' option once this project is stable. + choices=("feature", "enhancement", "bugfix", "breaking"), + required=True, + help="Type of change", + ) + parser.add_argument( + "-d", "--description", required=True, help="Description of the change" + ) + parser.add_argument( + "-p", + "--package", + required=True, + help="Package name", + ) + args = parser.parse_args() + + create_change_entry( + change_type=args.type, + description=args.description, + package_name=args.package, + ) + + +if __name__ == "__main__": + main() From 469dfd19355ad6134d3a5ea6554aad0e635058ac Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:25:13 -0400 Subject: [PATCH 03/18] Add new-release changelog script --- scripts/changelog/new-release.py | 157 +++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100755 scripts/changelog/new-release.py diff --git a/scripts/changelog/new-release.py b/scripts/changelog/new-release.py new file mode 100755 index 000000000..55ec71f11 --- /dev/null +++ b/scripts/changelog/new-release.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python3 +""" +Create a new release by consolidating changelog entries from next-release directory +into a version JSON file (x.y.z.json). +""" + +import argparse +import json +import sys +from pathlib import Path +from typing import Any + +PROJECT_ROOT_DIR = Path(__file__).resolve().parent.parent.parent + + +def collect_next_release_changes(next_release_dir: Path) -> list[dict[str, Any]]: + changes: list[dict[str, Any]] = [] + + if not next_release_dir.exists(): + return changes + + for entry_file in next_release_dir.iterdir(): + if entry_file.is_file() and entry_file.suffix == ".json": + try: + with open(entry_file) as f: + change_data = json.load(f) + changes.append(change_data) + except (OSError, json.JSONDecodeError) as e: + print(f"Warning: Could not process {entry_file}: {e}", file=sys.stderr) + continue + + # Sort changes by type for consistent ordering + type_order = {"breaking": 0, "feature": 1, "enhancement": 2, "bugfix": 3} + changes.sort( + key=lambda c: ( + type_order.get(c.get("type", "enhancement"), 4), + c.get("description", ""), + ) + ) + + return changes + + +def create_version_file( + changes_dir: Path, version: str, changes: list[dict[str, Any]], summary: str | None = None +) -> Path: + version_file = changes_dir / f"{version}.json" + + if version_file.exists(): + print(f"Error: Version file {version_file} already exists!") + sys.exit(1) + + version_data: dict[str, Any] = {"changes": changes} + + if summary: + version_data["summary"] = summary + + with open(version_file, "w") as f: + json.dump(version_data, f, indent=2) + + return version_file + + +def cleanup_next_release_dir(next_release_dir: Path) -> int: + removed_count = 0 + + for entry_file in next_release_dir.iterdir(): + if entry_file.is_file() and entry_file.suffix == ".json": + try: + entry_file.unlink() + removed_count += 1 + except OSError as e: + print(f"Warning: Could not remove {entry_file}: {e}", file=sys.stderr) + + return removed_count + + +def create_new_release( + package_name: str, version: str, summary: str | None = None, dry_run: bool = False +) -> int: + # Get package directories + changes_dir = PROJECT_ROOT_DIR / "packages" / package_name / ".changes" + next_release_dir = changes_dir / "next-release" + + if not changes_dir.exists(): + print(f"Error: No .changes directory found for package: {package_name}") + return 1 + + # Collect changes from next-release + changes = collect_next_release_changes(next_release_dir) + + if not changes: + print( + f"No changelog entries found in {next_release_dir}.\n" + "Use 'python scripts/changelog/new-entry.py' to create entries first" + ) + return 1 + + print(f"Found {len(changes)} changelog entries for {package_name} v{version}:") + for change in changes: + change_type = change.get("type", "unknown").upper() + description = change.get("description", "No description") + print(f" {change_type}: {description}") + + if dry_run: + print("\n[DRY RUN] Would create version file and remove next-release entries") + return 0 + + # Create version file + try: + version_file = create_version_file(changes_dir, version, changes, summary) + print(f"\nCreated version file: {version_file}") + except Exception as e: + print(f"Error creating version file: {e}") + return 1 + + # Clean up next-release directory + removed_count = cleanup_next_release_dir(next_release_dir) + print(f"Removed {removed_count} changelog entries from next-release") + print(f"✅ Successfully created release {version} for {package_name}") + + return 0 + + +def main() -> int: + parser = argparse.ArgumentParser( + description="Create a new release by consolidating changelog entries" + ) + parser.add_argument("-p", "--package", required=True, help="Package name") + parser.add_argument( + "-v", "--version", required=True, help="Release version (e.g., 1.0.0)" + ) + parser.add_argument("-s", "--summary", help="Optional release summary") + parser.add_argument( + "--dry-run", + action="store_true", + help="Show what would be done without making changes", + ) + + args = parser.parse_args() + + # Basic version format validation + version_parts = args.version.split(".") + if len(version_parts) != 3 or not all(part.isdigit() for part in version_parts): + print("Error: Version must be in format x.y.z (e.g., 1.2.3)") + return 1 + + return create_new_release( + package_name=args.package, + version=args.version, + summary=args.summary, + dry_run=args.dry_run, + ) + + +if __name__ == "__main__": + exit(main()) From 9bac8f7d46ed95e949de39209f757f3b84b9c0db Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:27:03 -0400 Subject: [PATCH 04/18] Add changelog dependency group with jinja2 dependency --- pyproject.toml | 5 ++++- uv.lock | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 96df8433f..646dbd829 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,11 +21,14 @@ lint = [ typing = [ "pyright>=1.1.400", ] +changelog = [ + "jinja2>=3.1.6" +] [tool.uv] required-version = ">=0.7.2" package = false -default-groups = ["test", "lint", "typing"] +default-groups = ["test", "lint", "typing", "changelog"] [tool.uv.workspace] members = ["packages/*"] diff --git a/uv.lock b/uv.lock index 819fdcefb..bbefdb69a 100644 --- a/uv.lock +++ b/uv.lock @@ -359,6 +359,56 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" }, ] +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537, upload-time = "2024-10-18T15:21:54.129Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274, upload-time = "2024-10-18T15:21:13.777Z" }, + { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348, upload-time = "2024-10-18T15:21:14.822Z" }, + { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149, upload-time = "2024-10-18T15:21:15.642Z" }, + { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118, upload-time = "2024-10-18T15:21:17.133Z" }, + { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993, upload-time = "2024-10-18T15:21:18.064Z" }, + { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178, upload-time = "2024-10-18T15:21:18.859Z" }, + { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319, upload-time = "2024-10-18T15:21:19.671Z" }, + { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352, upload-time = "2024-10-18T15:21:20.971Z" }, + { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097, upload-time = "2024-10-18T15:21:22.646Z" }, + { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601, upload-time = "2024-10-18T15:21:23.499Z" }, + { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274, upload-time = "2024-10-18T15:21:24.577Z" }, + { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352, upload-time = "2024-10-18T15:21:25.382Z" }, + { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122, upload-time = "2024-10-18T15:21:26.199Z" }, + { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085, upload-time = "2024-10-18T15:21:27.029Z" }, + { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978, upload-time = "2024-10-18T15:21:27.846Z" }, + { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208, upload-time = "2024-10-18T15:21:28.744Z" }, + { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357, upload-time = "2024-10-18T15:21:29.545Z" }, + { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344, upload-time = "2024-10-18T15:21:30.366Z" }, + { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101, upload-time = "2024-10-18T15:21:31.207Z" }, + { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603, upload-time = "2024-10-18T15:21:32.032Z" }, + { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510, upload-time = "2024-10-18T15:21:33.625Z" }, + { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486, upload-time = "2024-10-18T15:21:34.611Z" }, + { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480, upload-time = "2024-10-18T15:21:35.398Z" }, + { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914, upload-time = "2024-10-18T15:21:36.231Z" }, + { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796, upload-time = "2024-10-18T15:21:37.073Z" }, + { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473, upload-time = "2024-10-18T15:21:37.932Z" }, + { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114, upload-time = "2024-10-18T15:21:39.799Z" }, + { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098, upload-time = "2024-10-18T15:21:40.813Z" }, + { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208, upload-time = "2024-10-18T15:21:41.814Z" }, + { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739, upload-time = "2024-10-18T15:21:42.784Z" }, +] + [[package]] name = "multidict" version = "6.4.3" @@ -721,6 +771,9 @@ version = "0.1.0" source = { virtual = "." } [package.dev-dependencies] +changelog = [ + { name = "jinja2" }, +] lint = [ { name = "black" }, { name = "docformatter" }, @@ -739,6 +792,7 @@ typing = [ [package.metadata] [package.metadata.requires-dev] +changelog = [{ name = "jinja2", specifier = ">=3.1.6" }] lint = [ { name = "black", specifier = ">=25.1.0" }, { name = "docformatter", specifier = ">=1.7.5" }, From b8aab922d9eded624d8ed09621485a77386c283c Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:28:00 -0400 Subject: [PATCH 05/18] Add render changelog script and changelog template --- scripts/changelog/render.py | 149 ++++++++++++++++++++++++++++ scripts/changelog/templates/PACKAGE | 28 ++++++ 2 files changed, 177 insertions(+) create mode 100755 scripts/changelog/render.py create mode 100644 scripts/changelog/templates/PACKAGE diff --git a/scripts/changelog/render.py b/scripts/changelog/render.py new file mode 100755 index 000000000..263058ab8 --- /dev/null +++ b/scripts/changelog/render.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python3 +""" +Render changelog entries from version JSON files using Jinja templates. +""" + +import argparse +import json +import re +import sys +from pathlib import Path +from typing import IO, Any + +from jinja2 import Template + +PROJECT_ROOT_DIR = Path(__file__).resolve().parent.parent.parent + +TEMPLATES_DIR = PROJECT_ROOT_DIR / "scripts" / "changelog" / "templates" +DEFAULT_TEMPLATE_NAME = "PACKAGE" +VERSION_PATTERN = r"^\d+\.\d+\.\d+\.json$" + + +def get_sorted_versions(changes_dir: Path) -> list[str]: + """Get sorted list of version numbers from .changes directory.""" + version_pattern = re.compile(VERSION_PATTERN) + versions: list[str] = [] + + for file in changes_dir.iterdir(): + if file.is_file() and version_pattern.match(file.name): + versions.append(file.stem) + + # Sort by semantic version (oldest first) + versions.sort(key=lambda v: [int(x) for x in v.split(".")]) + return versions + + +def load_package_releases(changes_dir: Path) -> dict[str, dict[str, Any]]: + """Load all changelog entries from version JSON files.""" + releases: dict[str, dict[str, Any]] = {} + + for version_number in get_sorted_versions(changes_dir): + filename = changes_dir / f"{version_number}.json" + try: + with open(filename) as f: + data = json.load(f) + # Restructure data to match PACKAGE template expectations + changes = data.get("changes", []) + formatted_changes = [ + { + "type": change.get("type", "enhancement"), + "description": change.get("description", ""), + } + for change in changes + ] + + releases[version_number] = { + "summary": data.get("summary", ""), + "changes": formatted_changes, + } + except (OSError, json.JSONDecodeError) as e: + print(f"Warning: Could not process {filename}: {e}", file=sys.stderr) + continue + + return releases + + +def render_changes( + changes: dict[str, dict[str, Any]], out: IO[str], template_contents: str +) -> None: + """Render changelog using Jinja template.""" + # Reverse order to show newest first + context: dict[str, Any] = {"releases": reversed(list(changes.items()))} + + template = Template(template_contents) + + result = template.render(**context) + out.write(result) + + +def render_package_changelog( + package_name: str, template_name: str | None = None, output_path: Path | None = None +) -> int: + # Determine changes directory from package name + package_dir = PROJECT_ROOT_DIR / "packages" / package_name + changes_dir = package_dir / ".changes" + + if not changes_dir.exists(): + print(f"No .changes directory found for package: {package_name}") + return 1 + + # Load changes from the directory + changes: dict[str, dict[str, Any]] = load_package_releases(changes_dir) + + if not changes: + print(f"No version JSON files found in {changes_dir}") + return 1 + + # Get template contents + template_path = TEMPLATES_DIR / (template_name or DEFAULT_TEMPLATE_NAME) + + if not template_path.exists(): + print(f"Template not found: {template_path}") + return 1 + + try: + with open(template_path) as f: + template_contents = f.read() + except OSError as e: + print(f"Error reading template {template_path}: {e}") + return 1 + + # Render to output + if output_path: + output_path.parent.mkdir(parents=True, exist_ok=True) + with open(output_path, "w") as f: + render_changes(changes, f, template_contents) + print(f"Changelog written to: {output_path}") + else: + render_changes(changes, sys.stdout, template_contents) + + return 0 + + +def main() -> int: + parser = argparse.ArgumentParser( + description="Render package changelog from changes files" + ) + parser.add_argument( + "-p", + "--package", + required=True, + help="Package name (looks in packages//.changes)", + ) + parser.add_argument( + "-t", + "--template", + help=f"Template name (looks in scripts/changelog/templates/, defaults to '{DEFAULT_TEMPLATE_NAME}')", + ) + parser.add_argument( + "-o", "--output", type=Path, help="Output file path (default: stdout)" + ) + + args = parser.parse_args() + return render_package_changelog( + package_name=args.package, template_name=args.template, output_path=args.output + ) + + +if __name__ == "__main__": + exit(main()) diff --git a/scripts/changelog/templates/PACKAGE b/scripts/changelog/templates/PACKAGE new file mode 100644 index 000000000..e74caf869 --- /dev/null +++ b/scripts/changelog/templates/PACKAGE @@ -0,0 +1,28 @@ +# Changelog +{% for release, changes in releases %} +## v{{ release }} +{%- if changes.summary %} + +{{ changes.summary }} +{%- endif %} +{%- for type_name in ['breaking', 'feature', 'enhancement', 'bugfix'] %} +{%- for change in changes.changes if change.type == type_name %} +{%- if loop.first %} +{%- if type_name == 'breaking' %} + +### Breaking Changes +{%- elif type_name == 'feature' %} + +### Features +{%- elif type_name == 'enhancement' %} + +### Enhancements +{%- elif type_name == 'bugfix' %} + +### Bug fixes +{%- endif %} +{%- endif %} +* {{ change.description }} +{%- endfor %} +{%- endfor %} +{% endfor %} From d75004b91878fc861019feff15d2ebd2c5166281 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:29:37 -0400 Subject: [PATCH 06/18] Backfill aws-sdk-signers changelog entries --- packages/aws-sdk-signers/.changes/0.0.1.json | 24 +++++++++++++++ packages/aws-sdk-signers/.changes/0.0.2.json | 12 ++++++++ packages/aws-sdk-signers/.changes/0.0.3.json | 20 ++++++++++++ packages/aws-sdk-signers/CHANGELOG.md | 32 ++++++-------------- 4 files changed, 66 insertions(+), 22 deletions(-) create mode 100644 packages/aws-sdk-signers/.changes/0.0.1.json create mode 100644 packages/aws-sdk-signers/.changes/0.0.2.json create mode 100644 packages/aws-sdk-signers/.changes/0.0.3.json diff --git a/packages/aws-sdk-signers/.changes/0.0.1.json b/packages/aws-sdk-signers/.changes/0.0.1.json new file mode 100644 index 000000000..0c7c27d56 --- /dev/null +++ b/packages/aws-sdk-signers/.changes/0.0.1.json @@ -0,0 +1,24 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added `SigV4Signer` to sign arbitrary requests sychronously." + }, + { + "type": "feature", + "description": "Added `AsyncSigV4Signer` to sign arbitrary requests asychronously." + }, + { + "type": "feature", + "description": "Added example `SigV4Auth` for integrating directly with Requests' `auth` parameter." + }, + { + "type": "feature", + "description": "Added `SigV4Signer` for integrating with the AIOHTTP request workflow." + }, + { + "type": "feature", + "description": "Added `SigV4Curl` for generating signed curl commands." + } + ] +} \ No newline at end of file diff --git a/packages/aws-sdk-signers/.changes/0.0.2.json b/packages/aws-sdk-signers/.changes/0.0.2.json new file mode 100644 index 000000000..5983e0afb --- /dev/null +++ b/packages/aws-sdk-signers/.changes/0.0.2.json @@ -0,0 +1,12 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added new `content_checksum_enabled` parameter to SigV4SigningProperties. This will enable users to control the inclusion of the `X-Amz-Content-SHA256` header required by S3. This is disabled by _default_, so you will need to set this to `True` for any S3 requests." + }, + { + "type": "bugfix", + "description": "Fixed incorrect exclusion of `X-Amz-Content-SHA256` header from some requests." + } + ] +} \ No newline at end of file diff --git a/packages/aws-sdk-signers/.changes/0.0.3.json b/packages/aws-sdk-signers/.changes/0.0.3.json new file mode 100644 index 000000000..50b398eaf --- /dev/null +++ b/packages/aws-sdk-signers/.changes/0.0.3.json @@ -0,0 +1,20 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added AsyncEventSigner for Amazon Event Stream event signing." + }, + { + "type": "feature", + "description": "Added new `uri_encode_path` parameter to SigV4SigningProperties. This boolean can be toggled to double encode the URI path." + }, + { + "type": "bugfix", + "description": "Fixed bug with async seekable payloads on requests." + }, + { + "type": "bugfix", + "description": "Fixed bug where paths were not being properly double-encoded." + } + ] +} \ No newline at end of file diff --git a/packages/aws-sdk-signers/CHANGELOG.md b/packages/aws-sdk-signers/CHANGELOG.md index bfa400fe5..263b03fdd 100644 --- a/packages/aws-sdk-signers/CHANGELOG.md +++ b/packages/aws-sdk-signers/CHANGELOG.md @@ -1,40 +1,28 @@ # Changelog -## Unreleased - -* - ## v0.0.3 ### Features * Added AsyncEventSigner for Amazon Event Stream event signing. -* Added new ``uri_encode_path`` parameter to SigV4SigningProperties. - This boolean can be toggled to double encode the URI path. +* Added new `uri_encode_path` parameter to SigV4SigningProperties. This boolean can be toggled to double encode the URI path. -### Bugfixes +### Bug fixes * Fixed bug with async seekable payloads on requests. * Fixed bug where paths were not being properly double-encoded. ## v0.0.2 -### Feature -* Added new ``content_checksum_enabled`` parameter to SigV4SigningProperties. - - This will enable users to control the inclusion of the `X-Amz-Content-SHA256` - header required by S3. This is _disabled_ by default, so you will need to - set this to `True` for any S3 requests. +### Features +* Added new `content_checksum_enabled` parameter to SigV4SigningProperties. This will enable users to control the inclusion of the `X-Amz-Content-SHA256` header required by S3. This is disabled by _default_, so you will need to set this to `True` for any S3 requests. -### Bugfixes +### Bug fixes * Fixed incorrect exclusion of `X-Amz-Content-SHA256` header from some requests. ## v0.0.1 ### Features -* Added SigV4Signer to sign arbitrary requests sychronously. -* Added AsyncSigV4Signer to sign arbitrary requests asychronously. -* Added example SigV4Auth for integrating directly with Requests' - ``auth`` parameter. -* Added SigV4Signer for integrating with the AIOHTTP request - workflow. -* Added SigV4Curl for generating signed curl commands. - +* Added `SigV4Signer` to sign arbitrary requests sychronously. +* Added `AsyncSigV4Signer` to sign arbitrary requests asychronously. +* Added example `SigV4Auth` for integrating directly with Requests' `auth` parameter. +* Added `SigV4Signer` for integrating with the AIOHTTP request workflow. +* Added `SigV4Curl` for generating signed curl commands. From 770ccf0fd522a9002e1d2d771b3e8c298744e5da Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:30:05 -0400 Subject: [PATCH 07/18] Backfill smithy-aws-core changelog entries --- packages/smithy-aws-core/.changes/0.0.1.json | 20 ++++++++++++++++++ packages/smithy-aws-core/.changes/0.0.2.json | 8 +++++++ packages/smithy-aws-core/.changes/0.0.3.json | 8 +++++++ ...ithy-aws-core-breaking-20250904125854.json | 4 ++++ ...mithy-aws-core-feature-20250904125834.json | 4 ++++ packages/smithy-aws-core/CHANGELOG.md | 21 +++---------------- 6 files changed, 47 insertions(+), 18 deletions(-) create mode 100644 packages/smithy-aws-core/.changes/0.0.1.json create mode 100644 packages/smithy-aws-core/.changes/0.0.2.json create mode 100644 packages/smithy-aws-core/.changes/0.0.3.json create mode 100644 packages/smithy-aws-core/.changes/next-release/smithy-aws-core-breaking-20250904125854.json create mode 100644 packages/smithy-aws-core/.changes/next-release/smithy-aws-core-feature-20250904125834.json diff --git a/packages/smithy-aws-core/.changes/0.0.1.json b/packages/smithy-aws-core/.changes/0.0.1.json new file mode 100644 index 000000000..4f1a5e7c8 --- /dev/null +++ b/packages/smithy-aws-core/.changes/0.0.1.json @@ -0,0 +1,20 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added support for Instance Metadata Service (IMDS) credential resolution." + }, + { + "type": "feature", + "description": "Added basic endpoint support." + }, + { + "type": "feature", + "description": "Added basic User Agent support." + }, + { + "type": "feature", + "description": "Added basic AWS specific protocol support for RestJson1 and HTTP bindings." + } + ] +} \ No newline at end of file diff --git a/packages/smithy-aws-core/.changes/0.0.2.json b/packages/smithy-aws-core/.changes/0.0.2.json new file mode 100644 index 000000000..0d250a117 --- /dev/null +++ b/packages/smithy-aws-core/.changes/0.0.2.json @@ -0,0 +1,8 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added support for Container credential resolution, commonly used with ECS/EKS." + } + ] +} \ No newline at end of file diff --git a/packages/smithy-aws-core/.changes/0.0.3.json b/packages/smithy-aws-core/.changes/0.0.3.json new file mode 100644 index 000000000..cb998b193 --- /dev/null +++ b/packages/smithy-aws-core/.changes/0.0.3.json @@ -0,0 +1,8 @@ +{ + "changes": [ + { + "type": "bugfix", + "description": "Rename `ContainerCredentialResolver` to `ContainerCredentialsResolver` to match new naming standard." + } + ] +} \ No newline at end of file diff --git a/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-breaking-20250904125854.json b/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-breaking-20250904125854.json new file mode 100644 index 000000000..ddf53a698 --- /dev/null +++ b/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-breaking-20250904125854.json @@ -0,0 +1,4 @@ +{ + "type": "breaking", + "description": "Updated sigv4 auth resolution and identity providers to the new transport-agnostic interfaces." +} \ No newline at end of file diff --git a/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-feature-20250904125834.json b/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-feature-20250904125834.json new file mode 100644 index 000000000..3d6ae9ef0 --- /dev/null +++ b/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-feature-20250904125834.json @@ -0,0 +1,4 @@ +{ + "type": "feature", + "description": "Added a hand-written implmentation for the `restJson1` protocol." +} \ No newline at end of file diff --git a/packages/smithy-aws-core/CHANGELOG.md b/packages/smithy-aws-core/CHANGELOG.md index bad47df65..db7b5c0ab 100644 --- a/packages/smithy-aws-core/CHANGELOG.md +++ b/packages/smithy-aws-core/CHANGELOG.md @@ -1,33 +1,18 @@ # Changelog -## Unreleased - -* _Add new items here_ - -### Breaking Changes - -* Updated sigv4 auth resolution and identity providers to the new transport- - agnostic interfaces. - -### Features - -* Added a hand-written implmentation for the `restJson1` protocol. - ## v0.0.3 -### Bugfixes -* Rename `ContainerCredentialResolver` to `ContainerCredentialsResolver` to - match new naming standard. +### Bug fixes +* Rename `ContainerCredentialResolver` to `ContainerCredentialsResolver` to match new naming standard. ## v0.0.2 -### Feature +### Features * Added support for Container credential resolution, commonly used with ECS/EKS. ## v0.0.1 ### Features - * Added support for Instance Metadata Service (IMDS) credential resolution. * Added basic endpoint support. * Added basic User Agent support. From f7ca077727565b723d0e2d85a29e2149b1756eac Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:30:51 -0400 Subject: [PATCH 08/18] Backfill smithy-aws-event-stream changelog entries --- packages/smithy-aws-event-stream/.changes/0.0.1.json | 12 ++++++++++++ packages/smithy-aws-event-stream/CHANGELOG.md | 4 ---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 packages/smithy-aws-event-stream/.changes/0.0.1.json diff --git a/packages/smithy-aws-event-stream/.changes/0.0.1.json b/packages/smithy-aws-event-stream/.changes/0.0.1.json new file mode 100644 index 000000000..4a9e9bd06 --- /dev/null +++ b/packages/smithy-aws-event-stream/.changes/0.0.1.json @@ -0,0 +1,12 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added basic support for the [Amazon Event Stream](https://smithy.io/2.0/aws/amazon-eventstream.html) specification." + }, + { + "type": "feature", + "description": "Added support for unidirectdional and bidirectional event streams." + } + ] +} \ No newline at end of file diff --git a/packages/smithy-aws-event-stream/CHANGELOG.md b/packages/smithy-aws-event-stream/CHANGELOG.md index dd0c93f83..53321441a 100644 --- a/packages/smithy-aws-event-stream/CHANGELOG.md +++ b/packages/smithy-aws-event-stream/CHANGELOG.md @@ -1,9 +1,5 @@ # Changelog -## Unreleased - -* - ## v0.0.1 ### Features From 0411fc47801ae8d5463e94d87588790591422037 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:31:15 -0400 Subject: [PATCH 09/18] Backfill smithy-core changelog entries --- packages/smithy-core/.changes/0.0.1.json | 8 +++++ packages/smithy-core/.changes/0.0.2.json | 8 +++++ .../smithy-core-breaking-20250904131215.json | 4 +++ .../smithy-core-breaking-20250904131233.json | 4 +++ .../smithy-core-breaking-20250904131302.json | 4 +++ ...mithy-core-enhancement-20250904131027.json | 4 +++ .../smithy-core-feature-20250904131114.json | 4 +++ .../smithy-core-feature-20250904131129.json | 4 +++ .../smithy-core-feature-20250904131140.json | 4 +++ .../smithy-core-feature-20250904131155.json | 4 +++ packages/smithy-core/CHANGELOG.md | 29 +------------------ 11 files changed, 49 insertions(+), 28 deletions(-) create mode 100644 packages/smithy-core/.changes/0.0.1.json create mode 100644 packages/smithy-core/.changes/0.0.2.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131215.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131233.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131302.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-enhancement-20250904131027.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131114.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131129.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131140.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131155.json diff --git a/packages/smithy-core/.changes/0.0.1.json b/packages/smithy-core/.changes/0.0.1.json new file mode 100644 index 000000000..1e2af7d10 --- /dev/null +++ b/packages/smithy-core/.changes/0.0.1.json @@ -0,0 +1,8 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added support for minimal components required for SDK generation." + } + ] +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/0.0.2.json b/packages/smithy-core/.changes/0.0.2.json new file mode 100644 index 000000000..2e3ce7880 --- /dev/null +++ b/packages/smithy-core/.changes/0.0.2.json @@ -0,0 +1,8 @@ +{ + "changes": [ + { + "type": "bugfix", + "description": "Fixed incorrect interceptors for `modify_before_signing` and `modify_before_transmit`." + } + ] +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131215.json b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131215.json new file mode 100644 index 000000000..d2671b952 --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131215.json @@ -0,0 +1,4 @@ +{ + "type": "breaking", + "description": "Updated retry interfaces to pull information from exceptions instead of requriing a separate classification step." +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131233.json b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131233.json new file mode 100644 index 000000000..f666a9d79 --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131233.json @@ -0,0 +1,4 @@ +{ + "type": "breaking", + "description": "Introduced transport-agnostic interfaces for identiy and auth, replacing the existing interfaces that were coupled to HTTP requests and responses." +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131302.json b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131302.json new file mode 100644 index 000000000..b2b3cefc8 --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131302.json @@ -0,0 +1,4 @@ +{ + "type": "breaking", + "description": "Replaced suffix with to follow PEP8 conventions." +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20250904131027.json b/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20250904131027.json new file mode 100644 index 000000000..e4fa2b941 --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20250904131027.json @@ -0,0 +1,4 @@ +{ + "type": "enhancement", + "description": "Added usages of `TypeForm` from PEP747 via `typing_extensions` to better support typing for event streams and typed properties." +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131114.json b/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131114.json new file mode 100644 index 000000000..fae46e5cc --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131114.json @@ -0,0 +1,4 @@ +{ + "type": "feature", + "description": "Introduced the `ClientProtocol` interface to allow for hand-written protocol implementations and protocol swapping at runtime." +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131129.json b/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131129.json new file mode 100644 index 000000000..9928ed89b --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131129.json @@ -0,0 +1,4 @@ +{ + "type": "feature", + "description": "Updated exceptions to embed retryablity information." +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131140.json b/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131140.json new file mode 100644 index 000000000..baed98bdb --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131140.json @@ -0,0 +1,4 @@ +{ + "type": "feature", + "description": "Updated schema members to preserve their ordering from the model using dict ordering, which significantly cuts back the amount of code that must be generated." +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131155.json b/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131155.json new file mode 100644 index 000000000..02bb8f645 --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-feature-20250904131155.json @@ -0,0 +1,4 @@ +{ + "type": "feature", + "description": "Introduced a hand-written request pipeline to replace the one that was code-generated in Java." +} \ No newline at end of file diff --git a/packages/smithy-core/CHANGELOG.md b/packages/smithy-core/CHANGELOG.md index bccdb8541..8049bd7e1 100644 --- a/packages/smithy-core/CHANGELOG.md +++ b/packages/smithy-core/CHANGELOG.md @@ -1,38 +1,11 @@ # Changelog -## Unreleased - -### Breaking Changes - -* Replaced `Exception` suffix with `Error` to follow PEP8 conventions. -* Introduced transport-agnostic interfaces for identiy and auth, replacing the - existing interfaces that were coupled to HTTP requests and responses. -* Updated retry interfaces to pull information from exceptions instead of requriing - a separate classification step. - -### Features - -* Introduced a hand-written request pipeline to replace the one that was code-generated - in Java. -* Updated schema members to preserve their ordering from the model using dict ordering, - which significantly cuts back the amount of code that must be generated. -* Updated exceptions to embed retryablity information. -* Introduced the `ClientProtocol` interface to allow for hand-written protocol - implementations and protocol swapping at runtime. - -### Typing - -* Added usages of `TypeForm` from PEP747 via `typing_extensions` to better support - typing for event streams and typed properties. - ## v0.0.2 -### Bugfixes - +### Bug fixes * Fixed incorrect interceptors for `modify_before_signing` and `modify_before_transmit`. ## v0.0.1 ### Features - * Added support for minimal components required for SDK generation. From 0df14dcfa30b1432b1fb9e8bf89388dff748824b Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:31:31 -0400 Subject: [PATCH 10/18] Backfill smithy-http changelog entries --- packages/smithy-http/.changes/0.0.1.json | 12 ++++++++++++ .../smithy-http-breaking-20250904132003.json | 4 ++++ .../smithy-http-feature-20250904131946.json | 4 ++++ packages/smithy-http/CHANGELOG.md | 12 ------------ 4 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 packages/smithy-http/.changes/0.0.1.json create mode 100644 packages/smithy-http/.changes/next-release/smithy-http-breaking-20250904132003.json create mode 100644 packages/smithy-http/.changes/next-release/smithy-http-feature-20250904131946.json diff --git a/packages/smithy-http/.changes/0.0.1.json b/packages/smithy-http/.changes/0.0.1.json new file mode 100644 index 000000000..85ef764fe --- /dev/null +++ b/packages/smithy-http/.changes/0.0.1.json @@ -0,0 +1,12 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added support for aiohttp and AWSCRT http clients." + }, + { + "type": "feature", + "description": "Added basic HTTP primitives and interfaces for Smithy clients." + } + ] +} \ No newline at end of file diff --git a/packages/smithy-http/.changes/next-release/smithy-http-breaking-20250904132003.json b/packages/smithy-http/.changes/next-release/smithy-http-breaking-20250904132003.json new file mode 100644 index 000000000..2d7c4154f --- /dev/null +++ b/packages/smithy-http/.changes/next-release/smithy-http-breaking-20250904132003.json @@ -0,0 +1,4 @@ +{ + "type": "breaking", + "description": "Removed identity and auth interfaces in favor of the transport-agnostic interfaces introduced in `smithy-core`." +} \ No newline at end of file diff --git a/packages/smithy-http/.changes/next-release/smithy-http-feature-20250904131946.json b/packages/smithy-http/.changes/next-release/smithy-http-feature-20250904131946.json new file mode 100644 index 000000000..5345cdca9 --- /dev/null +++ b/packages/smithy-http/.changes/next-release/smithy-http-feature-20250904131946.json @@ -0,0 +1,4 @@ +{ + "type": "feature", + "description": "Introduced schema-based serializers and deserializers for HTTP binding protocols." +} \ No newline at end of file diff --git a/packages/smithy-http/CHANGELOG.md b/packages/smithy-http/CHANGELOG.md index c1a057e0c..6357640c3 100644 --- a/packages/smithy-http/CHANGELOG.md +++ b/packages/smithy-http/CHANGELOG.md @@ -1,19 +1,7 @@ # Changelog -## Unreleased - -### Breaking Changes - -* Removed identity and auth interfaces in favor of the transport-agnostic interfaces - introduced in `smithy-core`. - -### Features - -* Introduced schema-based serializers and deserializers for HTTP binding protocols. - ## v0.0.1 ### Features - * Added support for aiohttp and AWSCRT http clients. * Added basic HTTP primitives and interfaces for Smithy clients. From dea2721296c0460e3bb003092511f93756a8a5a6 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:31:53 -0400 Subject: [PATCH 11/18] Backfill smithy-json changelog entries --- packages/smithy-json/.changes/0.0.1.json | 8 ++++++++ packages/smithy-json/CHANGELOG.md | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 packages/smithy-json/.changes/0.0.1.json diff --git a/packages/smithy-json/.changes/0.0.1.json b/packages/smithy-json/.changes/0.0.1.json new file mode 100644 index 000000000..fc8a989d9 --- /dev/null +++ b/packages/smithy-json/.changes/0.0.1.json @@ -0,0 +1,8 @@ +{ + "changes": [ + { + "type": "feature", + "description": "Added support for json primitives in Smithy clients." + } + ] +} \ No newline at end of file diff --git a/packages/smithy-json/CHANGELOG.md b/packages/smithy-json/CHANGELOG.md index f0b53dc16..adbed8574 100644 --- a/packages/smithy-json/CHANGELOG.md +++ b/packages/smithy-json/CHANGELOG.md @@ -1,10 +1,6 @@ # Changelog -## Unreleased - -* - ## v0.0.1 -### Feature +### Features * Added support for json primitives in Smithy clients. From 65deff5c6684b318d2de9644921acdd6782c20ca Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:51:48 -0400 Subject: [PATCH 12/18] fix formatting --- scripts/changelog/new-release.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/changelog/new-release.py b/scripts/changelog/new-release.py index 55ec71f11..bdc7d4315 100755 --- a/scripts/changelog/new-release.py +++ b/scripts/changelog/new-release.py @@ -42,7 +42,10 @@ def collect_next_release_changes(next_release_dir: Path) -> list[dict[str, Any]] def create_version_file( - changes_dir: Path, version: str, changes: list[dict[str, Any]], summary: str | None = None + changes_dir: Path, + version: str, + changes: list[dict[str, Any]], + summary: str | None = None, ) -> Path: version_file = changes_dir / f"{version}.json" From 23bbbc145be4ad1a4f3f303e808ffc321935a74e Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 4 Sep 2025 13:57:11 -0400 Subject: [PATCH 13/18] Add license header to scripts --- scripts/changelog/new-entry.py | 2 ++ scripts/changelog/new-release.py | 2 ++ scripts/changelog/render.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/scripts/changelog/new-entry.py b/scripts/changelog/new-entry.py index 845331230..2551e0989 100755 --- a/scripts/changelog/new-entry.py +++ b/scripts/changelog/new-entry.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 """ Create new changelog entries for a specific package. """ diff --git a/scripts/changelog/new-release.py b/scripts/changelog/new-release.py index bdc7d4315..7b004221b 100755 --- a/scripts/changelog/new-release.py +++ b/scripts/changelog/new-release.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 """ Create a new release by consolidating changelog entries from next-release directory into a version JSON file (x.y.z.json). diff --git a/scripts/changelog/render.py b/scripts/changelog/render.py index 263058ab8..3164d6622 100755 --- a/scripts/changelog/render.py +++ b/scripts/changelog/render.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 """ Render changelog entries from version JSON files using Jinja templates. """ From 5020b8b3892adc317d03f9b8c144d5fbe6f117c6 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Tue, 9 Sep 2025 13:38:00 -0400 Subject: [PATCH 14/18] Address typos and formatting issues --- packages/aws-sdk-signers/.changes/0.0.1.json | 4 ++-- packages/aws-sdk-signers/.changes/0.0.2.json | 2 +- packages/aws-sdk-signers/.changes/0.0.3.json | 4 ++-- packages/aws-sdk-signers/CHANGELOG.md | 10 +++++----- .../smithy-core-breaking-20250904131215.json | 2 +- .../smithy-core-breaking-20250904131233.json | 2 +- .../smithy-core-breaking-20250904131302.json | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/aws-sdk-signers/.changes/0.0.1.json b/packages/aws-sdk-signers/.changes/0.0.1.json index 0c7c27d56..7d891e704 100644 --- a/packages/aws-sdk-signers/.changes/0.0.1.json +++ b/packages/aws-sdk-signers/.changes/0.0.1.json @@ -2,11 +2,11 @@ "changes": [ { "type": "feature", - "description": "Added `SigV4Signer` to sign arbitrary requests sychronously." + "description": "Added `SigV4Signer` to sign arbitrary requests synchronously." }, { "type": "feature", - "description": "Added `AsyncSigV4Signer` to sign arbitrary requests asychronously." + "description": "Added `AsyncSigV4Signer` to sign arbitrary requests asynchronously." }, { "type": "feature", diff --git a/packages/aws-sdk-signers/.changes/0.0.2.json b/packages/aws-sdk-signers/.changes/0.0.2.json index 5983e0afb..a78d90795 100644 --- a/packages/aws-sdk-signers/.changes/0.0.2.json +++ b/packages/aws-sdk-signers/.changes/0.0.2.json @@ -2,7 +2,7 @@ "changes": [ { "type": "feature", - "description": "Added new `content_checksum_enabled` parameter to SigV4SigningProperties. This will enable users to control the inclusion of the `X-Amz-Content-SHA256` header required by S3. This is disabled by _default_, so you will need to set this to `True` for any S3 requests." + "description": "Added new `content_checksum_enabled` parameter to `SigV4SigningProperties`. This will enable users to control the inclusion of the `X-Amz-Content-SHA256` header required by S3. This is disabled by _default_, so you will need to set this to `True` for any S3 requests." }, { "type": "bugfix", diff --git a/packages/aws-sdk-signers/.changes/0.0.3.json b/packages/aws-sdk-signers/.changes/0.0.3.json index 50b398eaf..b72189bfc 100644 --- a/packages/aws-sdk-signers/.changes/0.0.3.json +++ b/packages/aws-sdk-signers/.changes/0.0.3.json @@ -2,11 +2,11 @@ "changes": [ { "type": "feature", - "description": "Added AsyncEventSigner for Amazon Event Stream event signing." + "description": "Added `AsyncEventSigner` for Amazon Event Stream event signing." }, { "type": "feature", - "description": "Added new `uri_encode_path` parameter to SigV4SigningProperties. This boolean can be toggled to double encode the URI path." + "description": "Added new `uri_encode_path` parameter to `SigV4SigningProperties`. This boolean can be toggled to double encode the URI path." }, { "type": "bugfix", diff --git a/packages/aws-sdk-signers/CHANGELOG.md b/packages/aws-sdk-signers/CHANGELOG.md index 263b03fdd..e9da8fcbe 100644 --- a/packages/aws-sdk-signers/CHANGELOG.md +++ b/packages/aws-sdk-signers/CHANGELOG.md @@ -3,8 +3,8 @@ ## v0.0.3 ### Features -* Added AsyncEventSigner for Amazon Event Stream event signing. -* Added new `uri_encode_path` parameter to SigV4SigningProperties. This boolean can be toggled to double encode the URI path. +* Added `AsyncEventSigner` for Amazon Event Stream event signing. +* Added new `uri_encode_path` parameter to `SigV4SigningProperties`. This boolean can be toggled to double encode the URI path. ### Bug fixes * Fixed bug with async seekable payloads on requests. @@ -13,7 +13,7 @@ ## v0.0.2 ### Features -* Added new `content_checksum_enabled` parameter to SigV4SigningProperties. This will enable users to control the inclusion of the `X-Amz-Content-SHA256` header required by S3. This is disabled by _default_, so you will need to set this to `True` for any S3 requests. +* Added new `content_checksum_enabled` parameter to `SigV4SigningProperties`. This will enable users to control the inclusion of the `X-Amz-Content-SHA256` header required by S3. This is disabled by _default_, so you will need to set this to `True` for any S3 requests. ### Bug fixes * Fixed incorrect exclusion of `X-Amz-Content-SHA256` header from some requests. @@ -21,8 +21,8 @@ ## v0.0.1 ### Features -* Added `SigV4Signer` to sign arbitrary requests sychronously. -* Added `AsyncSigV4Signer` to sign arbitrary requests asychronously. +* Added `SigV4Signer` to sign arbitrary requests synchronously. +* Added `AsyncSigV4Signer` to sign arbitrary requests asynchronously. * Added example `SigV4Auth` for integrating directly with Requests' `auth` parameter. * Added `SigV4Signer` for integrating with the AIOHTTP request workflow. * Added `SigV4Curl` for generating signed curl commands. diff --git a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131215.json b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131215.json index d2671b952..a716f9a35 100644 --- a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131215.json +++ b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131215.json @@ -1,4 +1,4 @@ { "type": "breaking", - "description": "Updated retry interfaces to pull information from exceptions instead of requriing a separate classification step." + "description": "Updated retry interfaces to pull information from exceptions instead of requiring a separate classification step." } \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131233.json b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131233.json index f666a9d79..406e733a1 100644 --- a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131233.json +++ b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131233.json @@ -1,4 +1,4 @@ { "type": "breaking", - "description": "Introduced transport-agnostic interfaces for identiy and auth, replacing the existing interfaces that were coupled to HTTP requests and responses." + "description": "Introduced transport-agnostic interfaces for identity and auth, replacing the existing interfaces that were coupled to HTTP requests and responses." } \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131302.json b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131302.json index b2b3cefc8..ceaa96164 100644 --- a/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131302.json +++ b/packages/smithy-core/.changes/next-release/smithy-core-breaking-20250904131302.json @@ -1,4 +1,4 @@ { "type": "breaking", - "description": "Replaced suffix with to follow PEP8 conventions." + "description": "Replaced `Exception` suffix with `Error` to follow PEP8 conventions." } \ No newline at end of file From 9163e73d765da74080e4e7708851e85278bc0be1 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Tue, 9 Sep 2025 13:46:26 -0400 Subject: [PATCH 15/18] Remove summary feature --- scripts/changelog/new-release.py | 12 ++---------- scripts/changelog/render.py | 1 - scripts/changelog/templates/PACKAGE | 4 ---- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/scripts/changelog/new-release.py b/scripts/changelog/new-release.py index 7b004221b..e1819fab8 100755 --- a/scripts/changelog/new-release.py +++ b/scripts/changelog/new-release.py @@ -47,7 +47,6 @@ def create_version_file( changes_dir: Path, version: str, changes: list[dict[str, Any]], - summary: str | None = None, ) -> Path: version_file = changes_dir / f"{version}.json" @@ -57,9 +56,6 @@ def create_version_file( version_data: dict[str, Any] = {"changes": changes} - if summary: - version_data["summary"] = summary - with open(version_file, "w") as f: json.dump(version_data, f, indent=2) @@ -80,9 +76,7 @@ def cleanup_next_release_dir(next_release_dir: Path) -> int: return removed_count -def create_new_release( - package_name: str, version: str, summary: str | None = None, dry_run: bool = False -) -> int: +def create_new_release(package_name: str, version: str, dry_run: bool = False) -> int: # Get package directories changes_dir = PROJECT_ROOT_DIR / "packages" / package_name / ".changes" next_release_dir = changes_dir / "next-release" @@ -113,7 +107,7 @@ def create_new_release( # Create version file try: - version_file = create_version_file(changes_dir, version, changes, summary) + version_file = create_version_file(changes_dir, version, changes) print(f"\nCreated version file: {version_file}") except Exception as e: print(f"Error creating version file: {e}") @@ -135,7 +129,6 @@ def main() -> int: parser.add_argument( "-v", "--version", required=True, help="Release version (e.g., 1.0.0)" ) - parser.add_argument("-s", "--summary", help="Optional release summary") parser.add_argument( "--dry-run", action="store_true", @@ -153,7 +146,6 @@ def main() -> int: return create_new_release( package_name=args.package, version=args.version, - summary=args.summary, dry_run=args.dry_run, ) diff --git a/scripts/changelog/render.py b/scripts/changelog/render.py index 3164d6622..c0eaf0ea4 100755 --- a/scripts/changelog/render.py +++ b/scripts/changelog/render.py @@ -55,7 +55,6 @@ def load_package_releases(changes_dir: Path) -> dict[str, dict[str, Any]]: ] releases[version_number] = { - "summary": data.get("summary", ""), "changes": formatted_changes, } except (OSError, json.JSONDecodeError) as e: diff --git a/scripts/changelog/templates/PACKAGE b/scripts/changelog/templates/PACKAGE index e74caf869..d037d61b0 100644 --- a/scripts/changelog/templates/PACKAGE +++ b/scripts/changelog/templates/PACKAGE @@ -1,10 +1,6 @@ # Changelog {% for release, changes in releases %} ## v{{ release }} -{%- if changes.summary %} - -{{ changes.summary }} -{%- endif %} {%- for type_name in ['breaking', 'feature', 'enhancement', 'bugfix'] %} {%- for change in changes.changes if change.type == type_name %} {%- if loop.first %} From c09cb4e43abe911f1a941f80cac175a09ab13e36 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Tue, 9 Sep 2025 14:09:04 -0400 Subject: [PATCH 16/18] Make version checks more consistent --- scripts/changelog/new-release.py | 5 +++-- scripts/changelog/render.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/changelog/new-release.py b/scripts/changelog/new-release.py index e1819fab8..94cabcfa6 100755 --- a/scripts/changelog/new-release.py +++ b/scripts/changelog/new-release.py @@ -8,11 +8,13 @@ import argparse import json +import re import sys from pathlib import Path from typing import Any PROJECT_ROOT_DIR = Path(__file__).resolve().parent.parent.parent +VERSION_PATTERN = r"^\d+\.\d+\.\d+$" def collect_next_release_changes(next_release_dir: Path) -> list[dict[str, Any]]: @@ -138,8 +140,7 @@ def main() -> int: args = parser.parse_args() # Basic version format validation - version_parts = args.version.split(".") - if len(version_parts) != 3 or not all(part.isdigit() for part in version_parts): + if not bool(re.match(VERSION_PATTERN, args.version)): print("Error: Version must be in format x.y.z (e.g., 1.2.3)") return 1 diff --git a/scripts/changelog/render.py b/scripts/changelog/render.py index c0eaf0ea4..c1a4131a5 100755 --- a/scripts/changelog/render.py +++ b/scripts/changelog/render.py @@ -18,12 +18,12 @@ TEMPLATES_DIR = PROJECT_ROOT_DIR / "scripts" / "changelog" / "templates" DEFAULT_TEMPLATE_NAME = "PACKAGE" -VERSION_PATTERN = r"^\d+\.\d+\.\d+\.json$" +VERSION_FILE_PATTERN = r"^\d+\.\d+\.\d+\.json$" def get_sorted_versions(changes_dir: Path) -> list[str]: """Get sorted list of version numbers from .changes directory.""" - version_pattern = re.compile(VERSION_PATTERN) + version_pattern = re.compile(VERSION_FILE_PATTERN) versions: list[str] = [] for file in changes_dir.iterdir(): From b1741df78aca57a266581db5fb51d29db96de5bc Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Thu, 11 Sep 2025 14:45:00 -0400 Subject: [PATCH 17/18] Fix implementation spelling typos --- designs/serialization.md | 2 +- .../next-release/smithy-aws-core-feature-20250904125834.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designs/serialization.md b/designs/serialization.md index 10858849b..db11bde7b 100644 --- a/designs/serialization.md +++ b/designs/serialization.md @@ -45,7 +45,7 @@ class ImplicitImplementation: return f"Good day to you {name}." ``` -Since this is *structural* subtyping, it isn't required that implmentations +Since this is *structural* subtyping, it isn't required that implementations actual inheret from the `Protocol` or otherwise declare that they're implementing it. But they *can* to make it more explicit or to inherit a default implementation. The `Protocol` class itself cannot be instantiated, however. diff --git a/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-feature-20250904125834.json b/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-feature-20250904125834.json index 3d6ae9ef0..01e81cfab 100644 --- a/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-feature-20250904125834.json +++ b/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-feature-20250904125834.json @@ -1,4 +1,4 @@ { "type": "feature", - "description": "Added a hand-written implmentation for the `restJson1` protocol." + "description": "Added a hand-written implementation for the `restJson1` protocol." } \ No newline at end of file From 91016b8a68073f8fef91a256937e461a8298e218 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Fri, 12 Sep 2025 14:52:10 -0400 Subject: [PATCH 18/18] Validate change type and description existence and values --- scripts/changelog/new-release.py | 34 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/scripts/changelog/new-release.py b/scripts/changelog/new-release.py index 94cabcfa6..df4ef534e 100755 --- a/scripts/changelog/new-release.py +++ b/scripts/changelog/new-release.py @@ -15,6 +15,23 @@ PROJECT_ROOT_DIR = Path(__file__).resolve().parent.parent.parent VERSION_PATTERN = r"^\d+\.\d+\.\d+$" +CHANGE_TYPES_ORDER = {"breaking": 0, "feature": 1, "enhancement": 2, "bugfix": 3} +CHANGE_TYPES = tuple(CHANGE_TYPES_ORDER.keys()) + + +def validate_change_entry(change_data: dict[str, Any], entry_file: Path) -> bool: + if "type" not in change_data or change_data["type"] not in CHANGE_TYPES: + print( + f"Error: Missing or invalid 'type' field in {entry_file}\n" + f"Type must be one of: {CHANGE_TYPES}" + ) + return False + + if "description" not in change_data or not change_data["description"]: + print(f"Error: Missing or empty 'description' field in {entry_file}") + return False + + return True def collect_next_release_changes(next_release_dir: Path) -> list[dict[str, Any]]: @@ -28,19 +45,18 @@ def collect_next_release_changes(next_release_dir: Path) -> list[dict[str, Any]] try: with open(entry_file) as f: change_data = json.load(f) + + # Validate required fields + if not validate_change_entry(change_data, entry_file): + sys.exit(1) + changes.append(change_data) except (OSError, json.JSONDecodeError) as e: - print(f"Warning: Could not process {entry_file}: {e}", file=sys.stderr) - continue + print(f"Error: Could not process {entry_file}: {e}", file=sys.stderr) + sys.exit(1) # Sort changes by type for consistent ordering - type_order = {"breaking": 0, "feature": 1, "enhancement": 2, "bugfix": 3} - changes.sort( - key=lambda c: ( - type_order.get(c.get("type", "enhancement"), 4), - c.get("description", ""), - ) - ) + changes.sort(key=lambda c: (CHANGE_TYPES_ORDER[c["type"]])) return changes