Skip to content

Closes #15 - Replaced requests with httpx#16

Merged
petruki merged 2 commits into
masterfrom
feat_15
Sep 20, 2025
Merged

Closes #15 - Replaced requests with httpx#16
petruki merged 2 commits into
masterfrom
feat_15

Conversation

@petruki
Copy link
Copy Markdown
Member

@petruki petruki commented Sep 20, 2025

This pull request modernizes the HTTP client used in the codebase by migrating from requests to httpx and updates the test suite to use pytest-httpx instead of responses. It also upgrades several GitHub Actions to their latest major versions and refreshes dependencies in the Pipfile. Additionally, a new contributing section is added to the README.md. The most important changes are grouped below:

Migration to httpx and test refactoring:

  • Replaced all usage of requests with httpx in switcher_client/lib/remote.py, introducing connection pooling and HTTP/2 support via a shared httpx.Client. All internal HTTP methods are now private and use the new client. [1] [2] [3] [4] [5]
  • Refactored tests to use pytest-httpx instead of responses, updating all test helpers and test cases in tests/test_client_load_snapshot_remote.py and tests/test_switcher_remote.py to use httpx_mock for mocking HTTP requests. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Dependency and workflow updates:

  • Updated Pipfile dependencies: replaced requests with httpx[http2], upgraded pytest, pytest-cov, and switched to pytest-httpx for HTTP mocking in tests.
  • Upgraded GitHub Actions in all workflow files (.github/workflows/*.yml) to use actions/checkout@v5 and actions/setup-python@v6 for improved reliability and security. [1] [2] [3] [4] [5]

Documentation:

  • Added a new "Contributing" section to README.md with clear instructions for new contributors and project requirements.

@petruki petruki self-assigned this Sep 20, 2025
@sonarqubecloud
Copy link
Copy Markdown

@petruki petruki merged commit c062f59 into master Sep 20, 2025
13 checks passed
@petruki petruki deleted the feat_15 branch September 20, 2025 23:40
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.

1 participant