Commit Graph

2526 Commits

Author SHA1 Message Date
Martin v. Löwis
5d12abe0b1 Patch #1075: Use wide API to format error messages. 2007-09-03 07:40:24 +00:00
Collin Winter
1966f1c98f Fix refleaks exposed by test_raise. 2007-09-01 20:26:44 +00:00
Eric Smith
37f10386f1 Changed to use 'U' argument to PyArg_ParseTuple, instead of manually checking for unicode objects. 2007-09-01 10:56:01 +00:00
Martin v. Löwis
5deb2101df Explicitly convert err->text to Unicode. Fixes #1069. 2007-08-31 11:17:42 +00:00
Neal Norwitz
64fd6fb254 Ugh, hopefully I can get this right. The code is only compiled on Win64 2007-08-31 05:32:33 +00:00
Neal Norwitz
b879f57b32 Try to fix the problem of passing a non-int on Win64 right this time. 2007-08-31 05:20:36 +00:00
Neal Norwitz
538d17aa23 Try to fix a problem with large values on Win64. Diagnosed by Thomas Heller 2007-08-31 04:31:47 +00:00
Neal Norwitz
c2550c7b1c Remove chr8, we're not likely to need it at this point 2007-08-31 04:17:51 +00:00
Guido van Rossum
71d4a34c39 Customary 2nd submit of this file after it's been changed. 2007-08-31 04:03:25 +00:00
Eric Smith
81936699c8 Added test cases for string.Formatter subclassing.
Made format_spec parameter to builtin format optional, defaults to
empty string.  Added test cases.
2007-08-31 01:14:01 +00:00
Collin Winter
32347fb29b Update import.c's MAGIC value for the new raise syntax (as opposed to merely updating the comment). 2007-08-31 00:42:15 +00:00
Collin Winter
828f04ac3f Issue #1066: implement PEP 3109, 2/3 of PEP 3134. 2007-08-31 00:04:24 +00:00
Thomas Wouters
d2cf20eea2 Remove the simple slicing API. All slicing is now done with slice objects. 2007-08-30 22:57:53 +00:00
Guido van Rossum
63175a1330 [Oops, I forgot half of the patch.]
Patch # 1050 by Amaury Forgeot d'Arc.
On Windows, debug builds insert stack probes, and recursive functions
tend to exhaust the stack faster.
This patch reduces the marshal maximum depth from 2000 to 1500 for debug
builds only. Optimized builds are not affected.
This allows test_marshal to pass with debug builds.
2007-08-29 20:39:13 +00:00
Guido van Rossum
fb67be2f6b Three patches from issue #1047, by Amaury Forgeot d'Arc:
1/ getargs.diff adds the 'Z' and 'Z#' format specifiers for
PyArg_ParseTuple. They mimic z and z# for unicode strings, by accepting
a Unicode or None (in which case the Py_UNICODE* pointer is set to
NULL). With doc and tests.

2/ subprocess.diff converts file PC/_subprocess.c to unicode. We use the
Unicode version of the win32 api (and Z conversion from previous patch)

3/ stdout.diff: sys.stdout must not convert the line endings, Windows
already does it.
Without this patch, when redirecting the output of python, the file
contains \r\r\n for each line. (test_subprocess did catch this)

However, I (GvR) removed the change to _fileio.c (included in the
patches) that prevents closing file descripors < 3 from being closed;
I think that needs to be solved in a different way.
2007-08-29 18:38:11 +00:00
Eric Smith
56e4a840bc Added test to ensure __format__ methods return unicode objects. 2007-08-27 15:31:40 +00:00
Guido van Rossum
a4b8d1de7c Some changes in preparation of stricter rules about mixing str and bytes. 2007-08-27 15:02:28 +00:00
Eric Smith
e226b55963 PEP 3101: Removed _formatter_xxx routines from sysmodule, and made them unicode methods instead (per GvR suggestion). 2007-08-27 11:28:18 +00:00
Neal Norwitz
8a4eb298e2 Fix refleaks in test_unicode and test_string related to the new format code.
Stop polluting namespace.
2007-08-27 07:24:17 +00:00
Neal Norwitz
2bad970293 Make some internal functions static 2007-08-27 06:19:22 +00:00
Eric Smith
7ade6485ab PEP 3101: Completed string.Formatter class. Reimplemented field_name to object transformation. 2007-08-26 22:27:13 +00:00
Neal Norwitz
80e7f27e62 Use unicode and remove support for some uses of str8. 2007-08-26 06:45:23 +00:00
Neal Norwitz
da059e3585 Use unicode 2007-08-26 05:33:45 +00:00
Neal Norwitz
5616c6d690 Fix a couple of warnings 2007-08-26 05:32:41 +00:00
Neal Norwitz
6ea45d3341 Use unicode and remove support for some uses of str8. 2007-08-26 04:19:43 +00:00