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.
Created on 2010年05月29日 01:38 by vstinner, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| py_buildvalue_removeU.patch | vstinner, 2010年05月29日 02:39 | |||
| Messages (6) | |||
|---|---|---|---|
| msg106700 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年05月29日 01:38 | |
"U" and "U#" formats were introduced by r55433 (Python3). At this same, "s" and "U" formats were different: "s" called PyString_FromStringAndSize() and "U" called PyUnicode_FromStringAndSize(). Two months later, PyString_FromStringAndSize() was replaced by PyUnicode_FromStringAndSize() for format "s", and so both formats are exactly the same. "U" and "U#" were introduced during the transition between bytes, str and unicode. They can now be replaced by "s" and "s#", and then be removed. There is just one usage of "U": definition of sys.subversion (Python/sysmodule.c), whereas there are 36 usages of "s" format. (U# and s# are not used.) |
|||
| msg106704 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年05月29日 02:39 | |
Less extreme patch: set 'U' as an alias to 's' (and 'U#' as an alias to 's#'). Replace usage of 'U' by 's'. Note: 'z' is also an alias to 's', and 'z#' an alias to 's#'. |
|||
| msg106880 - (view) | Author: Walter Dörwald (doerwalter) * (Python committer) | Date: 2010年06月02日 12:25 | |
The code for case 's'/'z' in py3k is indeed the same as for case 'U'. The patch looks good to me. IMHO removing 'U' should only be done once Py2 is dead. |
|||
| msg107206 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年06月06日 18:52 | |
> IMHO removing 'U' should only be done once Py2 is dead. What do you mean by "once Py2 is dead"? Can I apply the patch in Python 3.2 now? |
|||
| msg107260 - (view) | Author: Walter Dörwald (doerwalter) * (Python committer) | Date: 2010年06月07日 08:55 | |
Yes, I think you should apply the patch. |
|||
| msg107276 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年06月07日 20:00 | |
Commited to py3k (r81807), blocked in 3.1 (r81808). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:01 | admin | set | github: 53094 |
| 2010年06月07日 20:00:46 | vstinner | set | status: open -> closed resolution: fixed messages: + msg107276 |
| 2010年06月07日 08:55:43 | doerwalter | set | messages: + msg107260 |
| 2010年06月06日 18:52:17 | vstinner | set | messages: + msg107206 |
| 2010年06月02日 12:25:37 | doerwalter | set | messages: + msg106880 |
| 2010年05月29日 02:39:47 | vstinner | set | title: Remove "U" and "U#" formats of Py_BuildValue() -> Deprecate or remove "U" and "U#" formats of Py_BuildValue() |
| 2010年05月29日 02:39:31 | vstinner | set | files:
+ py_buildvalue_removeU.patch keywords: + patch messages: + msg106704 |
| 2010年05月29日 01:38:47 | vstinner | create | |