Skip to content

refactor: Port LDAP_Type to heap type #546

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

Closed
wants to merge 1 commit into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Nov 3, 2023

The LDAP type has been converted from a static type to a heap type. The limited API does not support static types.

Heap types behave more closely like Python classes. They are allocated on the heap and reference counted. Instances have a strong reference to their type and must use GC protocol to track this reference.

The LDAP type can no longer be instantiated by Python code. This was never supported and resulted in an invalid LDAP connection. Code like type(_ldap.initialize(""))()" now fails with a TypeError`.

See: #540

@tiran tiran force-pushed the issue540-ldap-heaptype branch from 539cab7 to b69c742 Compare November 6, 2023 10:05
The `LDAP` type has been converted from a static type to a heap type.
The limited API does not support static types.

Heap types behave more closely like Python classes. They are allocated
on the heap and reference counted. Instances have a strong reference to
their type and must use GC protocol to track this reference.

The LDAP type can no longer be instantiated by Python code. This was
never supported and resulted in an invalid LDAP connection. Code like
`type(_ldap.initialize(""))()" now fails with a `TypeError`.

See: python-ldap#540
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran tiran force-pushed the issue540-ldap-heaptype branch from b69c742 to 70303d7 Compare November 7, 2023 06:13
@tiran tiran closed this Feb 12, 2024
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