Skip to content

Unasync'ed base dispatchers - #742

Closed
florimondmanca wants to merge 2 commits into
masterfrom
unasynced-base-dispatchers
Closed

florimondmanca wants to merge 2 commits into
masterfrom
unasynced-base-dispatchers

Conversation

@florimondmanca

Copy link
Copy Markdown
Contributor

Refs #722

First smoll step towards unasync'ing HTTPX…: unasync AsyncDispatcher into SyncDispatcher. Allows us to setup the tooling and avoid impacting any public piece of API.

Mostly done, but marking as a draft as this is probably only worth considering once 0.11 is out…

@florimondmanca florimondmanca added the refactor Issues and PRs related to code refactoring label Jan 8, 2020
@florimondmanca

Copy link
Copy Markdown
Contributor Author

Just tried it out locally… the build works 👍

$ pip install "git+https://github.com/encode/httpx.git@unasynced-base-dispatchers"
$ python
Python 3.8.0 (default, Oct 16 2019, 18:21:21)
[Clang 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import httpx
>>> r = httpx.get('https://www.google.com')
>>> httpx._sync.dispatch.base.SyncDispatcher
<class 'httpx._sync.dispatch.base.SyncDispatcher'>
>>> httpx.dispatch.base.SyncDispatcher
<class 'httpx._sync.dispatch.base.SyncDispatcher'>
>>>

Comment thread requirements.txt
pytest-cov
trio
trustme
unasync==0.4.*

@florimondmanca florimondmanca Jan 8, 2020 •

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.

That's a bit funny, but listing unasync in the build-system.requires entry doesn't actually install it in a way that's available to the Python interpreter. I don't know when/where those dependencies are installed exactly — probably managed by pip in an opaque location…?

@florimondmanca

florimondmanca commented Jan 8, 2020 •

Copy link
Copy Markdown
Contributor Author

Ah yes, the build will fail until python-trio/unasync@2c2c9b7 gets released. 😄 (I had a patched version of unasync installed locally.)

@florimondmanca

Copy link
Copy Markdown
Contributor Author

Closing, we can revisit if/when moving forward on this in httpcore…

@florimondmanca
florimondmanca deleted the unasynced-base-dispatchers branch January 30, 2020 20:45
Kludex referenced this pull request in pydantic/httpx2 May 11, 2026
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.1 to 7.4.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@7.3.1...7.4.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Issues and PRs related to code refactoring

Development

Successfully merging this pull request may close these issues.

1 participant