Skip to content
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

ipaldap py3 fixes #850

Closed
wants to merge 3 commits into from
Closed

ipaldap py3 fixes #850

wants to merge 3 commits into from

Conversation

MartinBasti
Copy link
Contributor

@MartinBasti MartinBasti commented Jun 2, 2017

No description provided.

It was hard to detect what is supposed to be in self._orig variable.
Renaming to _orig_raw makes clear for future generations that it
contains bytes.

https://pagure.io/freeipa/issue/4985
in py3 we are receiving ugly tracebacks due __del__ method that
should be used very carefully or never. Due tracebacks, this doesn't
work and context manager should be used for reliable connection
termination.

Exception ignored in: <bound method LDAPClient.__del__ of ipaserver.plugins.ldap2.ldap2()>
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/ipapython/ipaldap.py", line 1057, in __del__
  File "/usr/lib/python3.5/site-packages/ipaserver/plugins/ldap2.py", line 123, in close
  File "/usr/lib/python3.5/site-packages/ipalib/backend.py", line 94, in isconnected
NameError: name 'hasattr' is not defined
datetime objects were converted to string instead fo bytes.

https://pagure.io/freeipa/issue/4985
@MartinBasti MartinBasti added the py3 label Jun 2, 2017
@stlaz stlaz self-assigned this Jun 7, 2017
@stlaz
Copy link
Contributor

stlaz commented Jun 21, 2017

Works for me, tests pass, ACK.

@stlaz stlaz added the ack Pull Request approved, can be merged label Jun 21, 2017
@pvomacka pvomacka added the pushed Pull Request has already been pushed label Jun 21, 2017
@pvomacka
Copy link

master:

  • 7c163c9 LDAPEntry: rename _orig to _orig_raw
  • db01767 py3: LDAPClient: remove del method
  • 0487f99 py3: ipaldap: fix encoding of datetime objects

@pvomacka pvomacka closed this Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
3 participants