Skip to content

Releases: eth-library/oaipmh

v3.2.0 — Typed HTTP retry exceptions

15 May 18:02
Immutable release. Only release title and notes can be modified.
47d51e6

Choose a tag to compare

Added

  • RateLimitedError, ServiceUnavailableError, and NetworkError exception classes for typed handling of HTTP 429, 503, and transport-level failures. All three preserve existing except catch sites via inheritance.
  • max-inline-sleep retry-policy key (default 300 s), configurable via custom_retry_policy; a 503 whose Retry-After exceeds the cap raises instead of sleeping inline.

Changed

  • HTTP 429 raises RateLimitedError immediately instead of falling through as a raw HTTPError.
  • urllib.error.URLError is caught and re-raised as NetworkError.
  • Replace e.hdrs with e.headers in retrieveFromUrlWaiting().
  • Chain re-raised exceptions with raise ... from in client.py, server.py, and datestamp.py so tracebacks show the original cause (Ruff B904 / PEP 3134).
  • Build the published wheel inside the project's Nix flake devShell (publish.yml). Pure-Python source semantics unchanged; published artifact bytes may differ across releases due to build-toolchain provenance.
  • Development tooling and CI infrastructure improvements:
    • lint: Add Ruff as the Python lint and format gate via pre-commit (#18)
    • style: Repo-wide ruff format pass (#20)
    • chore: pre-commit hook for flake.lock drift detection (#25)
    • ci: Nix flake devShells for CI and publish workflows (#22)
    • ci: Centralise Nix-store and uv-wheel caches via composite Actions (#24)
    • refactor: Split flake.nix into flake-parts modules; nixfmt-rfc-style formatting and treefmt hook (#31)

Deprecated

  • Passing 429 or 503 in a caller-supplied expected-errcodes set now emits DeprecationWarning; catch the typed exceptions instead.

v3.1.0 — Python 3.14 support

23 Apr 11:34
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Minor release adding Python 3.14 to the supported matrix. No API or runtime changes — existing 3.0.x consumers can upgrade without code changes.

Added

  • Python 3.14 support. Added to the pyproject.toml trove classifiers and to the CI matrix; the test suite runs green on CPython 3.10 – 3.14.

Security

  • GitHub Actions in ci.yml and publish.yml pinned to full commit SHAs instead of mutable tags.

Maintenance (no downstream impact)

  • Nix development shell bumped to Python 3.14, with uv pinned to the Nix-provided interpreter.
  • Dependabot configuration added for GitHub Actions and uv dependency updates.

Full changelog: https://github.com/eth-library/oaipmh/blob/v3.1.0/CHANGELOG.md
Compare: v3.0.1...v3.1.0

v3.0.1 — Embed README as PyPI long description

15 Apr 21:33
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Patch release fixing the empty project body on the PyPI page for oaipmh 3.0.0. Pure packaging-metadata fix — no code or API changes.

Fixed

  • Embed README.md as the project's long description on PyPI. The PEP 621 readme field was missing from pyproject.toml, so the oaipmh 3.0.0 page on PyPI showed an empty body. No code or API changes; this is a packaging-metadata-only fix.

Full changelog: https://github.com/eth-library/oaipmh/blob/v3.0.1/CHANGELOG.md
Compare: v3.0.0...v3.0.1

v3.0.0 — Modernized maintenance fork of infrae/pyoai

15 Apr 20:40
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

oaipmh 3.0.0 is the first release of the ETH Library's maintenance fork of infrae/pyoai. The PyPI distribution has been renamed pyoaioaipmh; the import path (from oaipmh import ...) and the public API are unchanged, so existing consumers only need to swap the dependency name.

Why this fork

pyoai is a long-standing OAI-PMH client and server library used by many digital-library, archive, and GLAM systems to harvest and expose bibliographic metadata. Upstream went quiet in March 2022, and without an active maintainer the library has been falling behind modern Python, so we picked it up to keep it going.

Full change detail follows; see CHANGELOG.md for historical entries.


[3.0.0] — 2026-04-15

First release under the oaipmh distribution name on PyPI. This release marks the maintenance fork from infrae/pyoai and brings the codebase onto modern Python packaging and tooling. The public API and the from oaipmh import ... import path are unchanged.

Breaking Changes

  • Renamed PyPI distribution from pyoai to oaipmh. Existing consumers must update their dependency declarations; no application code changes are required.
  • Minimum supported Python version raised to 3.10. Python 2 and Python 3.9 and earlier are no longer supported.
  • Removed the six dependency; the package now relies exclusively on native Python 3 APIs.

Added

  • PEP 621 metadata in pyproject.toml with Hatchling as the build backend.
  • uv.lock for reproducible dependency resolution.
  • uv-based GitHub Actions CI covering Python 3.10 – 3.13.
  • GitHub Actions workflow (publish.yml) for automated PyPI publishing via Trusted Publishing (OIDC; no long-lived tokens stored in the repository).
  • Reproducible development environment via a Nix flake and direnv integration.
  • pytest configuration replacing the legacy runtests.sh entry point.
  • CONTRIBUTING.md with development setup, commit conventions, and the release process.
  • CHANGELOG.md (this file), superseding HISTORY.txt.
  • ETH Library — Data Science and Research Support <[email protected]> maintainer entry alongside the existing Jaime Cardozo entry.

Changed

  • Build backend migrated from legacy setup.py / setup.cfg to Hatchling via pyproject.toml.
  • Development status classifier raised from 4 - Beta to 5 - Production/Stable.
  • Version jumped from 2.5.2pre to 3.0.0 to reflect the breaking distribution rename and the Python version floor.
  • README rewritten and expanded; converted from reStructuredText (README.rst) to Markdown (README.md).
  • License file renamed from LICENSE.txt to LICENSE and prepended with an ETH Zurich copyright notice alongside the original Infrae notice.
  • Wheel and sdist contents scoped via explicit tool.hatch.build include/exclude lists, so consumers no longer receive test fixtures or local development files.
  • Bare imports inside the package converted to relative imports.

Fixed

  • Replaced deprecated datetime.utcnow() with timezone-aware datetime.now(timezone.utc) equivalents (Python 3.12+ deprecation).
  • Replaced lxml.etree.XPath.evaluate() calls with direct callable syntax for compatibility with lxml 5.x.
  • Replaced unicode() with str() for Python 3 compatibility.
  • Replaced pkg_resources with importlib.metadata for distribution version lookup.
  • Replaced removed unittest assertion aliases dropped in Python 3.12.
  • Removed the unittest.makeSuite helper, which was dropped in Python 3.13.
  • Renamed the internal test helper TestError to FakeRequestError to avoid pytest's PytestCollectionWarning on classes prefixed with Test.

Removed

  • Python 2 compatibility shims across the package and tests.
  • six dependency.
  • Legacy packaging files: setup.py, setup.cfg, tox.ini, MANIFEST.in, and .travis.yml.
  • runtests.sh (replaced by pytest).
  • Non-functional Python 2 data generation scripts.
  • Outdated doc/ directory.
  • Legacy Mercurial files.
  • HISTORY.txt (content migrated to this file).