Allow running conjure-python-client on Windows#177
Open
schmelczer wants to merge 1 commit intodevelopfrom
Open
Allow running conjure-python-client on Windows#177schmelczer wants to merge 1 commit intodevelopfrom
schmelczer wants to merge 1 commit intodevelopfrom
Conversation
Generate changelog in
|
✅ Successfully generated changelog entry!Need to regenerate?Simply interact with the changelog bot comment again to regenerate these entries. 📋Changelog Preview🐛 Fixes
|
schmelczer
commented
Feb 24, 2026
| import random | ||
| import requests | ||
| import socket | ||
| import sys |
gabrielsimoes
approved these changes
Feb 24, 2026
psyclaudeZ
reviewed
Feb 24, 2026
Contributor
psyclaudeZ
left a comment
There was a problem hiding this comment.
The change LGTM, but I think the test is inconsistent now and we should probably patch it up.
conjure-python-client/test/_http/test_requests_client.py
Lines 5 to 10 in 512aadf
and
conjure-python-client/test/_http/test_requests_client.py
Lines 30 to 31 in 512aadf
Maybe use the same hasattr checks?
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.
Before this PR
TCP_KEEPINTVL and TCP_KEEPIDLE are not available in every Python build on Windows. Previously, TCP_KEEPINTVL was used unconditionally (crashing on Windows) and TCP_KEEPIDLE was only gated for macOS (also crashing on Windows.
See https://github.com/python/cpython/blob/b32c830d444c85421bd2c0c7af494c9d85485a29/Modules/socketmodule.c#L337-L340 which shows it's available from api version 16299.
Notably, the conda-forge builds of Python use a lower api version, I think it's because of their old Windows image (https://github.com/conda-forge/python-feedstock/blob/02184ce041a6bfa67e45fb2472a587ef13a99669/.azure-pipelines/azure-pipelines-win.yml#L8) but I'm not entirely sure.
After this PR
==COMMIT_MSG==
Allow running conjure-python-client on Windows
==COMMIT_MSG==
Only try accessing the properties if they're available.