### 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

raise AttributeError
            body = e.read()
        except AttributeError:
            body = ''
        else:
            e.close()
        
        try:
            
            info.update(dict((k.lower(), v) for k, v in e.info().items()))
        except Exception:
            pass
        info.update({'msg': to_native(e), 'body': body, 'status': e.code})
    except urllib_error.URLError as e:
        code = int(getattr(e, 'code', -1))
        info.update(dict(msg="Request failed: %s" % to_native(e), status=code))
    except socket.error as e:
        info.update(dict(msg="Connection failure: %s" % to_native(e), status=-1))
    except httplib.BadStatusLine as e:
        info.update(dict(msg="Connection failure: connection was closed before a valid response was received: %s" % to_native(e.line), status=-1))
    except Exception as e:
        info.update(dict(msg="An unknown error occurred: %s" % to_native(e), status=-1),
                    exception=traceback.format_exc())
    finally:
        tempfile.tempdir = old_tempdir
    return r, info
def _suffixes(name):