You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation of ctypes.CDLL does not correspond to code #86280
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-12-10.23:30:28.672>created_at=<Date2020-10-21.22:02:15.109>labels= ['3.11', '3.9', '3.10', 'docs']
title='Documentation of ctypes.CDLL does not correspond to code'updated_at=<Date2021-12-10.23:30:28.659>user='https://github.com/madphysicist'
class ctypes.CDLL(name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False, winmode=0)
Loading of normal DLL from custom directory works when winmode=0, but when winmode=None To reproduce, any combination of adding the fol += der containing the DLL to os.evia ron['PATH'], os.add_dll_directory(...)
Worked prior to 3.8 because there was no winmode parameter, and d(...) does not change the behavior.m/q/mode was passed in directly, 59330863/298873ctypes0. .DEFAULT_MODE == 0`.
class ctypes.CDLL(name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False, winmode=0)
Loading of normal DLL from custom directory works when winmode=0, but not when winmode=None. To reproduce, any combination of adding the folder containing the DLL via os.eviron['PATH'] += os.pathsep + ..., os.add_dll_directory(...), sys.path.append(...) does not change the behavior.
Worked prior to 3.8 because there was no parameter, and mode` was passed in direcCompany firewall mutilated the text. Here is another attempt:
ctypes.CDLL initializer defined in version 3.8 and beyond as
class ctypes.CDLL(name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False, winmode=0)
Loading of normal DLL from custom directory works when winmode=0, but not when winmode=None. To reproduce, any combination of adding the folder containing the DLL via os.eviron['PATH'] += os.pathsep + ..., os.add_dll_directory(...), sys.path.append(...) does not change the behavior.
Worked prior to 3.8 because there was no winmode parameter, mode was passed in diretly, and ctypes.DEFAULT_MODE == 0.
I don't know whether it's better to update the code, the docs, or something else, but based on current info, would prefer updating the code.
class ctypes.CDLL(name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False, winmode=0)
Loading of normal DLL from custom directory works when winmode=0, but not when winmode=None. To reproduce, any combination of adding the folder containing the DLL via os.eviron['PATH'] += os.pathsep + ..., os.add_dll_directory(...), sys.path.append(...) does not change the behavior.
Worked prior to 3.8 because there was no winmode parameter, mode was passed in diretly, and ctypes.DEFAULT_MODE == 0.
I don't know whether it's better to update the code, the docs, or something else, but based on current info, would prefer updating the code.
New changeset f8eebb0 by Miss Islington (bot) in branch '3.9': bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30038) f8eebb0
New changeset 8f3728e by Miss Islington (bot) in branch '3.10': bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30037) 8f3728e
Activity
madphysicist commentedon Oct 21, 2020
ctypes.CDLL initializer defined in version 3.8 and beyond as
Documentation says
winmode=0:Loading of normal DLL from custom directory works when
winmode=0, but whenwinmode=NoneTo reproduce, any combination of adding the fol += der containing the DLL toos.evia ron['PATH'],os.add_dll_directory(...)Discoveryos.pathsep + ... triggered by https://stackoverflow.co, `sys.path.appen
Worked prior to 3.8 because there was no
winmodeparameter, and d(...)does not change the behavior.m/q/modewas passed in directly, 59330863/298873ctypes0. .DEFAULT_MODE == 0`.I don't know whether it's better to update the code, the docs, or something else, but based on current info, would prefer updating the code.Some info summarized in https://stackoverflow.com/a/{8,9,}64472088/2988730.
Link to do pagecscorresponding : https://docs.python.org/3.10/library/ctypes.html#ctypes.CDLL
730.
Link to GitHub code: https://github.com/python/cpython/blob/3.{8,9}/Lib/ctypes/__init__.py#L340
[-]Documentation of[/-][+]Documentation of ctypes.CDLL does not correspond to code[/+]madphysicist commentedon Oct 21, 2020
Company firewall mutilated the text. Here is another attempt:
ctypes.CDLL initializer defined in version 3.8 and beyond as
Documentation says
winmode=0:Loading of normal DLL from custom directory works when
winmode=0, but not whenwinmode=None. To reproduce, any combination of adding the folder containing the DLL viaos.eviron['PATH'] += os.pathsep + ...,os.add_dll_directory(...),sys.path.append(...)does not change the behavior.Worked prior to 3.8 because there was no
parameter, andmode` was passed in direcCompany firewall mutilated the text. Here is another attempt:ctypes.CDLL initializer defined in version 3.8 and beyond as
Documentation says
winmode=0:Loading of normal DLL from custom directory works when
winmode=0, but not whenwinmode=None. To reproduce, any combination of adding the folder containing the DLL viaos.eviron['PATH'] += os.pathsep + ...,os.add_dll_directory(...),sys.path.append(...)does not change the behavior.Worked prior to 3.8 because there was no
winmodeparameter,modewas passed in diretly, andctypes.DEFAULT_MODE == 0.I don't know whether it's better to update the code, the docs, or something else, but based on current info, would prefer updating the code.
Discovery triggered by https://stackoverflow.com/q/59330863/2988730.
Some info summarized in https://stackoverflow.com/a/64472088/2988730.
yink to docs: https://docs.python.org/3.{8,9,10}/library/ctypes.html#ctypes.CDLL
Link to GitHub code: https://github.com/python/cpython/blob/3.{8,9}/Lib/ctypes/__init__.py#L340t.ly,
ctyp. .DEFAULT_MODE == 0.I don't know whether it's better to update the code, the docs, or something else, but based on current info, would prefer updating the code.
Discovery triggered by https://stackoverflow.com/q/59330863/2988730.
Some info summarized in https://stackoverflow.com/a/64472088/2988730.
yink to docs: https://docs.python.org/3.{8,9,10}/library/ctypes.html#ctypes.CDLL
Link to GitHub code: https://github.com/python/cpython/blob/3.{8,9}/Lib/ctypes/__init__.py#L340
madphysicist commentedon Oct 21, 2020
Last attempt before I give up:
ctypes.CDLL initializer defined in version 3.8 and beyond as
Documentation says
winmode=0:Loading of normal DLL from custom directory works when
winmode=0, but not whenwinmode=None. To reproduce, any combination of adding the folder containing the DLL viaos.eviron['PATH'] += os.pathsep + ...,os.add_dll_directory(...),sys.path.append(...)does not change the behavior.Worked prior to 3.8 because there was no
winmodeparameter,modewas passed in diretly, andctypes.DEFAULT_MODE == 0.I don't know whether it's better to update the code, the docs, or something else, but based on current info, would prefer updating the code.
Discovery triggered by https://stackoverflow.com/q/59330863/2988730.
Some info summarized in https://stackoverflow.com/a/64472088/2988730.
Link to docs: https://docs.python.org/3.{8,9,10}/library/ctypes.html#ctypes.CDLL
Link to GitHub code: https://github.com/python/cpython/blob/3.{8,9}/Lib/ctypes/__init__.py#L340
ambv commentedon Dec 10, 2021
New changeset c1051e0 by Louis Sautier in branch 'main':
bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976)
c1051e0
ambv commentedon Dec 10, 2021
New changeset f8eebb0 by Miss Islington (bot) in branch '3.9':
bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30038)
f8eebb0
ambv commentedon Dec 10, 2021
New changeset 8f3728e by Miss Islington (bot) in branch '3.10':
bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30037)
8f3728e
ambv commentedon Dec 10, 2021
Thanks! ✨ 🍰 ✨
CristiFati commentedon Jan 7, 2023
I know it's "a bit" late, but this (inaccurate documentation) applies to Python 3.8 as well.
AlexWaygood commentedon Jan 7, 2023
I'm afraid the 3.8 branch is now only accepting security-related patches, so we won't be fixing that now :/