[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-06-07 Thread Jonathan Hsu
Change by Jonathan Hsu : -- nosy: +Jonathan Hsu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-08 Thread Steve Dower
Steve Dower added the comment: > I think it would be cleaner to split out the platform-specific work into a > separate _load_library method SGTM -- ___ Python tracker ___

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-07 Thread Eryk Sun
Eryk Sun added the comment: I'd like to match POSIX here by supporting path-like names. Also, I think it would be cleaner to split out the platform-specific work into a separate _load_library method, like how subprocess.Popen is designed, and to stop pretending that WINAPI LoadLibraryEx is

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-07 Thread David Heffernan
David Heffernan added the comment: I would approve of that On Tue, 7 Jan 2020, 20:43 Steve Dower, wrote: > > Steve Dower added the comment: > > In that case, we should refactor the init method to check whether handle > has been specified earlier, so that it's obvious that the two

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-07 Thread Steve Dower
Steve Dower added the comment: In that case, we should refactor the init method to check whether handle has been specified earlier, so that it's obvious that the two conditional blocks are never executed in that case. -- ___ Python tracker

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-07 Thread David Heffernan
David Heffernan added the comment: Personally I'd hang this off whether handle has been specified. It seems pointless to set the mode if you are never going to use it. -- ___ Python tracker

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-07 Thread Steve Dower
Change by Steve Dower : -- keywords: +easy, newcomer friendly ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-07 Thread Steve Dower
Steve Dower added the comment: Good catch. We should probably make the line 351 check "if name and ('/' in name ..." like the others in the same function. -- keywords: +3.8regression ___ Python tracker

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-07 Thread David Heffernan
New submission from David Heffernan : When creating an instance of CDLL (or indeed WinDLL) for a DLL that is already loaded, you pass the HMODULE in the handle argument to the constructor. In older versions of ctypes you could pass None as the name argument when doing so. However, the