Skip to content

Document ctypes.wintypes constants #55462

Closed

Description

@techtonik
mannequin
BPO 11253
Nosy @amauryfa, @orsenthil

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 = None
closed_at = None
created_at = <Date 2011-02-20.06:13:45.571>
labels = ['type-feature', '3.7', 'docs']
title = 'Document ctypes.wintypes constants'
updated_at = <Date 2017-11-08.15:17:57.997>
user = 'https://bugs.python.org/techtonik'

bugs.python.org fields:

activity = <Date 2017-11-08.15:17:57.997>
actor = 'berker.peksag'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2011-02-20.06:13:45.571>
creator = 'techtonik'
dependencies = []
files = []
hgrepos = []
issue_num = 11253
keywords = []
message_count = 6.0
messages = ['128893', '129371', '139165', '139226', '139669', '139702']
nosy_count = 5.0
nosy_names = ['amaury.forgeotdarc', 'orsenthil', 'techtonik', 'docs@python', 'markm']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue11253'
versions = ['Python 3.6', 'Python 3.7']

Linked PRs

Activity

  1. techtonik commented on Feb 20, 2011

    techtonikmannequin
    MannequinAuthor

    I've just noticed that my application is incompatible with Python 2.5, because ctypes.wintypes is missing SHORT constants. However, I can't find the information when these symbols were introduced first. To prevent such confusion in future it would be nice to extract symbol information for each Python release and automatically include the version of the first appearance in documentation.

  2. amauryfa commented on Feb 25, 2011

    @amauryfa
    Contributor

    Can you provide a patch, or show how to do it concretely?

  3. markm commented on Jun 26, 2011

    markmmannequin
    Mannequin

    This mostly a documentation concern - correct? ctypes.wintypes is sparsely documented - in 2.7 the help for it seems to be:
    "The ctypes.wintypes module provides quite some other Windows specific data types, for example HWND, WPARAM, or DWORD. Some useful structures like MSG or RECT are also defined."

    How about the following solution:
    First of all get the previous release information

    • hg log / hg revert / import wintypes / dir(wintypes)

    Future changes have to be updated manually (which probably is not a big deal as it is a reasonably stable module)

    In fact I went and got the revision when each attribute was added... (some of those are just ctypes leakage)
    {36899: ['ARRAY', 'MSG',
    'ArgumentError', 'OLESTR',
    'Array', 'OleDLL',
    'BOOL', 'POINT',
    'BYTE', 'POINTER',
    'BigEndianStructure', 'POINTL',
    'DEFAULT_MODE', 'PYFUNCTYPE',
    'DWORD', 'PyDLL',
    'FILETIME', 'RECT',
    'FormatError', 'RECTL',
    'GetLastError', 'RGB',
    'HANDLE', 'RTLD_GLOBAL',
    'HDC', 'RTLD_LOCAL',
    'HGDIOBJ', 'SIZE',
    'HINSTANCE', 'SIZEL',
    'HKEY', 'SetPointerType',
    'HMENU', 'Structure',
    'HMODULE', 'ULARGE_INTEGER',
    'HPEN', 'ULONG',
    'HRESULT', 'Union',
    'HRGN', 'VARIANT_BOOL',
    'HTASK', 'WIN32_FIND_DATAA',
    'HWND', 'WIN32_FIND_DATAW',
    'LARGE_INTEGER', 'WINFUNCTYPE',
    'LCID', 'WORD',
    'LONG', 'WPARAM',
    'LPARAM', 'WinDLL',
    'LPCOLESTR', 'WinError',
    'LPCSTR', 'alignment',
    'LPCWSTR', 'get_errno',
    'LPOLESTR', 'get_last_error',
    'LPSTR', 'resize',
    'LPWSTR', 'set_conversion_mode',
    'LibraryLoader', 'set_errno',
    'LittleEndianStructure', 'set_last_error',
    'MAX_PATH',]

    38788: ['ATOM', 'HRSRC',
    'BOOLEAN', 'HSTR',
    'COLORREF', 'HWINSTA',
    'HACCEL', 'LANGID',
    'HBITMAP', 'LCTYPE',
    'HBRUSH', 'LGRPID',
    'HCOLORSPACE', 'SC_HANDLE',
    'HDESK', 'SERVICE_STATUS_HANDLE',
    'HDWP', 'SMALL_RECT',
    'HENHMETAFILE', '_COORD',
    'HFONT', '_FILETIME',
    'HGLOBAL', '_POINTL',
    'HHOOK', '_RECTL',
    'HICON', '_SMALL_RECT',
    'HKL', 'tagMSG',
    'HLOCAL', 'tagPOINT',
    'HMETAFILE', 'tagRECT',
    'HMONITOR', 'tagSIZE',
    'HPALETTE',]

    38830: ['DOUBLE',
    'UINT',
    'WCHAR',
    '_LARGE_INTEGER',
    '_SimpleCData',
    '_ULARGE_INTEGER',
    '__all__'],

    48320: ['FLOAT',
    'INT',
    'LPCVOID',
    'LPVOID',
    'SHORT',
    'USHORT']}

    48320 -> 2.7?
    38830 -> 2.5?
    38788 -> 2.5?
    36899 -> 2.4?

    So we need a doc patch? Should we update the older 'What's new in Python 2.x' for added attribs?

  4. orsenthil commented on Jun 26, 2011

    @orsenthil
    Member

    On Sun, Jun 26, 2011 at 10:44:59AM +0000, Mark Mc Mahon wrote:

    So we need a doc patch? Should we update the older 'What's new in
    Python 2.x' for added attribs?

    The Documentation patch may be applied only 2.7 and 3.2/3.3 releases
    now. What's new is updated for the upcoming release only.

    So, if documenting those constants will help in 2.7.x and 3.2.x and
    3.3, it would be helpful to provide patches against those lines and it
    can be applied. As you said, the future version can be updated, but we
    cannot go back with updating the documentation of the already released
    versions.

  5. techtonik commented on Jul 3, 2011

    techtonikmannequin
    MannequinAuthor

    On Mon, Jun 27, 2011 at 12:18 AM, Senthil Kumaran
    <report@bugs.python.org> wrote:

    As you said, the future version can be updated, but we
    cannot go back with updating the documentation of the already released
    versions.

    Why?

    anatoly t.

  6. orsenthil commented on Jul 3, 2011

    @orsenthil
    Member

    What's new docs are usually for what is coming up new in the upcoming
    releases. It is not updated once the release is done. Bug fixes and
    related docs are updated in documentation.

  7. changed the title [-]autodocument first appearance of ctypes.wintypes constants[/-] [+]Document ctypes.wintypes constants[/+] on Nov 8, 2017
  8. transferred this issue fromon Apr 10, 2022
  9. added
    3.14bugs and security fixes
    3.15bugs and security fixes
    3.16new features, bugs and security fixes
    and removed on Oct 19, 2026
  10. added a commit that references this issue on Oct 19, 2026
  11. added 2 commits that reference this issue on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15bugs and security fixes3.16new features, bugs and security fixesdocsDocumentation in the Doc dirtopic-ctypes

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions