Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 22 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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`
Expand All @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion glpi_python_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
date_window,
)

__version__ = "0.6.10"
__version__ = "0.6.11"

__all__ = [
"AsyncGlpiClient",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-asset-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-client-setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-contract-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-document-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-knowledge-base/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-plugin-fields/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-reporting-and-context/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-team-members/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-ticket-timeline/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-ticket-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion skills/glpi-user-location-provisioning/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading