Skip to content

Release of 3.0.0#49

Merged
zulquer merged 10 commits intomasterfrom
PTHMINT-100
Mar 5, 2026
Merged

Release of 3.0.0#49
zulquer merged 10 commits intomasterfrom
PTHMINT-100

Conversation

@zulquer
Copy link
Collaborator

@zulquer zulquer commented Mar 5, 2026

This pull request prepares for the 3.0.0 major release, introducing a transport abstraction layer and updating dependency and documentation to support customizable HTTP transports. The changes also include a version bump and adoption of modern Python typing.

New features and transport abstraction:

  • Introduced a transport abstraction layer with HTTPTransport and RequestsTransport classes, enabling users to inject custom HTTP transports.
  • Added example implementations for popular HTTP libraries (httpx, requests.Session, and urllib3) to demonstrate transport customization.
  • Added an optional requests extra in dependency metadata to support transport usage.

SDK and typing improvements:

  • Refactored the Sdk class and client request flow to support custom transport injection.
  • Updated codebase to use PEP 585 built-in generics for type annotations.

Documentation and release:

  • Updated the README with documentation and examples for transport customization.
  • Bumped package version to 3.0.0 in pyproject.toml to reflect breaking changes.

zulquer and others added 7 commits March 5, 2026 15:12
Add a pluggable HTTP transport layer so callers can inject custom HTTP clients. Introduces src/multisafepay/transport (HTTP transport interface, RequestsTransport and underlying http transport), updates SDK and client to accept/select a transport, and adds example transports for httpx, requests.Session and urllib3 (including a response adapter). Includes new unit/e2e tests and test helpers for transport selection and mocks, plus minor README/pyproject tweaks.
Annotate client methods' context parameter as Optional[dict[str, Any]] and standardize parameter/type annotations in HTTPTransport and RequestsTransport docstrings (consistently use parenthetical param types and shorter, PEP-484-like type expressions). These edits improve typing clarity and make the transport docs consistent and easier to read.
Add copyright, Open Software License (OSL) v3.0 and disclaimer header comments to several test and support modules for legal/attribution purposes. Affected files: tests/multisafepay/e2e/examples/transport/test_custom_httpx_transport.py, tests/multisafepay/e2e/examples/transport/test_custom_requests_session_transport.py, tests/multisafepay/e2e/examples/transport/test_custom_urllib3_transport.py, tests/multisafepay/unit/transport/test_unit_transport_selection.py, tests/support/alt_http_transports.py, tests/support/mock_transport.py. No functional code changes.
Expand README with an optional HTTP transport section detailing the transport abstraction, how to use the built-in RequestsTransport (multisafepay[requests]) or provide a custom transport, and a small example. Update example import to use from multisafepay import Sdk. Tweak RequestsTransport's ModuleNotFoundError message to also suggest installing requests directly. Update poetry.lock to reflect the new optional extra and lockfile checksum.
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.81%. Comparing base (ee15a54) to head (52c1810).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #49   +/-   ##
=======================================
  Coverage   90.81%   90.81%           
=======================================
  Files         147      147           
  Lines        2579     2579           
=======================================
  Hits         2342     2342           
  Misses        237      237           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares the 3.0.0 major release of the MultiSafepay Python SDK by bumping the version number and adding the corresponding changelog entry. The actual code changes (transport abstraction layer, PEP 585 generics, README updates) were presumably merged in prior PRs.

Changes:

  • Version bumped from 2.2.0 to 3.0.0 in pyproject.toml
  • Added a [3.0.0] - 2026-03-05 changelog entry documenting the transport abstraction layer, PEP 585 generics adoption, and SDK refactoring

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Version bump from 2.2.0 to 3.0.0
CHANGELOG.md New changelog entry for 3.0.0 documenting added transport abstraction, PEP 585 generics, and SDK refactoring

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

danielcivit and others added 2 commits March 5, 2026 16:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@zulquer zulquer merged commit 55b50ee into master Mar 5, 2026
5 checks passed
@zulquer zulquer deleted the PTHMINT-100 branch March 5, 2026 16:25
@danielcivit danielcivit restored the PTHMINT-100 branch March 5, 2026 16:26
@danielcivit danielcivit deleted the PTHMINT-100 branch March 5, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants