This is known already, I am adding more info about this issue.
client.diff3() raises a:
("Can't write to stream: The handle is invalid. ", 720006)
when passed a real file object under Windows. I tried several combinations of SHARE_WRITE and other CreateFile options without success. The error is not obvious when looking at "svn_swig_py_make_file" in:
I am afraid it's hidden in the apr layer. It's interesting to note the following comment can be found in gvn project (http://gvn.googlecode.com/svn-history/r914/trunk/lib/gvn/repository.py)
""" The svn_swig_py_make_file wrapper is broken for both file descriptors and files on Windows, so we'll return a path. """
Unfortunately, their workaround does not fit with diff3(), passing a file path to initialize the apr_file does work but the file is not close upon diff3() failures, which could happen in normal courses of action, and the temporary file/directory cannot be removed. Still, this method is fine if diff3() succeeds.
I won't spend anymore time on this for now.