Skip to content

gh-152433: Windows: _ssl module: improve UWP compatibility#152791

Open
thexai wants to merge 1 commit into
python:mainfrom
thexai:uwp-_ssl
Open

gh-152433: Windows: _ssl module: improve UWP compatibility#152791
thexai wants to merge 1 commit into
python:mainfrom
thexai:uwp-_ssl

Conversation

@thexai

@thexai thexai commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Windows: _ssl module: improve UWP compatibility.

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • Please use if defined() and elif defined(MS_WINDOWS) && ... and else for the fallback branch.
  • Can you determine why we are only raising a NotImplementedError on MS DEBUG builds for those functions? it's a separate issue but I think we should also raise unconditionally (or does it mean that those functions are available on regular MS builds only in release builds?) If there is something worth investigating, you can open a separate issue for that.

Comment thread Modules/_ssl/debughelpers.c Outdated
Comment thread Modules/_ssl.c Outdated
PyErr_SetString(PyExc_NotImplementedError, "load_dh_params: unavailable on UWP build");
return NULL;
#else
#if defined(MS_WINDOWS) && defined(Py_DEBUG)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The fact that we raise only on DEBUG MS builds is really weird here. Likewise, I would rather prefer an elif branch instead of a ifdef/else + nested.

@thexai thexai force-pushed the uwp-_ssl branch 2 times, most recently from 834b4c3 to 4db23b3 Compare July 3, 2026 14:42
Comment thread Modules/_ssl/debughelpers.c Outdated
@@ -0,0 +1 @@
``_ssl`` module: improve UWP compatibility.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
``_ssl`` module: improve UWP compatibility.
:mod:`ssl`: improve UWP build compatibility.

I think we can advertise it like that. The problem was the build right?

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This PR was small enough and changes were easy to spot, but in the future, please avoid force pushing once someone started reviewing your PR as it makes incremental review much harder. We squash merge at the end and change the commit messages ourselves when necessary.

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.

3 participants