| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
counts for example.
|
| |
|
|
|
|
|
|
|
| |
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
|
|
|
|
|
|
| |
Introduce overflow checking into list_inplace_repeat.
Backport candidate, possibly.
|
|
|
|
|
|
| |
Just move over to the public API names.
Closes issue1238.
|
|
|
|
| |
All this code already exists above starting at line 653.
|
|
|
|
| |
The possibility of overflow was sending some newsgroup posters into a tizzy.
|
|
|
|
| |
don't worry about any self-referring tuples.
|
|
|
|
|
|
|
|
|
|
| |
Python code; but it is possible from C. object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code.. Both found
thanks to BaseException and how it handles its repr.
Closes issue #1686386. Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
|
|
|
|
|
| |
Make tell() mark CRLF as a newline.
With unit test.
|
|
|
|
|
|
|
| |
predictable to being completely predictable. The value of hash(n)
is unchanged for any n that's small enough to be representable as an
int, and also unchanged for the vast majority of long integers n of
reasonable size.
|
|
|
|
| |
py3k branch ;)
|
|
|
|
|
|
| |
PyObject_Print().
Closes issue #1164.
|
|
|
|
|
|
|
| |
no-no.
Fixes issue #1147. Need to fix 2.5 to raise a proper warning if a string
exception is passed in.
|
|
|
|
|
|
|
|
| |
Backport abc.py and isinstance/issubclass overloading to 2.6.
I had to backport test_typechecks.py myself, and make one small change
to abc.py to avoid duplicate work when x.__class__ and type(x) are the
same.
|
|
|
|
| |
Closes issue #1096.
|
|
|
|
|
|
|
| |
ever going back out to Python code in PyObject_Call(). Required introducing a
static RuntimeError instance so that normalizing an exception there is no
reliance on a recursive call that would put the exception system over the
recursion check itself.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Specialcase extended slices that amount to a shallow copy the same way as
is done for simple slices, in the tuple, string and unicode case.
- Specialcase step-1 extended slices to optimize the common case for all
involved types.
- For lists, allow extended slice assignment of differing lengths as long
as the step is 1. (Previously, 'l[:2:1] = []' failed even though
'l[:2] = []' and 'l[:2:None] = []' do not.)
- Implement extended slicing for buffer, array, structseq, mmap and
UserString.UserString.
- Implement slice-object support (but not non-step-1 slice assignment) for
UserString.MutableString.
- Add tests for all new functionality.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(backport)
|
|
|
|
|
| |
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
|
|
|
|
| |
with %G.
|
|
|
|
|
|
|
|
|
| |
Py_ssize_t members.
Simplify the implementation of UnicodeError objects:
start and end attributes are now stored directly as
Py_ssize_t members, which simplifies various get and
set functions.
|
|
|
|
|
|
| |
This also catches another condition that can overflow.
Will backport.
|
|
|
|
|
|
|
| |
a large width is passed on 32-bit platforms. Found by Google.
It would be good for people to review this especially carefully and verify
I don't have an off by one error and there is no other way to cause overflow.
|
|
|
|
| |
Will backport to 2.5.
|
| |
|
| |
|
|
|
|
|
|
|
| |
deprecated and will be changed/removed in Python 3.0.
This patch is mostly from Anthony. I tweaked some format and added
a little doc.
|
| |
|
|
|
|
| |
accessing the message attribute instead of using the descriptor.
|
|
|
|
|
|
|
| |
Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()
fails.
Will backport.
|
| |
|
|
|
|
| |
deal with the peculiarities of classobject's implementation of the number protocol. The nb_long method of classobject now falls back to nb_int if there is no __long__ attribute present.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Reenable modules on x64 that had been disabled aeons ago for Itanium.
- Cleared up confusion about compilers for 64 bit windows. There is only Itanium and x64. Added macros MS_WINI64 and MS_WINX64 for those rare cases where it matters, such as the disabling of modules above.
- Set target platform (_WIN32_WINNT and WINVER) to 0x0501 (XP) for x64, and 0x0400 (NT 4.0) otherwise, which are the targeted minimum platforms.
- Fixed thread_nt.h. The emulated InterlockedCompareExchange function didn´t work on x64, probaby due to the lack of a "volatile" specifier. Anyway, win95 is no longer a target platform.
- Itertools module used wrong constant to check for overflow in count()
- PyInt_AsSsize_t couldn't deal with attribute error when accessing the __long__ member.
- PyLong_FromSsize_t() incorrectly specified that the operand were unsigned.
With these changes, the x64 passes the testsuite, for those modules present.
|
|
|
|
| |
the function there is another check for z != Py_None.
|
|
|
|
|
|
|
| |
- __dict__ descriptor abuse for subclasses of built-in types
- subclassing from both ModuleType and another built-in types
Thanks zseil for the patch.
|
|
|
|
| |
_PyFile_SanitizeMode(). Use this function in posixmodule.c when implementing fdopen(). This fixes test_subprocess.py for a VisualStudio 2005 compile.
|
| |
|
|
|
|
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2007-March/071796.html .
I've kept a couple of still-valid extra tests in test_descr, but didn't
bother to sort through the new comments and refactorings added in r53997
to see if some of them could be kept. If so, they could go in a
follow-up check-in.
|
| |
|
|
|
|
| |
setting a plain string, ie don't expand to single letter identifiers.
|
|
|
|
| |
signed chars in frameobject.c which can occur with opcodes > 127
|