enthought / enthought/comtypes
Are there any use cases for `DllCanUnloadNow` and `DllGetClassObject`?
- Dominant language
- Python
- Stars
- 345
- Forks
- 105
- PR merge metrics
- No merged PRs in 30d
Description
In the discussions in https://github.com/python/cpython/pull/127210 and https://github.com/python/cpython/pull/127369, it was noted that the Python standard library's [`ctypes`](https://docs.python.org/3/library/ctypes.html) functions [`ctypes.DllCanUnloadNow`](https://docs.python.org/3/library/ctypes.html#ctypes.DllCanUnloadNow) and [`ctypes.DllGetClassObject`](https://docs.python.org/3/library/ctypes.html#ctypes.DllGetClassObject) depend on functions of the same name in `comtypes.server.inprocserver` ([`DllCanUnloadNow`](https://github.com/enthought/comtypes/blob/fb15f91d12aedfff1782150ff8e6bc02da4c8257/comtypes/server/inprocserver.py#L142-L147) and [`DllGetClassObject`](https://github.com/enthought/comtypes/blob/fb15f91d12aedfff1782150ff8e6bc02da4c8257/comtypes/server/inprocserver.py#L112-L139)).
Eventually, these functions might either be redesigned to remove the dependency on `comtypes` or be deprecated and removed from `ctypes` altogether after a few years.
Users currently relying on these `ctypes` APIs might need to switch to using the equivalent APIs provided by `comtypes`.
However, I have never directly called these functions (neither in `ctypes` nor in `comtypes`), so I am not aware of the use cases or expected behaviors associated with them.
To help with adding tests and providing proper migration guidance, I encourage anyone familiar with the use cases of these APIs to share their insights by commenting on this issue.
Contributor guide
Assessment
This issue has not been assessed yet.