Martin v. Löwis
99815892f6
New environment variable PYTHONIOENCODING.
2008-06-01 07:20:46 +00:00
Eric Smith
dc13b79a38
Refactor and clean up str.format() code (and helpers) in advance of optimizations.
2008-05-30 18:10:04 +00:00
Raymond Hettinger
65856600ed
Issue 2784: fix leaks in exception exit.
2008-05-30 06:37:27 +00:00
Gregory P. Smith
933d3731de
Fix issue2588: Do not execute str[size-1] = '\0' when a 0 size is
...
passed in. (The assert won't prevent this in non-debug builds).
2008-05-26 22:07:28 +00:00
Gregory P. Smith
23921f00e8
Fix issue2589: there was a potential integer overflow leading to
...
memory corruption on esoteric platforms and incorrect behavior on
normal platforms.
2008-05-26 21:16:34 +00:00
Benjamin Peterson
dacde0d6ae
turn PyErr_WarnPy3k into a macro
2008-05-26 17:43:53 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
Christian Heimes
3497f94476
First step of the C API rename:
...
renamed Include/bytesobject.h to Include/bytearrayobject.h
renamed Include/stringobject.h to Include/bytesobject.h
added Include/stringobject.h with aliases
2008-05-26 12:29:14 +00:00
Martin v. Löwis
4dd019fde3
Patch #2488 : Add sys.maxsize.
2008-05-20 08:11:19 +00:00
Benjamin Peterson
c6d64ec83f
revert 63425 over Guido's Febuary message about this, that I missed
2008-05-17 20:09:42 +00:00
Benjamin Peterson
d7943cb71d
fix spelling
2008-05-17 19:51:10 +00:00
Benjamin Peterson
79a922d6df
add Py3k warnings to oct and hex. backport hex behavior (because it's not different)
2008-05-17 19:21:20 +00:00
Georg Brandl
9c5b51541c
Fix a refleak in the _warnings module.
2008-05-13 21:32:03 +00:00
Benjamin Peterson
b9030f4f0d
#2196 hasattr now allows SystemExit and KeyboardInterrupt to propagate
2008-05-12 00:41:23 +00:00
Eric Smith
cf537ff39e
Addresses issue 2802: 'n' formatting for integers.
...
Adds 'n' as a format specifier for integers, to mirror the same
specifier which is already available for floats. 'n' is the same as
'd', but inserts the current locale-specific thousands grouping.
I added this as a stringlib function, but it's only used by str type,
not unicode. This is because of an implementation detail in
unicode.format(), which does its own str->unicode conversion. But the
unicode version will be needed in 3.0, and it may be needed by other
code eventually in 2.6 (maybe decimal?), so I left it as a stringlib
implementation. As long as the unicode version isn't instantiated,
there's no overhead for this.
2008-05-11 19:52:48 +00:00
Georg Brandl
b52a74b517
#2816 : clarify error messages for EOF while scanning strings.
2008-05-11 15:07:39 +00:00
Andrew M. Kuchling
6c02916dfb
#1792 : Improve performance of marshal.dumps() on large objects by increasing
...
the size of the buffer more quickly.
2008-05-11 13:33:56 +00:00
Brett Cannon
be1501b976
Fix sys.flags to properly expose bytes_warning.
...
Closes issue #2790 .
2008-05-08 20:23:06 +00:00
Christian Heimes
af748c3ab8
Implemented PEP 370
2008-05-06 22:41:46 +00:00
Benjamin Peterson
d295032910
Fix logic error in Python/_warnings.c and add a test to verify
2008-05-06 22:18:11 +00:00
Brett Cannon
e3dcb01bfc
Fix a bug in the handling of the stacklevel argument in warnings.warn() where
...
the stack was being unwound by two levels instead of one each time.
2008-05-06 04:37:31 +00:00
Brett Cannon
8a232cc385
Add a DeprecationWarning for when warnings.showwarning() is set to a function
...
that lacks support for the new 'line' argument.
2008-05-05 05:32:07 +00:00
Benjamin Peterson
2b30ea068f
The compiling struct is now passed around to all AST helpers (see issue 2720)
2008-05-03 15:56:42 +00:00
Brett Cannon
64a4bbeb25
Fix the C implementation of 'warnings' to infer the filename of the module that
...
raised an exception properly when __file__ is not set, __name__ == '__main__',
and sys.argv[0] is a false value.
Closes issue2743.
2008-05-03 03:19:39 +00:00
Brett Cannon
ab9cc1b7ad
Fix some indentation errors.
2008-05-03 01:02:41 +00:00