Skip to content

Commit 427f8c3

Browse files
authored
gh-133517: Remove os.listdrive, os.listvolumes and os.listmounts in non-desktop Windows builds (GH-133518)
1 parent 1a137bc commit 427f8c3

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove :func:`os.listdrives`, :func:`os.listvolumes` and :func:`os.listmounts`
2+
in non Windows desktop builds since the underlying functionality is missing.

Modules/clinic/posixmodule.c.h

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/posixmodule.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4698,7 +4698,7 @@ os_listdir_impl(PyObject *module, path_t *path)
46984698
}
46994699

47004700

4701-
#ifdef MS_WINDOWS
4701+
#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)
47024702

47034703
/*[clinic input]
47044704
os.listdrives
@@ -4747,6 +4747,10 @@ os_listdrives_impl(PyObject *module)
47474747
return result;
47484748
}
47494749

4750+
#endif /* MS_WINDOWS_DESKTOP || MS_WINDOWS_SYSTEM */
4751+
4752+
#if defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)
4753+
47504754
/*[clinic input]
47514755
os.listvolumes
47524756
@@ -4808,6 +4812,9 @@ os_listvolumes_impl(PyObject *module)
48084812
return result;
48094813
}
48104814

4815+
#endif /* MS_WINDOWS_APP || MS_WINDOWS_SYSTEM */
4816+
4817+
#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)
48114818

48124819
/*[clinic input]
48134820
os.listmounts
@@ -4888,6 +4895,9 @@ os_listmounts_impl(PyObject *module, path_t *volume)
48884895
return result;
48894896
}
48904897

4898+
#endif /* MS_WINDOWS_DESKTOP || MS_WINDOWS_SYSTEM */
4899+
4900+
#ifdef MS_WINDOWS
48914901

48924902
/*[clinic input]
48934903
os._path_isdevdrive

0 commit comments

Comments
 (0)