From eda7ccecf21c04aec51ed83e07b8206dc28322fd Mon Sep 17 00:00:00 2001 From: baraline Date: Mon, 23 Nov 2026 10:02:57 +0100 Subject: [PATCH] Release 0.6.11: the version, the skill stamps and the changelog section, with the pending-reason, retry, non-JSON and v1 session entries under one Added and one Fixed heading. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 47 +++++++++---------- glpi_python_client/__init__.py | 2 +- pyproject.toml | 2 +- skills/glpi-asset-workflow/SKILL.md | 2 +- skills/glpi-client-setup/SKILL.md | 2 +- skills/glpi-contract-workflow/SKILL.md | 2 +- skills/glpi-document-workflow/SKILL.md | 2 +- skills/glpi-knowledge-base/SKILL.md | 2 +- skills/glpi-plugin-fields/SKILL.md | 2 +- skills/glpi-reporting-and-context/SKILL.md | 2 +- skills/glpi-team-members/SKILL.md | 2 +- skills/glpi-ticket-timeline/SKILL.md | 2 +- skills/glpi-ticket-workflow/SKILL.md | 2 +- .../glpi-user-location-provisioning/SKILL.md | 2 +- 14 files changed, 35 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ec62f..c8e9418 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,12 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). -## Unreleased +## 0.6.11 — 2026-11-23 + +Pending reasons, a setting that turns the automatic retries off, a typed error +for a success response whose body is not JSON, and v1 session renewals that +run once under concurrency. Retries behave as before unless the new setting is +passed. ### Added @@ -20,6 +25,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). it and does not change the ticket status. - **`PendingReason` and `PendingReasonItem`** read models, exported from the package root and from `glpi_python_client.models`. +- **`max_retries` and `retry_wait_seconds`** on both clients, on + `GLPITokenManager` and `GLPIV1Session`, and as `GLPI_MAX_RETRIES` and + `GLPI_RETRY_WAIT_SECONDS` for `from_env`. `max_retries` counts the retries + after the first attempt: the default `2` keeps today's 3 attempts, `0` + disables retrying, so a failing call raises after exactly one request. + `retry_wait_seconds` is the pause between attempts (default 3 seconds). The + setting applies to every retried call: the v2 verbs, the v1 session helpers + and OAuth token acquisition. Which errors are retried (network faults and + 5xx) is unchanged. +- **`GlpiResponseBodyError`**, exported from the package root. + ### Fixed - **A success response whose body is not JSON now raises `GlpiProtocolError` @@ -35,29 +51,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). them (204, `DELETE`, v1 calls without a payload) are unchanged; an empty 200 on a route that must return JSON raises the same error. The lenient helpers `response_json_or_empty` and `response_json_mapping` keep an - empty or whitespace-only body as empty but now raise the same error for a non-empty body that - is not JSON; the new error is a `ValueError` subclass like the one it - replaces, so existing `except ValueError` handlers still catch it. - -### Added - -- **`GlpiResponseBodyError`**, exported from the package root. -A new client setting turns the automatic retries off. Behaviour is unchanged -unless it is set. - -### Added - -- **`max_retries` and `retry_wait_seconds`** on both clients, on - `GLPITokenManager` and `GLPIV1Session`, and as `GLPI_MAX_RETRIES` and - `GLPI_RETRY_WAIT_SECONDS` for `from_env`. `max_retries` counts the retries - after the first attempt: the default `2` keeps today's 3 attempts, `0` - disables retrying, so a failing call raises after exactly one request. - `retry_wait_seconds` is the pause between attempts (default 3 seconds). The - setting applies to every retried call: the v2 verbs, the v1 session helpers - and OAuth token acquisition. Which errors are retried (network faults and - 5xx) is unchanged. -### Fixed - + empty or whitespace-only body as empty but now raise the same error for a + non-empty body that is not JSON; the new error is a `ValueError` subclass + like the one it replaces, so existing `except ValueError` handlers still + catch it. - **Concurrent renewals of the legacy v1 session.** A client shared by concurrent tasks or threads renewed the v1 session once per request that found the token stale (every 15 minutes by default), on the first lazy @@ -66,7 +63,7 @@ unless it is set. one server-side session leaked per renewal. Every acquisition now takes a lock and re-checks under it whether the work is still needed, so waiters reuse the token the first renewal obtained and the session is killed and - opened once. Retry behaviour is unchanged. + opened once. ## 0.6.10 — 2026-11-16 diff --git a/glpi_python_client/__init__.py b/glpi_python_client/__init__.py index 3507f8f..e300b4a 100644 --- a/glpi_python_client/__init__.py +++ b/glpi_python_client/__init__.py @@ -145,7 +145,7 @@ date_window, ) -__version__ = "0.6.10" +__version__ = "0.6.11" __all__ = [ "AsyncGlpiClient", diff --git a/pyproject.toml b/pyproject.toml index 82301b9..dae3d99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ exclude = [ [project] name = "glpi-python-client" -version = "0.6.10" +version = "0.6.11" description = "A typed Python client for GLPI ITSM APIs." readme = "README.md" requires-python = ">=3.11" diff --git a/skills/glpi-asset-workflow/SKILL.md b/skills/glpi-asset-workflow/SKILL.md index 3bfa6cc..62b8b39 100644 --- a/skills/glpi-asset-workflow/SKILL.md +++ b/skills/glpi-asset-workflow/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to the GLPI v2 API, and credentials allowed to read or write assets." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Asset Workflow diff --git a/skills/glpi-client-setup/SKILL.md b/skills/glpi-client-setup/SKILL.md index 7e64761..d8bb2d4 100644 --- a/skills/glpi-client-setup/SKILL.md +++ b/skills/glpi-client-setup/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to a GLPI v2 API, and valid GLPI credentials." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Client Setup diff --git a/skills/glpi-contract-workflow/SKILL.md b/skills/glpi-contract-workflow/SKILL.md index 3599a5e..d80275f 100644 --- a/skills/glpi-contract-workflow/SKILL.md +++ b/skills/glpi-contract-workflow/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to the GLPI v2 API, and credentials allowed to read or write contracts." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Contract Workflow diff --git a/skills/glpi-document-workflow/SKILL.md b/skills/glpi-document-workflow/SKILL.md index a99571d..7a734b9 100644 --- a/skills/glpi-document-workflow/SKILL.md +++ b/skills/glpi-document-workflow/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to the GLPI v2 API, and v1 credentials configured on the client for binary uploads." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Document Workflow diff --git a/skills/glpi-knowledge-base/SKILL.md b/skills/glpi-knowledge-base/SKILL.md index feb786b..358b514 100644 --- a/skills/glpi-knowledge-base/SKILL.md +++ b/skills/glpi-knowledge-base/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to the GLPI v2 API, and — for category writes only — a legacy v1 session (v1_base_url + v1_user_token)." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Knowledge Base diff --git a/skills/glpi-plugin-fields/SKILL.md b/skills/glpi-plugin-fields/SKILL.md index dfbd2bd..d112ed8 100644 --- a/skills/glpi-plugin-fields/SKILL.md +++ b/skills/glpi-plugin-fields/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, the GLPI Fields plugin installed server-side, and a legacy v1 session (v1_base_url + v1_user_token) — every method in this family goes over the v1 API." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Plugin Fields diff --git a/skills/glpi-reporting-and-context/SKILL.md b/skills/glpi-reporting-and-context/SKILL.md index 8c7bbf6..09c19ef 100644 --- a/skills/glpi-reporting-and-context/SKILL.md +++ b/skills/glpi-reporting-and-context/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to the GLPI v2 API, and credentials allowed to read tickets, tasks, users, entities, and timeline records." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Reporting And Context diff --git a/skills/glpi-team-members/SKILL.md b/skills/glpi-team-members/SKILL.md index 3b2cd5b..bb9e818 100644 --- a/skills/glpi-team-members/SKILL.md +++ b/skills/glpi-team-members/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to the GLPI v2 API, and credentials allowed to manage ticket teams." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Team Members diff --git a/skills/glpi-ticket-timeline/SKILL.md b/skills/glpi-ticket-timeline/SKILL.md index 8f02b07..c92b82f 100644 --- a/skills/glpi-ticket-timeline/SKILL.md +++ b/skills/glpi-ticket-timeline/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, and network access to the GLPI v2 API." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Ticket Timeline diff --git a/skills/glpi-ticket-workflow/SKILL.md b/skills/glpi-ticket-workflow/SKILL.md index d1e3be8..429363f 100644 --- a/skills/glpi-ticket-workflow/SKILL.md +++ b/skills/glpi-ticket-workflow/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to the GLPI v2 API, and credentials accepted by GlpiClient." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI Ticket Workflow diff --git a/skills/glpi-user-location-provisioning/SKILL.md b/skills/glpi-user-location-provisioning/SKILL.md index 6d93231..75909ab 100644 --- a/skills/glpi-user-location-provisioning/SKILL.md +++ b/skills/glpi-user-location-provisioning/SKILL.md @@ -5,7 +5,7 @@ license: MIT compatibility: "Requires Python 3.11+, glpi-python-client, network access to the GLPI v2 API, and credentials allowed to read or write users, locations, and entities." metadata: package: glpi-python-client - version: "0.6.10" + version: "0.6.11" --- # GLPI User, Location, And Entity Provisioning