Skip to content

gh-153091: Fix os.listvolumes() should be only available for MS_WINDOWS_DESKTOP#153095

Closed
thexai wants to merge 1 commit into
python:mainfrom
thexai:fix-os_listvolumes
Closed

gh-153091: Fix os.listvolumes() should be only available for MS_WINDOWS_DESKTOP#153095
thexai wants to merge 1 commit into
python:mainfrom
thexai:fix-os_listvolumes

Conversation

@thexai

@thexai thexai commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

@cmaloney cmaloney left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also update the availability line

.. availability:: Windows

Comment thread Misc/NEWS.d/next/Windows/2026-07-05-12-47-19.gh-issue-153091.FMMEGa.rst Outdated
@thexai

thexai commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Should also update the availability line

Not seems necessary as all other similar functions (already limited to Windows Desktop) only mentions Windows

e.g:

cpython/Doc/library/os.rst

Lines 2492 to 2494 in 4c79929

.. audit-event:: os.listmounts volume os.listmounts
.. availability:: Windows

Universal Windows Platform is not mentioned nowhere because is not supported yet (officially) in all Python Core.

@thexai

thexai commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

This needs backport to 3.15

@zooba

zooba commented Jul 6, 2026

Copy link
Copy Markdown
Member

Universal Windows Platform is not mentioned nowhere because is not supported yet (officially) in all Python Core.

Yep, this is correct. The availability in our docs only refers to the supported build configurations, which currently is just desktop.

Certainly open to changing that, but it requires at minimum a long-term reliable/maintained buildbot for the configuration, as well as a separate discussion. For now, since it's only custom builds that will hit this path, we don't bother documenting it.

@zooba zooba added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 6, 2026
@zooba

zooba commented Jul 6, 2026

Copy link
Copy Markdown
Member

I'm also somewhat ambivalent on NEWS entries - I don't think we need them for each one of these changes. Provided the change only converts a custom build configuration from a build failure to success, we don't really need to raise that to end users. Only if it could change a success to a failure, or has an impact on regular users, do we really need to expose it in NEWS.

@zooba zooba added the skip news label Jul 6, 2026
…r ``MS_WINDOWS_DESKTOP``

``FindFirstVolumeW`` is only supported on Windows Desktop (not in UWP).
@thexai thexai force-pushed the fix-os_listvolumes branch from 85d2860 to 97613e1 Compare July 6, 2026 16:38
@thexai

thexai commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

NEWS removed.

@cmaloney

cmaloney commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Please don't force push to CPython PR branches

@zooba zooba removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 6, 2026
@zooba zooba enabled auto-merge (squash) July 6, 2026 16:47
@zooba

zooba commented Jul 6, 2026

Copy link
Copy Markdown
Member

Also we just decided (on a backport PR) not to backport these. Hopefully you've got your own port of the changes for the 3.15 branch already - these will only be in main/3.16 sources.

@thexai

thexai commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Also we just decided (on a backport PR) not to backport these. Hopefully you've got your own port of the changes for the 3.15 branch already - these will only be in main/3.16 sources.

Then this PR can be closed as these changes are also on #152998.

The reason of opening a separated issue (#153091) is seems to me like a "bug" because it's assigned to MS_WINDOWS_APP instead of MS_WINDOWS_DESKTOP only for this function, however it's fine for other similar functions e.g: os.listmounts().

The others UWP PR's are most an improvement (not existent dedicated code path) but this one seems a bug (wrong / misasigned code path). And also in 3.15 code.

@zooba

zooba commented Jul 6, 2026

Copy link
Copy Markdown
Member

Okay, we'll go with the other PR then.

Because we're only really supporting Desktop upstream (in our CI/etc.), it's entirely possible that the other API partitions may not build. So we happily accept changes to fix those builds, but won't usually treat them as bugs, since they don't affect the main set of users who we communicate to (bear in mind that while our code (not builds) is the main product, our users are the recipient of the list of changes, and so we try not to clutter them up with lists of changes that don't affect them but are obvious (fail->success) to those who are impacted).

@zooba zooba closed this Jul 6, 2026
auto-merge was automatically disabled July 6, 2026 17:19

Pull request was closed

@thexai thexai deleted the fix-os_listvolumes branch July 6, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

os.listvolumes() interface should be only available on Windows Desktop (MS_WINDOWS_DESKTOP) and not in UWP (MS_WINDOWS_APP)

3 participants