On 6/8/23, jsch...@sbcglobal.net <jsch...@sbcglobal.net> wrote: > I opened two issues regarding copyfileobj that were not bugs, but a fix that > was involved helped me figure out I needed a new external drive, since it > displayed the error number from the copyfileobj function. I'd like a > modified version of this code implemented permanently in shutil.py so others > could see if they have the same issue as me.
I don't know how many people still subscribe to and read this mailing list. More people would see this suggestion if you posted this on discuss.python.org/c/ideas. > This is the original issue that has the code I was using that Eryksun > posted. > > https://github.com/python/cpython/issues/96721 > > Here's the second issue where it happened again. I put the error message in > this post, so you can see how it helped me. Also, the code might need to be > modified slightly, since it generated an error. > > https://github.com/python/cpython/issues/102357 The ctypes code that I provided was only for debugging purposes. Python needs to support the C runtime's _doserrno value (actually it's a Windows error code) internally for I/O calls such as _wopen(), close(), read(), and write(). Also, the error that you encountered, ERROR_NO_SUCH_DEVICE (433), should be mapped to the C errno value ENOENT (i.e. FileNotFoundError) in PC/errmap.h. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/KVIYVVZCHCOYLOFQNJDNILCF7KQVBR6A/ Code of Conduct: http://python.org/psf/codeofconduct/