Skip to content

add TRIO212: sync call on httpx.Client, move type-tracking logic - #118

Merged
Zac-HD merged 1 commit into
python-trio:mainfrom
jakkdl:trio212_httpx_client
Feb 1, 2023
Merged

Zac-HD merged 1 commit into
python-trio:mainfrom
jakkdl:trio212_httpx_client

Conversation

@jakkdl

@jakkdl jakkdl commented Jan 31, 2023

Copy link
Copy Markdown
Member

Ticks another box in #58

All the code ... just worked .. on the first try?? I got so paranoid about the testing infrastructure being broken, but nope - turns out I was just writing correct code over and over.

Not the prettiest class structure since the type-tracking class can't be reused for classes that don't want to inherit from Visitor200, but I'll fix that if/when I want to do that. Or does nurseries want this functionality? Or anything else?

The diff looks relatively large because a big chunk of code is moved without being modified, but this should otherwise be pretty straightforward to review.

@jakkdl jakkdl changed the title add TRIO212, move out type-tracking logic from TRIO232 to TypeTrackerVisitor200 add TRIO212: sync call on httpx.Client, move type-tracking logic Jan 31, 2023
@jakkdl jakkdl mentioned this pull request Jan 31, 2023
10 of 12 tasks
@jakkdl
jakkdl force-pushed the trio212_httpx_client branch from 270017b to 9433051 Compare January 31, 2023 13:43
@jakkdl

jakkdl commented Jan 31, 2023 •

Copy link
Copy Markdown
Member Author

CI found a typo in eval_files/trio232.py, that I think got missed by tests not being rerun on the TRIO232 PR after codespell was added to pre-commit (and it wasn't merged when codespell was run manually in #113). So that's also randomly fixed

@jakkdl
jakkdl force-pushed the trio212_httpx_client branch from 9433051 to 7d78fa7 Compare January 31, 2023 14:05
@jakkdl

jakkdl commented Jan 31, 2023

Copy link
Copy Markdown
Member Author

Also added urllib3 pools. Didn't add explicit blocking methods on those since they're so many, but presumably there might be some. (Though probably easier to add a whitelist of allowed method calls).
Not the prettiest code, but should be fine enough.

@Zac-HD Zac-HD left a comment

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.

🚀

@Zac-HD
Zac-HD merged commit 6d1224e into python-trio:main Feb 1, 2023
@Zac-HD

Zac-HD commented Feb 1, 2023

Copy link
Copy Markdown
Member

Nice! I'll aim to release in the next few days.

@jakkdl
jakkdl deleted the trio212_httpx_client branch February 1, 2023 11:17
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.

2 participants