Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py3k: fixes for test_ctypes #45660

Closed
amauryfa opened this issue Oct 23, 2007 · 9 comments
Closed

py3k: fixes for test_ctypes #45660

amauryfa opened this issue Oct 23, 2007 · 9 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@amauryfa
Copy link
Member

BPO 1319
Nosy @gvanrossum, @loewis, @theller, @amauryfa
Files
  • ctypes.diff
  • test_prototypes.patch
  • _ctypes.patch
  • 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 = 'https://github.com/gvanrossum'
    closed_at = <Date 2007-10-24.18:41:47.429>
    created_at = <Date 2007-10-23.22:50:18.484>
    labels = ['interpreter-core']
    title = 'py3k: fixes for test_ctypes'
    updated_at = <Date 2007-10-24.19:37:55.952>
    user = 'https://github.com/amauryfa'

    bugs.python.org fields:

    activity = <Date 2007-10-24.19:37:55.952>
    actor = 'theller'
    assignee = 'gvanrossum'
    closed = True
    closed_date = <Date 2007-10-24.18:41:47.429>
    closer = 'gvanrossum'
    components = ['Interpreter Core']
    creation = <Date 2007-10-23.22:50:18.484>
    creator = 'amaury.forgeotdarc'
    dependencies = []
    files = ['8600', '8602', '8603']
    hgrepos = []
    issue_num = 1319
    keywords = ['patch']
    message_count = 9.0
    messages = ['56696', '56701', '56711', '56713', '56715', '56720', '56721', '56722', '56724']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'loewis', 'theller', 'amaury.forgeotdarc']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1319'
    versions = ['Python 3.0']

    @amauryfa
    Copy link
    Member Author

    Updates to ctypes for python 3.0 to make the tests pass.

    Notable changes are:

    • return bytes instead of str8
    • integers in range(256) are accepted as "one char string":
      libc.strchr("abcdef", 98) is now valid.
    • directly use the wide-char version of the win32 function LoadLibrary.

    Tested on WinXP, with Visual Studio Express 2005.

    @amauryfa amauryfa added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Oct 23, 2007
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Oct 24, 2007

    Thomas, can you take a look? If not, please unassign.

    @loewis loewis mannequin assigned theller Oct 24, 2007
    @gvanrossum
    Copy link
    Member

    Looks good to me. I can check it in if Thomas is okay with that (or if
    he remains silent long enough :-).

    @theller
    Copy link

    theller commented Oct 24, 2007

    Guido van Rossum schrieb:

    Looks good to me. I can check it in if Thomas is okay with that (or if
    he remains silent long enough :-).

    Looks good to me too. Please check it in if you have time ;-)

    @gvanrossum
    Copy link
    Member

    Committed revision 58639.
    You're welcome, Thomas.
    And Thanks, Amaury! Keep them coming...!

    @gvanrossum gvanrossum assigned gvanrossum and unassigned theller Oct 24, 2007
    @theller
    Copy link

    theller commented Oct 24, 2007

    Looking again, I found a bug in the patch.

    In the function _get_args(), the local variable 'name' was
    changed from 'char *' to 'PyObject *'. In line 2995, it is
    passed to PyErr_Format with a '%s' format code:

    if (name)
    	PyErr_Format(PyExc_TypeError,
    

    ==> "required argument '%s' missing", name);

    A unittest but no fix for the bug for this issue is
    attached (can I submit patches via mail?)

    @theller
    Copy link

    theller commented Oct 24, 2007

    Here's the bugfix - is it correct?

    @gvanrossum
    Copy link
    Member

    Looks good. Can you check it in?

    @theller
    Copy link

    theller commented Oct 24, 2007

    Committed as rev 58642.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants