feat: report the OpenSSL runtime in specify version - #4556
Open
Yi-111-a wants to merge 1 commit into
Open
Conversation
HTTPS failures on Windows are hard to triage because several unrelated toolchains ship their own libssl-3-x64.dll, and only the one the interpreter actually loaded matters. `specify version` reported Python, Platform, Architecture and OS Version, but nothing about OpenSSL, so answering "which OpenSSL is in use?" required a separate snippet. Add an `OpenSSL` row sourced from ssl.OPENSSL_VERSION. The row is skipped when that attribute is unavailable, so the table degrades rather than erroring. Related to github#4433 - this does not fix the abort, it only makes the runtime visible to whoever triages it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
specify versionreported CLI version, Python, Platform, Architecture and OS Version, but nothing about the OpenSSL runtime the interpreter actually loaded.That is the first thing HTTPS triage needs, and on Windows it is genuinely not inferable from outside the process: several unrelated toolchains ship their own
libssl-3-x64.dll(Git for Windows alone has two distinct builds —mingw64\bin\libssl-3-x64.dllandusr\bin\msys-ssl-3.dll), and only the one actually loaded matters.This came out of #4433, where the report is an OpenSSL-level abort (
OPENSSL_Uplink(...): no OPENSSL_Applink) and the working hypothesis is a PATH-preceded OpenSSL DLL. Today, answering "which OpenSSL is in use?" requires the reporter to run a separatepython -csnippet. After this change,specify versionanswers it:The row is skipped when
ssl.OPENSSL_VERSIONis unavailable, so the table degrades rather than erroring.Related to #4433 — this does not fix the abort, it only makes the runtime visible to whoever triages it.
Evidence
New test fails on
main, passes with the change:Lint matches what CI runs:
Testing
uv run specify --helpuv sync && uv run pytestspecify versiondoes not read a projectOn the second box:
tests/test_cli_version.pypasses, and thespecify versionCLI surface was exercised directly. I could not complete the full suite on this machine —tests/conftest.pyprobes for a working bash and invokeswsl.exe, which is blocked by my host's security policy, and long runs get cut short. CI will cover the full matrix; I'd rather flag the gap than tick a box I didn't verify.AI Disclosure
AI assistance was used to draft the change and its test, and to run the local verification shown above. I reviewed the diff and the reported outputs.
Note: why the loaded DLL path is not in this PR
The obvious companion field is the resolved path of the loaded
libssl-3-x64.dll. I left it out on purpose.It would require process-module enumeration, and it only means something once we know a PATH-preceded DLL can be loaded at all — which is exactly what is still unresolved in #4433. On my Windows host,
libssl-3-x64.dllresolves to the interpreter's ownDLLs\directory regardless of what is onPATH(CPython callsSetDefaultDllDirectoriesat startup, bpo-36085, soPATHis no longer part of extension-module resolution). Adding the path now would encode an unverified assumption into the UI.If it turns out to be useful once #4433 is understood, I'm happy to follow up with it as a separate focused change.