Issue #13374: Deprecate os.getcwdb() on Windows
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 9012e39..078010b 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -2410,6 +2410,9 @@
         if (wbuf2 != wbuf) free(wbuf2);
         return resobj;
     }
+
+    if (win32_warn_bytes_api())
+        return NULL;
 #endif
 
     Py_BEGIN_ALLOW_THREADS