Skip to content

Tighten up top-level API to only expose public API - #608

Merged
lovelydinosaur merged 3 commits into
masterfrom
tighten-up-top-level-api
Dec 6, 2019
Merged

lovelydinosaur merged 3 commits into
masterfrom
tighten-up-top-level-api

Conversation

@lovelydinosaur

@lovelydinosaur lovelydinosaur commented Dec 6, 2019 •

Copy link
Copy Markdown
Member

Drops various private API from the top-level API.

We should recommend that our users only import the top-level httpx package, rather than importing sub-modules, in order to help guide them towards public API only.

Eg.

✅ Approved usage:

import httpx
httpx.URL(...)

⚠️ Uh-oh:

from httpx.models import URL
URL(...)

Refs #606

@florimondmanca
florimondmanca self-requested a review December 6, 2019 12:51

@florimondmanca florimondmanca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, just a suggestion not to refactor/drop HTTPProxyMode here just yet?

Comment thread httpx/dispatch/proxy_http.py
@lovelydinosaur lovelydinosaur mentioned this pull request Dec 6, 2019
2 tasks done

@florimondmanca florimondmanca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤘

@lovelydinosaur
lovelydinosaur merged commit d15dc0b into master Dec 6, 2019
@lovelydinosaur
lovelydinosaur deleted the tighten-up-top-level-api branch December 6, 2019 15:20
Kludex referenced this pull request in pydantic/httpx2 May 11, 2026
* Version 0.16.1

* Add dates to releases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants