Skip to content

gh-127369: Deprecate ctypes.DllGetClassObject and ctypes.DllCanUnloadNow #127766

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 3 commits into from

Conversation

encukou
Copy link
Member

@encukou encukou commented Dec 9, 2024

Deprecate ctypes.DllGetClassObject and ctypes.DllCanUnloadNow, preserving their functionality for now.

Also deprecate the corresponding DLL functions exported from _ctypes.pyd, so that if someone replaces the hooks and calls the C functions, they still get the warning.

Removal is slated for 3.19 per a proposed default deprecation period.

cc @junkmd @zooba


📚 Documentation preview 📚: https://cpython-previews--127766.org.readthedocs.build/

junkmd added a commit to junkmd/comtypes-python-dev-compatibility that referenced this pull request Dec 9, 2024
junkmd added a commit to junkmd/comtypes-python-dev-compatibility that referenced this pull request Dec 10, 2024
@encukou
Copy link
Member Author

encukou commented Dec 11, 2024

See discussion on the issue.

@encukou
Copy link
Member Author

encukou commented Jan 20, 2025

@junkmd is working on the comtypes side, though it might take some time to find the best way to serve this use case. Let's not deprecate the existing API before we have a clean migration path.

I'll close this PR for now.

@encukou encukou closed this Jan 20, 2025
@junkmd
Copy link
Contributor

junkmd commented Jan 20, 2025

This feature has not been maintained for many years, but it should be an important functionality for implementing inproc COM servers.

To untangle the complex dependencies, it is necessary to refine the implementation through repeated refactoring.

I want to express my gratitude to the community for tackling this challenging issue, which will likely take a long time to resolve.

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

Successfully merging this pull request may close these issues.

3 participants