As far as I can see in the CPython implementation os.umask on Windows uses the POSIX layer exposed by Windows, so must also be defined to never return an error.