-
Notifications
You must be signed in to change notification settings - Fork 127
Drop use of .has_key(); deprecated in modern Python #137
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid we cannot remove the function as long as we support Python 2. The removal breaks backwards compatibility without any benefits for the user.
Indeed. On Python 2, |
Should I add a warning for its eventual removal? Python 2.7 users can continue to use the |
Yes, a DeprecationWarning sounds good. But I wouldn't rush the removal itself. Let's say we'll remove it when Python 2 support is dropped? |
We could only add the function under Python 2 and not define it under Python 3. |
We are past the stage of defining an API for python-ldap 3.0. Sure, |
Codecov Report
@@ Coverage Diff @@
## master #137 +/- ##
==========================================
+ Coverage 69.35% 69.35% +<.01%
==========================================
Files 49 49
Lines 4708 4712 +4
Branches 800 800
==========================================
+ Hits 3265 3268 +3
- Misses 1088 1089 +1
Partials 355 355
Continue to review full report at Codecov.
|
Updated. Restored function. Now issues a warning. |
Hi @jdufresne, |
No worries. Done in #151 Thanks |
That's not the one. Could you push your local branch |
Oops, sorry about that. Lets try that again, #153 |
Thank you! The change looks good; I'll do a full review next week. |
Using the
in
operator is preferred and available on all supported versions of Python.From https://docs.python.org/3/whatsnew/3.0.html#builtins