Skip to content

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
Copy link
Contributor Author

stankudrow commented Aug 10, 2025

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

No problem, but please have another look at this PR:

I hope these changes are enough and still add real value to the project.

@stankudrow stankudrow requested a review from Tinche August 12, 2025 20:26
@stankudrow
Copy link
Contributor Author

@Tinche , hello.

This PR is ready for another review:

  • RUF specific-rules added -> RUF022 sorted the __all__ variable in some modules;
  • mypy is used in the just check rule -> good to go before Add type stubs from typeshed #222 ;
  • no changes in CI/CD - not for this PR (opinion)

@stankudrow
Copy link
Contributor Author

@Tinche , good day.

I have updated the CHANGELOG and README files, the tox -e (py39|py314|check) commands are OK locally, so this PR is finalised enough. If you are OK with the changes as they are, let 'em be merged, please.

@stankudrow
Copy link
Contributor Author

@Tinche , hello.

Are you ready to merge this PR so the next #222 and #193 could be rebased and proceeded?

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