Skip to content

Support for python3.11 #143

Open
Open

Description

@stefanbie

Hi!
Im trying to use HttpNtlmAuth with python3.11.11 but it does not seems to be supported? Is it possible to add support for it?

BR Stefan

Activity

  1. jborean93 commented on Apr 10, 2025

    @jborean93
    Contributor

    Are you getting an error message?

  2. stefanbie commented on Apr 14, 2025

    @stefanbie
    Author

    Hi! Thanks for asking. I downloaded the package using:
    python3.11 -m pip install requests-ntlm
    If I run :

    import requests
    from requests_ntlm import HttpNtlmAuth
    r = 'https://xxx'
    doc = requests.get(r, auth=HttpNtlmAuth('foo\\sbie',bar'))
    

    I get:

    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='xxx', port=443): Max retries exceeded with url: xxx (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))

    The same code works when I use python 3.8

  3. jborean93 commented on Apr 14, 2025

    @jborean93
    Contributor

    That is a sign that the CA bundle requests is using doesn't trust the certificate presented by https://xxx. That is unrelated to this library and isn't a sign we don't support Python 3.11. There's a good chance it's because your Python 3.8 install of requests is from the system package manager (dnf, apt, etc) and it has been configured to use the system CA bundle whereas installing requests from pip will use certifi which won't reference any of your system CA bundles. https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification shows how you can specify a custom CA trust path amongst other things.

  4. stefanbie commented on Apr 15, 2025

    @stefanbie
    Author

    Thanks a lot for the clarification! Now I seem to have found a way to use the certificate :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions