Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
bpo-33591: Fix CDLL to accept PathLike objects#7032
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
the-knights-who-say-ni commentedMay 21, 2018
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed thePSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please followthe steps outlined in the CPython devguide to rectify this issue. When your account is ready, please add a comment in this pull request Thanks again to your contribution and we look forward to looking at it! |
7970e84
toabe38c6
CompareI signed the CLA (my bugtracker name is "mrh1997"). |
1c1642e
to461bc92
CompareDue to issue23606 (find msvct does not work any more) test_load did notwork any more, as it used MSVCRT for testing DLL loading.Now it uses _ctypes_test library, which is explicitly generated fortesting purposes.
CDLL accepts now not only paths of type 'str' but also of typePathLike (like Path()).
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 sorry this PR took so long to review. I dug it up from page 57 of the open PR list, but I think it's pretty close to ready.
I do have some comments:
- https://docs.python.org/3.10/library/ctypes.html#ctypes.CDLL should have a "versionchanged" notice saying that starting in version 3.11, PathLike objects are also supported. A similar example note is the one inhttps://docs.python.org/3.10/library/shutil.html#shutil.move for 3.9. The note should also be added to the other *DLL classes.
- I'd suggest rewording the NEWS entry as:
:class:`ctypes.CDLL`, :class:`ctypes.OleDLL`, :class:`ctypes.WinDLL`,and :class:`ctypes.PyDLL` now accept :term:`path-like objects<path-like object>` as their ``name`` argument. Patch by Robert Hoelzl.
Uh oh!
There was an error while loading.Please reload this page.
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.
This has merge conflicts now.
bedevere-bot commentedNov 27, 2022
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
ghost commentedFeb 3, 2023 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
arhadthedev commentedFeb 3, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@mrh1997 Could you sign the new CLA by clicking |
Non-Linux tests failed with the following error:
I'm investigating it. |
Fixed; there were two missed lines that continued to use |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
bedevere-bot commentedFeb 5, 2023
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again. |
Uh oh!
There was an error while loading.Please reload this page.
CDLL (and WinDLL, OleDLL, ...) accept now not only str objects but also PathLike objects.
https://bugs.python.org/issue33591