Skip to content

Add TRIO23x, sync IO call in async function - #101

Merged
Zac-HD merged 1 commit into
mainfrom
sync_io_call_in_async_function
Jan 13, 2023
Merged

Zac-HD merged 1 commit into
mainfrom
sync_io_call_in_async_function

Conversation

@jakkdl

@jakkdl jakkdl commented Jan 13, 2023

Copy link
Copy Markdown
Member

First bullet point of #58

Use trio.open_file() instead of open(), io.open, io.open_code, or os.fdopen in async functions

Although I guessed that os.fdopen should be wrapped in trio.wrap_file as per the intro

I have no idea how to stop shed/pyupgrade from reformatting io.open into open, tried both #fmt: off and #noqa.

@jakkdl jakkdl mentioned this pull request Jan 13, 2023
10 of 12 tasks

@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.

Looks good!

Comment thread tests/trio23x.py Resolved
@Zac-HD
Zac-HD merged commit d7bb508 into main Jan 13, 2023
@Zac-HD
Zac-HD deleted the sync_io_call_in_async_function branch January 13, 2023 14:12
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