diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2d0d8197..89840cc7 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -233,10 +233,10 @@ jobs: - name: Release uses: aio-libs/create-release@v1.6.6 with: - changes_file: CHANGES.rst + changes_file: CHANGES.md name: ${{ env.PROJECT_NAME }} github_token: ${{ secrets.GITHUB_TOKEN }} - head_line: "{version}\\s+\\({date}\\)\n====+\n?" + head_line: "## {version}\\s+\\({date}\\)" - name: >- Publish 🐍📦 to PyPI diff --git a/CHANGES.rst b/CHANGES.md similarity index 72% rename from CHANGES.rst rename to CHANGES.md index 4bce5f0e..fa092298 100644 --- a/CHANGES.rst +++ b/CHANGES.md @@ -1,247 +1,182 @@ -======= -Changes -======= +# Changes -.. + + + + +## 0.25.0 (2025-12-20) + +### Breaking Changes - Drop Python 3.9 support and add Python 3.14 support, updating dependencies such as aiohttp (minimum 3.8 to 3.10) and async-timeout (minimum to 5.0) for stdlib TaskGroup and timeout compatibility in Python 3.11+ (#976) - Replace `**kwargs` with explicit parameters in `DockerContainer.{stop,restart,kill,delete}()` methods, accepting `t` for server-side stop timeout and `timeout` for client-side request timeouts for consistency with other methods covered in the previous PRs #983 and #990; since this is a BREAKING CHANGE for those who have used the `timeout` argument for the `DockerContainer.restart()` method calls, the users should replace it with `t` to keep the intended semantics (#991) - -Bug Fixes ---------- +### Bug Fixes - Fix issue authenticating against private registries where the `X-Registry-Auth` header would require URL-safe substitutions. (#941) +### New Features -New Features ------------- - -- Add support for Docker context endpoints with TLS, reading configuration from ``~/.docker/contexts/`` and respecting ``DOCKER_CONTEXT`` environment variable and ``SkipTLSVerify`` option. (#811) +- Add support for Docker context endpoints with TLS, reading configuration from `~/.docker/contexts/` and respecting `DOCKER_CONTEXT` environment variable and `SkipTLSVerify` option. (#811) - Add SSH protocol support for secure connections to remote Docker instances via "ssh://" URLs with mandatory host key verification (#982) -- Introduce the client-level ``timeout`` configuration which becomes the base timeout configuration while still allowing legacy individual per-API timeouts and merging it into the base timeout. Now setting individual float (total) timeout per-API call is HIGHLY DISCOURAGED in favor of composable timeouts via stdlib's `asyncio.timeout()` async context manager. (#983) +- Introduce the client-level `timeout` configuration which becomes the base timeout configuration while still allowing legacy individual per-API timeouts and merging it into the base timeout. Now setting individual float (total) timeout per-API call is HIGHLY DISCOURAGED in favor of composable timeouts via stdlib's `asyncio.timeout()` async context manager. (#983) - -Miscellaneous -------------- +### Miscellaneous - Improve the CI workflows to expand the test matrix for aiohttp 3.10/3.13 releases and let tests use the prebuilt artifact to ensure consistency with the release (#980) - Isolate the docker instance for swarm and service tests via a docker-in-docker compose stack to avoid affecting the user environment (#981) - Apply the default cooldown period (7 days) to the dependabot configuration (#984) +## 0.24.0 (2024-11-21) -0.24.0 (2024-11-21) -=================== - -Features --------- +### Features - Added Python 3.13 support (#927) - Added timeout parameter for push method (#929) - -Bugfixes --------- +### Bugfixes - Fix `DockerImages.build()`, `DockerImages.pull()`, `DockerImages.push()` methods' incorrect return type declarations. (#909) - -Deprecations and Removals -------------------------- +### Deprecations and Removals - Removed Python 3.8 support as it has reached end of life. (#924) +## 0.23.0 (2024-09-23) -0.23.0 (2024-09-23) -=================== - -Features --------- +### Features - Introduce a sentinel value to `_do_query()` and its friend methods to allow configuring per-request infinite timeouts instead of always falling back to the session-level default timeout when setting the timeout argument to `None`, and add the timeout arguments to image-related API wrappers (#900) +## 0.22.2 (2024-07-18) -0.22.2 (2024-07-18) -=================== - -Bugfixes --------- - -- Use ``TYPE_CHECKING`` flag to avoid importing from ``typing_extensions`` at run time (#876) +### Bugfixes +- Use `TYPE_CHECKING` flag to avoid importing from `typing_extensions` at run time (#876) -0.22.1 (2024-07-05) -=================== +## 0.22.1 (2024-07-05) -Bugfixes --------- +### Bugfixes - Fix a missing removal of the legacy `AsyncCM` interface usage and update type annotations to avoid this in the future (#874) - -0.22.0 (2024-06-26) -=================== +## 0.22.0 (2024-06-26) NOTICE: This release drops support for Python 3.7 and older. Please upgrade your Python version or keep using prior releases. -Features --------- +### Features - Adds the force parameter to `DockerVolume.delete()` (#690) - Migrate from setuptools to hatch. To install the package and all dependencies, use "pip install .[dev,doc]". (#848) - -Bugfixes --------- +### Bugfixes - Support additional parameters in swarm init (#323) - Fixes unittests that don't run locally due to deprecations in later versions of Docker. Tested with 26.00, v1.45. (#849) - Fix never-awaited coroutines of `_AsyncCM` to close when handling errors (#861) - -Misc ----- +### Misc - #850 +## 0.22.0a1 (2024-05-21) -0.22.0a1 (2024-05-21) -===================== - -Features --------- +### Features - Add support for filters when listing networks. Add support for filters when listing volumes. Add get option for fetching volumes by name or id. (#623) - -Improved Documentation ----------------------- +### Improved Documentation - Update the documentation examples to use the modern `asyncio.run()` pattern and initialize `aiodocker.Docker()` instance inside async functions where there is a valid running event loop (#837) - -Deprecations and Removals -------------------------- +### Deprecations and Removals - Starting container with non-empty request body was deprecated since API v1.22 and removed in v1.24 (#660) - -Misc ----- +### Misc - #621, #748 +## 0.21.0 (2021-07-23) -0.21.0 (2021-07-23) -=================== - -Bugfixes --------- +### Bugfixes - Use ssl_context passed to Docker constructor for creating underlying connection to docker engine. (#536) - Fix an error when attach/exec when container stops before close connection to it. (#608) +## 0.20.0 (2021-07-21) -0.20.0 (2021-07-21) -=================== - -Bugfixes --------- +### Bugfixes - Accept auth parameter by `run()` method; it allows auto-pulling absent image from private storages. (#295) - Fix passing of JSON params. (#543) - Fix issue with unclosed response object in attach/exec. (#604) +## 0.19.1 (2020-07-09) -0.19.1 (2020-07-09) -=================== - -Bugfixes --------- +### Bugfixes - Fix type annotations for `exec.start()`, `docker.images.pull()`, `docker.images.push()`. Respect default arguments again. -0.19.0 (2020-07-07) -=================== +## 0.19.0 (2020-07-07) -Features --------- +### Features - Run mypy checks on the repo in the non-strict mode. (#466) -- Add ``container.rename()`` method. (#458) - +- Add `container.rename()` method. (#458) -Bugfixes --------- +### Bugfixes - Changed DockerNetwork.delete() to return True if successful (#464) +## 0.18.9 (2020-07-07) -0.18.9 (2020-07-07) -=================== - -Bugfixes --------- +### Bugfixes - Fix closing of the task fetching Docker's event stream and make it re-openable after closing (#448) - Fix type annotations for pull() and push() methods. (#465) - -Misc ----- +### Misc - #442 +## 0.18.8 (2020-05-04) -0.18.8 (2020-05-04) -=================== - -Bugfixes --------- - -- Don't send ``null`` for empty BODY. +### Bugfixes +- Don't send `null` for empty BODY. -0.18.7 (2020-05-04) -=================== +## 0.18.7 (2020-05-04) -Bugfixes --------- +### Bugfixes - Fix some typing errors +## 0.18.1 (2020-04-01) -0.18.1 (2020-04-01) -=================== - -Bugfixes --------- +### Bugfixes - Improve the error message when connection is closed by Docker Engine on TCP hijacking. (#424) +## 0.18.0 (2020-03-25) -0.18.0 (2020-03-25) -=================== - -Features --------- +### Features - Improve the error text message if cannot connect to docker engine. (#411) - Rename `websocket()` to `attach()` (#412) @@ -249,36 +184,25 @@ Features - Implement container commit, pause and unpause functionality. (#418) - Implement auto-versioning of the docker API by default. (#419) - -Bugfixes --------- +### Bugfixes - Fix volume.delete throwing a TypeError. (#389) +## 0.17.0 (2019-10-15) -0.17.0 (2019-10-15) -=================== - -Bugfixes --------- +### Bugfixes - Fixed an issue when the entire tar archive was stored in RAM while building the image. (#352) +## 0.16.0 (2019-09-23) -0.16.0 (2019-09-23) -=================== - -Bugfixes --------- +### Bugfixes - Fix streaming mode for pull, push, build, stats and events. (#344) +## 0.15.0 (2019-09-22) -0.15.0 (2019-09-22) -=================== - -Features --------- +### Features - Add support for Docker 17.12.1 and 18.03.1 (#164) - Add initial support for nodes. (#181) @@ -291,9 +215,7 @@ Features - Add ability to get a Docker network by name or ID. (#279) - Always close response after processing, make `.logs(..., follow=True)` async iterator. (#341) - -Bugfixes --------- +### Bugfixes - Fix: Set timeout for docker events to 0 (no timeout) (#115) - Fix: prevents multiple listener tasks to be created automatically (#116) @@ -307,16 +229,12 @@ Bugfixes - Fix: don't remove non-newline whitespace from multiplexed lines (#246) - Fix docker_context.tar error (#253) - -Deprecations and Removals -------------------------- +### Deprecations and Removals - docker.images.get has been renamed to docker.images.inspect, remove support for Docker 17.06 (#164) - Drop Python 3.5 (#338) - Drop deprecated container.copy() (#339) - -Misc ----- +### Misc - #28, #167, #192, #286 diff --git a/CHANGES/988.fix.md b/CHANGES/988.fix.md deleted file mode 100644 index 2897df14..00000000 --- a/CHANGES/988.fix.md +++ /dev/null @@ -1 +0,0 @@ -Add explicit `context` argument to the `Docker` instance constructor with explicit documentation for the arg/env/config precedence. diff --git a/CHANGES/990.fix b/CHANGES/990.fix deleted file mode 100644 index 0152ea21..00000000 --- a/CHANGES/990.fix +++ /dev/null @@ -1 +0,0 @@ -Add timeout parameter to long-running operations (build, import_image, export_image, log, attach, stats) with infinite timeout defaults, and fix timeout handling to set both total and sock_read consistently. diff --git a/CHANGES/README.md b/CHANGES/README.md new file mode 100644 index 00000000..67d168b4 --- /dev/null +++ b/CHANGES/README.md @@ -0,0 +1,59 @@ +# Adding a Changelog Entry + +This project uses [towncrier](https://pypi.org/project/towncrier/) to manage the changelog. + +## Creating a News Fragment + +When you make a change that should be included in the changelog, create a new file in this directory with the following naming convention: + +``` +..md +``` + +### Types + +The valid types are: + +- `breaking` - Breaking changes +- `bugfix` - Bug fixes +- `feature` - New features +- `misc` - Miscellaneous changes + +### Examples + +``` +123.bugfix.md +456.feature.md +789.breaking.md +``` + +### Content + +The file should contain a **single line** (or sentence) describing the change in **markdown format**. The line should be concise and focused on the change itself. Do not add issue numbers in the content; they will be automatically appended. + +Example content for `123.bugfix.md`: +```markdown +Fix issue authenticating against private registries where the `X-Registry-Auth` header would require URL-safe substitutions. +``` + +Note: The issue/PR number will be automatically added from the filename. + +Example content for `456.feature.md`: +```markdown +Add support for Docker context endpoints with TLS, reading configuration from `~/.docker/contexts/` and respecting `DOCKER_CONTEXT` environment variable. +``` + +### Guidelines + +- Use markdown formatting (e.g., backticks for code, etc.) +- Keep it to a single sentence (break into multiple sentences if needed, but avoid making it too long) +- Focus on what changed and why, not implementation details +- Reference issue/PR numbers at the end in parentheses if applicable + +### Building the Changelog + +The changelog is automatically built during the release process. To preview what the changelog will look like, run: + +```bash +uv run towncrier build --draft +``` diff --git a/MANIFEST.in b/MANIFEST.in index a7326a12..4ddcafe4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ include LICENSE include README.rst -include CHANGES.rst +include CHANGES.md include CONTRIBUTORS.txt include Makefile include tox.ini diff --git a/pyproject.toml b/pyproject.toml index ab87f023..4c10fcfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,9 +63,9 @@ source = "vcs" [tool.towncrier] package = "aiodocker" -filename = "CHANGES.rst" +filename = "CHANGES.md" directory = "CHANGES" -title_format = "{version} ({project_date})" +title_format = "## {version} ({project_date})" [[tool.towncrier.type]] directory = "breaking"