-
Notifications
You must be signed in to change notification settings - Fork 7
APP-5243: Migrate to httpx
(goodbye requests
👋 )
#679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
4a1f567
to
82d2354
Compare
652804a
to
3ba2a99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Migrates the SDK from requests
to httpx
(using httpx-retries
) and drops Python 3.8 support, updating tests, dependencies, and CI workflows accordingly.
- Refactored
AtlanClient
to usehttpx.Client
withRetryTransport
and new timeout/streaming logic - Updated unit and integration tests to mock and assert against
httpx
behavior - Removed
requests
from dependencies, bumpedrequires-python
to ≥ 3.9, and adjusted GitHub Actions to no longer test on 3.8
Reviewed Changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tests/unit/test_query_client.py | Adapted mocks to support httpx streaming and reading |
tests/unit/test_file_client.py | Updated mocks and assertions for httpx file streaming |
tests/unit/test_base_vcr_yaml.py | Replaced requests calls with httpx equivalents |
tests/unit/test_base_vcr_json.py | Replaced requests calls with httpx equivalents |
tests/integration/test_index_search.py | Swapped requests exceptions and imports for httpx |
requirements-dev.txt | Removed legacy dev requirements file |
pyproject.toml | Dropped Python 3.8, removed requests , added httpx |
pyatlan/client/common.py | Switched retry import from urllib3 to httpx-retries |
pyatlan/client/atlan.py | Refactored client setup, API calls, timeout and streams |
pyatlan/client/asset.py | Wrapped retry errors in _wait_till_deleted |
.github/workflows/pyatlan-test-cron.yaml | Updated Python matrix to ≥ 3.9 |
.github/workflows/pyatlan-publish.yaml | Changed uv sync to omit dev dependencies |
.github/workflows/pyatlan-pr.yaml | Dropped 3.8 from PR and vulnerability-scan inputs |
.github/workflows/build_and_upload_conda_packages.yaml | Removed 3.8 from conda build matrix |
Comments suppressed due to low confidence (1)
.github/workflows/pyatlan-pr.yaml:40
- [nitpick] Changing the vulnerability-scan
inputs
to scan the entire workspace may include unintended files. Specify the exact dependency files (e.g., requirements lock files) to limit the scan surface and reduce noise.
inputs: .
- Removed requirements files - Updated GitHub workflows for Docker image builds to use `uv sync` (without dev dependencies) - Breaking change: Dropped support for Python 3.8 (httpx-retries requires Python ≥ 3.9)
- Fixed local imports due to recent refactoring.
…d `AysncApiCaller` for all aio clients
… `workflow_client` tests
attr_def = attr_cache_by_id.get(attr_id) | ||
if not attr_def: | ||
raise ErrorCode.CM_ATTR_NOT_FOUND_BY_ID.exception_with_parameters(attr_id) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Incorrect Return Type Annotations in Metadata Cache
The static methods get_attr_id_for_name
and get_attribute_def
in CustomMetadataCacheCommon
have incorrect return type annotations. Both are declared to return a tuple[..., bool]
but only return the first element of the tuple, leading to type checking errors and potential runtime issues.
uv sync
(without dev dependencies)Other
v8
Release Tasks:(explore label-based test runs for async tests)
✨ Description
Briefly explain the purpose of this PR and what it covers. Mention any related issues or Jira tickets.
Jira link:
🧩 Type of change
Select all that apply:
✅ How has this been tested? (e.g. screenshots, logs, workflow links)
Describe how the change was tested. Include:
📋 Checklist