Skip to content

Implement the wrap function with the asyncio.to_thread underneath.#213

Closed
stankudrow wants to merge 26 commits intoTinche:mainfrom
stankudrow:replace-custom-wrap-with-asyncio-to_thread
Closed

Implement the wrap function with the asyncio.to_thread underneath.#213
stankudrow wants to merge 26 commits intoTinche:mainfrom
stankudrow:replace-custom-wrap-with-asyncio-to_thread

Conversation

@stankudrow
Copy link
Contributor

@stankudrow stankudrow commented Apr 26, 2025

Features:

  • base::wrap -> base::asyncio.to_thread
  • update Justfile
  • update pytest configuration in the pyproject.toml file
  • add mypy for just check

Closes #207 .
Makes the #177 obsolete (actually done by the #209).

@stankudrow stankudrow changed the title Using the asyncio to thread in the wrap Using the asyncio.to thread in the wrap Apr 26, 2025
@stankudrow stankudrow changed the title Using the asyncio.to thread in the wrap Deprecating the wrap in favour of the new asyncify wrapper. Apr 30, 2025
@stankudrow stankudrow changed the title Deprecating the wrap in favour of the new asyncify wrapper. Deprecate the wrap function. Apr 30, 2025
@stankudrow stankudrow changed the title Deprecate the wrap function. Add the to_coro function with the asyncio.to_thread under -> deprecating the wrap function. Apr 30, 2025
@stankudrow
Copy link
Contributor Author

stankudrow commented May 5, 2025

@Tinche , hello.

Converted to draft so the PR #216 can be resolved first.

@stankudrow stankudrow marked this pull request as draft May 5, 2025 20:39
stankudrow added a commit to stankudrow/aiofiles that referenced this pull request May 26, 2025
@stankudrow stankudrow force-pushed the replace-custom-wrap-with-asyncio-to_thread branch from 6f98dc2 to 83a4442 Compare May 26, 2025 14:16
@stankudrow stankudrow marked this pull request as ready for review May 26, 2025 14:16
@stankudrow stankudrow changed the title Add the to_coro function with the asyncio.to_thread under -> deprecating the wrap function. Add the to_coro function with the asyncio.to_thread underneath -> deprecating the wrap function. May 28, 2025
@stankudrow stankudrow force-pushed the replace-custom-wrap-with-asyncio-to_thread branch from 83a4442 to 4312783 Compare June 20, 2025 07:45
stankudrow pushed a commit to stankudrow/aiofiles that referenced this pull request Jun 20, 2025
stankudrow pushed a commit to stankudrow/aiofiles that referenced this pull request Jun 21, 2025
@stankudrow
Copy link
Contributor Author

@Tinche , hello.

Could you possibly have a look at this PR?

@Tinche
Copy link
Owner

Tinche commented Aug 9, 2025

I don't see a ton of value in the wrap -> to_coro refactor so I'm going to pass on it, sorry.

@stankudrow stankudrow changed the title Add the to_coro function with the asyncio.to_thread underneath -> deprecating the wrap function. Implement the wrap function with the asyncio.to_thread underneath. Aug 10, 2025
@stankudrow stankudrow requested a review from Tinche August 12, 2025 20:26
@stankudrow stankudrow closed this Mar 6, 2026
@stankudrow stankudrow deleted the replace-custom-wrap-with-asyncio-to_thread branch March 6, 2026 19:34
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.

Python 3.9: to_thread or not to_thread?

2 participants