Closed GodefroyClair closed 4 months ago
There's no fundamental reason. Are get_cwd
and abspath
blocking in the first place?
Probably no one asked for it or contributed it. If you feel like adding it (should be fairly simple) feel free to send a PR!
Well, abspath
calls getcwd
and, on Linux,getcwd
calls the POSIX functon getcwd
. This function is a system call.
Exactly what implementation is behind that is beyond my knowledge. How would you evaluate how "blocking" a function is ?
https://hg.python.org/cpython/file/tip/Modules/posixmodule.c
https://man7.org/linux/man-pages/man3/getcwd.3.html
...and yes, if needed, I would be very happy to help and send a PR...
If I'm not mistaken, neither
get_cwd
norabspath
(which is justenormpath(join(os.getcwd(), path))
according to the doc in the os package) are implemented in aiofiles. It seems like important function that do IO operations if I'm not mistaken. Is there a fundamental reason why it is not implemented in aiofiles? Thanks!