Skip to content

THRIFT-6265: Drop the backports.ssl_match_hostname dependency - #3863

Merged
Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6265
Sep 17, 2026
Merged

Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6265

Conversation

@Jens-G

@Jens-G Jens-G commented Sep 16, 2026

Copy link
Copy Markdown
Member

JIRA: THRIFT-6265
Client: py

lib/py/setup.py added backports.ssl_match_hostname>=3.5 to the ssl extra when sys.hexversion < 0x03050000. No build can take that branch:

  • pyproject.toml builds with setuptools>=69, which itself needs Python 3.8 or later.
  • The library supports Python 3.10 to 3.14 (LANGUAGES.md, CI matrix).

Changes:

  • lib/py/setup.py: the branch is removed. The ssl extra stays defined, and stays empty as it has been in every build, so pip install thrift[ssl] keeps working without a "does not provide the extra" warning.
  • build/appveyor/MSVC-appveyor-full.bat: the AppVeyor build no longer installs backports.ssl_match_hostname.

The dead backports fallback in lib/py/src/transport/sslcompat.py, and the message in TSSLSocket.py that names the package, are part of the code THRIFT-6233 changes. This PR leaves both to that ticket.

Verification

No test can tell the two versions apart: the removed branch is unreachable on every interpreter that can run the build. Instead I checked:

  • The egg_info metadata (Provides-Extra, Requires-Dist, requires.txt) is identical before and after, on Python 3.10.12 with the distribution's setuptools and on Python 3.12.14 with setuptools 69+.
  • pip install ".[ssl]" succeeds on 3.12 without an extras warning.
  • flake8 lib/py/setup.py is clean.

🤖 Generated with Claude Code

Client: py

setup.py added backports.ssl_match_hostname to the "ssl" extra when run on a
Python older than 3.5. The build requires setuptools 69 or later, which needs
Python 3.8, and the library supports Python 3.10 onwards. The branch is
therefore never taken, and the extra has been empty in every build. The "ssl"
extra itself stays, so that installing thrift[ssl] keeps working.

The AppVeyor build no longer installs the package either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Jens-G
Jens-G requested a review from mhlakhani as a code owner September 16, 2026 20:44
@mergeable mergeable Bot added python build and general CI cmake, automake and build system changes labels Sep 16, 2026
@Jens-G Jens-G self-assigned this Sep 16, 2026
@Jens-G
Jens-G merged commit 3e2bdde into apache:master Sep 17, 2026
205 of 208 checks passed
@Jens-G
Jens-G deleted the THRIFT-6265 branch September 17, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build and general CI cmake, automake and build system changes python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant