### Summary

In Python 3.12 the deprecated `key_file`, `cert_file` and `check_hostname` parameters have been [removed](https://docs.python.org/3.12/library/http.client.html#http.client.HTTPSConnection).

There is code which still attempts to set these, such as:

https://github.com/ansible/ansible/blob/0371ea08d6de55635ffcbf94da5ddec0cd809495/lib/ansible/module_utils/urls.py#L604-L608

Which results in an error under Python 3.12:

```
>       return httplib.HTTPSConnection(host, **kwargs)
E       TypeError: HTTPSConnection.__init__() got an unexpected keyword argument 'cert_file'
```

### Issue Type

Feature Idea

### Component Name

module_utils/urls.py

ciphers = self._fallback(ciphers, self.ciphers)
        use_netrc = self._fallback(use_netrc, self.use_netrc)
        handlers = []
        if unix_socket:
            handlers.append(UnixHTTPHandler(unix_socket))
        parsed = generic_urlparse(urlparse(url))
        if parsed.scheme != 'ftp':
            username = url_username
            password = url_password
            if username:
                netloc = parsed.netloc
            elif '@' in parsed.netloc:
                credentials, netloc = parsed.netloc.split('@', 1)
                if ':' in credentials:
                    username, password = credentials.split(':', 1)
                else:
                    username = credentials
                    password = ''
                parsed_list = parsed.as_list()
                parsed_list[1] = netloc
                
                url = urlunparse(parsed_list)
            if use_gssapi:
                if HTTPGSSAPIAuthHandler:  
                    handlers.append(HTTPGSSAPIAuthHandler(username, password))
                else:
                    imp_err_msg = missing_required_lib('gssapi', reason='for use_gssapi=True',
                                                       url='https://pypi.org/project/gssapi/')
                    raise MissingModuleError(imp_err_msg, import_traceback=GSSAPI_IMP_ERR)
            elif username and not force_basic_auth: