This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: py3k: fixes for test_ctypes
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: amaury.forgeotdarc, gvanrossum, loewis, theller
Priority: normal Keywords: patch

Created on 2007-10-23 22:50 by amaury.forgeotdarc, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ctypes.diff amaury.forgeotdarc, 2007-10-23 22:50
test_prototypes.patch theller, 2007-10-24 19:16
_ctypes.patch theller, 2007-10-24 19:27
Messages (9)
msg56696 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2007-10-23 22:50
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.
msg56701 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-10-24 05:57
Thomas, can you take a look? If not, please unassign.
msg56711 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-24 18:14
Looks good to me. I can check it in if Thomas is okay with that (or if
he remains silent long enough :-).
msg56713 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2007-10-24 18:30
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 ;-)
msg56715 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-24 18:41
Committed revision 58639.
You're welcome, Thomas.
And Thanks, Amaury!  Keep them coming...!
msg56720 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2007-10-24 19:16
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?)
msg56721 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2007-10-24 19:27
Here's the bugfix - is it correct?
msg56722 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-24 19:34
Looks good. Can you check it in?
msg56724 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2007-10-24 19:37
Committed as rev 58642.
History
Date User Action Args
2022-04-11 14:56:27adminsetgithub: 45660
2007-10-24 19:37:55thellersetmessages: + msg56724
2007-10-24 19:34:00gvanrossumsetmessages: + msg56722
2007-10-24 19:27:37thellersetfiles: + _ctypes.patch
messages: + msg56721
2007-10-24 19:16:32thellersetfiles: + test_prototypes.patch
messages: + msg56720
2007-10-24 18:41:47gvanrossumsetstatus: open -> closed
assignee: theller -> gvanrossum
resolution: accepted
messages: + msg56715
2007-10-24 18:30:07thellersetmessages: + msg56713
2007-10-24 18:14:43gvanrossumsetnosy: + gvanrossum
messages: + msg56711
2007-10-24 05:57:30loewissetkeywords: + patch
assignee: theller
messages: + msg56701
nosy: + loewis, theller
2007-10-23 22:50:18amaury.forgeotdarccreate