[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-06 Thread miss-islington


miss-islington  added the comment:


New changeset f740818f3d92497c564d515a661039dc8434fc6c by Miss Islington (bot) 
in branch '3.7':
bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii 
character. (GH-10863)
https://github.com/python/cpython/commit/f740818f3d92497c564d515a661039dc8434fc6c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-06 Thread miss-islington


miss-islington  added the comment:


New changeset f9d8b686285926c985cfe88a8392a9a497c0a916 by Miss Islington (bot) 
in branch '3.6':
bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii 
character. (GH-10863)
https://github.com/python/cpython/commit/f9d8b686285926c985cfe88a8392a9a497c0a916


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10226

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10225

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 3ffa8b9ba190101f674a0e524e482a83ed09cccd by Serhiy Storchaka in 
branch 'master':
bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii 
character. (GH-10863)
https://github.com/python/cpython/commit/3ffa8b9ba190101f674a0e524e482a83ed09cccd


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10224

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-03 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +10099
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35384] The repr of ctypes.CArgObject fails for non-ascii character

2018-12-03 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The repr of the ctypes.CArgObject instance will fail when the value is a 
non-ascii character.

The code is:

sprintf(buffer, "",
self->tag, self->value.c);
...
return PyUnicode_FromString(buffer);

If self->value.c is out of range 0-127, buffer will contain a string not 
decodable with UTF-8.

There is a similar problem with non-ascii self->tag.

The following PR is purposed to fix this, but I don't know how to test it. 
Current tests only create CArgObject instances with tag='P' (in byref()).

--
components: Extension Modules, ctypes
messages: 330931
nosy: amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka
priority: normal
severity: normal
status: open
title: The repr of ctypes.CArgObject fails for non-ascii character
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com