diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a40821..76822e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [8.0.1] - 2025-06-04 +### Fixed +- Fix type disagreement for `required_headers` in service code + ## [8.0.0-post.1] - 2024-10-28 ### Changed - Modernize package quality tooling and configuration diff --git a/pyproject.toml b/pyproject.toml index 3105dd7..1eca8a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "apiron" -version = "8.0.0-post.1" +version = "8.0.1" description = "apiron helps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP." authors = [ { name = "Ithaka Harbors, Inc.", email = "opensource@ithaka.org" }, diff --git a/src/apiron/service/base.py b/src/apiron/service/base.py index 344e523..27f795f 100644 --- a/src/apiron/service/base.py +++ b/src/apiron/service/base.py @@ -1,5 +1,3 @@ -from typing import Any - from apiron import Endpoint @@ -20,10 +18,21 @@ def __repr__(cls) -> str: class ServiceBase(metaclass=ServiceMeta): - required_headers: dict[str, Any] = {} auth = () proxies: dict[str, str] = {} + @property + def required_headers(self) -> dict[str, str]: + """ + The headers that are required to be present in requests to this service. + + :return: + A dictionary of header names and their expected values + :rtype: + dict + """ + return {} + @classmethod def get_hosts(cls) -> list[str]: """