Skip to content

fix(http-httpx): export HttpxRequestAdapter and KiotaClientFactory from kiota_http package - #825

Open
Hardik K (hardikkaurani) wants to merge 2 commits into
microsoft:mainfrom
hardikkaurani:fix/http-httpx-package-exports
Open

Hardik K (hardikkaurani) wants to merge 2 commits into
microsoft:mainfrom
hardikkaurani:fix/http-httpx-package-exports

Conversation

@hardikkaurani

Copy link
Copy Markdown
Contributor

Description

  • Export HttpxRequestAdapter and KiotaClientFactory in packages/http/httpx/kiota_http/__init__.py and explicitly declare __all__.
    • Since kiota_http contains a py.typed marker (PEP 561), declaring __all__ enables typed consumer applications and IDEs to import directly from the top-level package (from kiota_http import HttpxRequestAdapter, KiotaClientFactory) without reportPrivateImportUsage or typing errors.
  • Fix duplicate word typo in packages/http/httpx/README.md ("to to make HTTP requests").
  • Add unit test in packages/http/httpx/tests/test_typing.py validating package exports.

@hardikkaurani
Hardik K (hardikkaurani) requested a review from a team as a code owner October 22, 2026 10:10
Copilot AI balanced review requested due to automatic review settings October 22, 2026 10:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@hardikkaurani

Hardik K (hardikkaurani) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi Vincent Biret (@baywet),

I've opened this PR for packages/http/httpx to export HttpxRequestAdapter and KiotaClientFactory from kiota_http/__init__.py and define an explicit __all__ list for the public API.

The PR also fixes a duplicate-word typo in the package README and adds test coverage for the new exports.

Whenever convenient, could you please take a look? Thanks for your time!


__version__ = VERSION

__all__ = [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should the observability options be in there?

@hardikkaurani Hardik K (hardikkaurani) Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, absolutely! I've added ObservabilityOptions to packages/http/httpx/kiota_http/__init__.py and included it in the explicit __all__ list in commit [d75e9ff](d75e9ff).

Callers can now import ObservabilityOptions directly from the top-level kiota_http package, alongside HttpxRequestAdapter and KiotaClientFactory.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused export changes have no identified blocking issues; the remaining test improvement is optional.

1 open issue

Review effort: Balanced

Comment thread packages/http/httpx/tests/test_typing.py
Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@hardikkaurani

Copy link
Copy Markdown
Contributor Author

Hi Vincent Biret (@baywet),

I have updated the PR in commit d75e9ff addressing the review feedback:

  1. Export ObservabilityOptions:

    • Added from .observability_options import ObservabilityOptions to packages/http/httpx/kiota_http/__init__.py and exported it via __all__. Callers can now import ObservabilityOptions directly from the top-level kiota_http package alongside HttpxRequestAdapter and KiotaClientFactory.
  2. Typing & Exports Test Coverage:

    • Updated test_package_exports() in packages/http/httpx/tests/test_typing.py to assert that all exported symbols (HttpxRequestAdapter, KiotaClientFactory, ObservabilityOptions, and __version__) are explicitly declared in kiota_http.__all__.
    • Added test_package_exports_typecheck() using MyPy's runner to verify that direct imports from kiota_http type-check cleanly.
  3. Status:

    • All 200 tests in packages/http/httpx pass cleanly.
    • Code rated 10.00/10 by Pylint, clean formatting with YAPF, and 0 MyPy typing issues.
    • All CI checks (SonarCloud, check-changelog, label-merge-conflicts, license/cla) are green and the branch is mergeable.

Ready for your review! Thank you!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused export changes and regression checks have no identified blocking issues; tests were not executed during this review.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@hardikkaurani

Copy link
Copy Markdown
Contributor Author

Vincent Biret (@baywet) Thanks a lot.

So happy to be the part of contributors list.

Learnt a lot from these code bases.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants