Endre Fülöp created THRIFT-5847:
-----------------------------------

             Summary: Python3.12 deprecation in THttpClient
                 Key: THRIFT-5847
                 URL: https://issues.apache.org/jira/browse/THRIFT-5847
             Project: Thrift
          Issue Type: Bug
          Components: Python - Library
    Affects Versions: 0.21.0
         Environment: I am using Thrift as part of the CodeChecker project in 
Ubuntu 24.04 machine, which has Python3.12 as the default Python version.
            Reporter: Endre Fülöp


When using the Thrift Python libraries with a Python3.12 interpreter, the HTTP 
client.HTTPSConnection complains about the `key_file` and `cert_file` keyword 
arguments. (Please see the notes for the linked HTTPSConnection class.)

IMO, these parameters are already handled by the 
[THttpClient|https://github.com/apache/thrift/blob/master/lib/py/src/transport/THttpClient.py]
 class when creating a context; the solution could be as simple as not passing 
them as a keyword argument but as part of the SSLContext (which the code 
already does here: 
[https://github.com/apache/thrift/blob/7734c393ed0f0632c658c05e33a4d6592cf2912c/lib/py/src/transport/THttpClient.py#L117|https://github.com/apache/thrift/blob/7734c393ed0f0632c658c05e33a4d6592cf2912c/lib/py/src/transport/THttpClient.py#L117]
 .)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to