aiofiles icon indicating copy to clipboard operation
aiofiles copied to clipboard

Implement the `wrap` function with the `asyncio.to_thread` underneath.

Open stankudrow opened this issue 7 months ago • 7 comments

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 avatar Apr 26 '25 20:04 stankudrow

@Tinche , hello.

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

stankudrow avatar May 05 '25 08:05 stankudrow

@Tinche , hello.

Could you possibly have a look at this PR?

stankudrow avatar Aug 08 '25 14:08 stankudrow

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

Tinche avatar Aug 09 '25 12:08 Tinche

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:

  • the wrap function is back, but with asyncio.to_thread
  • Justfile updated
  • the code is groomed a little bit
  • .python-version...it didn't make because uv sticks to the Python version from the ".python-version" file -> https://github.com/Tinche/aiofiles/actions/runs/16857818297/job/47753607482#step:5:42

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

stankudrow avatar Aug 10 '25 05:08 stankudrow

@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 #222 ;
  • no changes in CI/CD - not for this PR (opinion)

stankudrow avatar Aug 30 '25 09:08 stankudrow

@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 avatar Sep 21 '25 10:09 stankudrow

@Tinche , hello.

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

stankudrow avatar Oct 18 '25 11:10 stankudrow