Skip to content

ldap3: Connection: auto_bind also supports booleans #11289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

supertassu
Copy link
Contributor

Earlier ldap3 versions only accepted booleans as auto_bind values, and
they are still supported and used in various places in upstream
documentation (e.g. at 0).

Earlier ldap3 versions only accepted booleans as auto_bind values, and
they are still supported and used in various places in upstream
documentation (e.g. at [0]).

[0]: https://ldap3.readthedocs.io/en/latest/bind.html?highlight=auto_bind
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- mitmproxy/addons/proxyauth.py:229: error: Argument "auto_bind" to "Connection" has incompatible type "Literal[True]"; expected "Literal['DEFAULT', 'NONE', 'NO_TLS', 'TLS_BEFORE_BIND', 'TLS_AFTER_BIND']"  [arg-type]
- mitmproxy/addons/proxyauth.py:285: error: Argument "auto_bind" to "Connection" has incompatible type "Literal[True]"; expected "Literal['DEFAULT', 'NONE', 'NO_TLS', 'TLS_BEFORE_BIND', 'TLS_AFTER_BIND']"  [arg-type]

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit c51de8e into python:main Jan 18, 2024
@supertassu supertassu deleted the ldap3 branch January 18, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants