Fix encoding of __file__ for windows

review816002
(transplanted from 0a5aa17e6922e9e7985bf3e8532af94f353b7eb6)

--HG--
extra : transplant_source : %0AZ%A1%7Ei%22%E9%E7%98%5B%F3%E8S%2A%F9O5%3B%7E%B6
Avoid crashes with Act* copy()

review841002
issue3193
(transplanted from 39a65ab829c3518e6c5f128fae9d4cf2943a084d)

--HG--
extra : transplant_source : 9%A6Z%B8%29%C3Q%8El_%12%8F%AE%9DL%F2%94%3A%08M
Allow None in child_of operator

issue3190
review844002
(transplanted from 67208cffb07e8ab82e904a23f135fa8c6308d5a4)

--HG--
extra : transplant_source : g%20%8C%FF%B0%7E%8A%B8.%90J%23%F15%FA%8Cc%08%D5%A4