| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
integers checked for integer overflow but longs did not.
|
|
|
|
|
|
|
| |
andsq_inplace_repeat. This fixes a number of corner case bugs (see #624807).
Consolidate the int and long sequence repeat code. Before the change, integers
checked for integer overflow but longs did not.
|
|
|
|
|
| |
Python 2.2.x backport candidate. (This bug has been around since
Python 1.6.)
|
|
|
|
|
|
|
| |
Obtain cleaner coding and a system wide
performance boost by using the fast, pre-parsed
PyArg_Unpack function instead of PyArg_ParseTuple
function which is driven by a format string.
|
|
|
|
| |
experimental.
|
|
|
|
|
|
| |
blockstack_top could be 0 when blockstack[blockstack_top-1]
was referenced (ie blockstack[-1]) which crashed on hpux.
Patch & fix by Richie Hindle
|
|
|
|
| |
Some systems (HPUX at least) already define MIN/MAX for us
|
|
|
|
|
|
|
| |
Check return values after memory allocation.
Also use Py_True instead of PyInt_FromLong(1) for bool value.
Backport candidate.
|
|
|
|
|
| |
(file_read): Replaced assertion with mixed sign operation by a simple
comment (thank you Raymond). The algorithm is clear enough in that point.
|
|
|
|
|
|
|
|
| |
[ 643835 ] Set Next Statement for Python debuggers
with a few tweaks by me: adding an unsigned or two, mentioning that
not all jumps are allowed in the doc for pdb, adding a NEWS item and
a note to whatsnew, and AuCTeX doing something cosmetic to libpdb.tex.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[#521782] unreliable file.read() error handling
* Objects/fileobject.c
(file_read): Clear errors before leaving the loop in all situations,
and also check if some data was read before exiting the loop with an
EWOULDBLOCK exception.
* Doc/lib/libstdtypes.tex
* Objects/fileobject.c
Document that sometimes a read() operation can return less data than
what the user asked, if running in non-blocking mode.
* Misc/NEWS
Document the fix.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
containing class objects) are allowed as the second argument.
This makes issubclass() more similar to isinstance() where recursive
tuples are allowed too.
|
|
|
|
|
|
|
|
|
|
|
| |
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.
This closes SF patch #649608.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Most of these patches are from Thomas Heller, with long lines folded
by Tim. The change to test_descr.py is from Guido. See the bug report.
Not a bugfix candidate -- METH_CLASS is new in 2.3.
|
|
|
|
|
|
|
| |
tests. I found the logic too confusing to follow here, so rewrote more
than was likely absolutely necessary.
Bugfix candidate.
|
|
|
|
|
| |
Added related testcase.
Closes SF bug #643260.
|
|
|
|
| |
Simplifies the code and gets Just van Rossum's example to work.
|
|
|
|
|
|
| |
integer hash object returned by __hash__(). This accounts for some of
the "mystery leaks" in the sandbox datetime tests, but probably not
all of them.
|
| |
|
|
|
|
|
|
| |
[ 633152 ] list slice ass ignores subtypes of list
Allow arbitrary sequences on the RHS of extended slices.
|
|
|
|
|
|
|
| |
Just van Rossum showed a weird, but clever way for pure python code to
trigger the BadInternalCall. The C code had assumed that calling a class
constructor would return an instance of that class; however, classes that
abuse __new__ can invalidate that assumption.
|
| |
|
|
|
|
|
|
|
| |
the results of *setting* __name__ are not so surprising.
If people can suggest more tests, that'd be grand, or is what's there
sufficient?
|
|
|
|
|
|
|
| |
see problems with my code that I didn't see before the checkin, but:
When a subtype .mro() fails, we need to reset the type whose __bases__
are being changed, too. Fix + test.
|
|
|
|
|
|
| |
mro() methods. Now any exception aborts the whole __bases__ change.
And more tests.
|
| |
|
|
|
|
| |
method for constructing new dictionaries from sequences of keys.
|
|
|
|
| |
It's odd that gcc on my ibook didn't complain about this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ 635933 ] make some type attrs writable
Plus a couple of extra tests beyond what's up there.
It hasn't been as carefully reviewed as it perhaps should, so all readers
are encouraged, nay exhorted, to give this a close reading.
There are still a couple of oddities related to assigning to __name__,
but I intend to solicit python-dev's opinions on these.
|
|
|
|
|
|
| |
messages about MRO conflicts. (The tweaks include correcting spelling
errors, some refactoring to get the name of classic classes, and a
style nit or two.)
|
| |
|
| |
|
|
|
|
| |
dereference rather than the caller.
|
|
|
|
| |
both have a nb_remainer slot.
|
|
|
|
|
|
|
| |
dict() constructor. Example:
>>> dict(a=1, b=2)
{'a': 1, 'b': 2}
>>>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
long but the double is too big to fit in a long. Prevent that. This
closes some recent bug or patch on SF, but SF is down now so I can't
say which.
Bugfix candidate.
|
|
|
|
|
|
|
| |
that is outside the integer range no longer raises OverflowError, but
returns a long object instead.
This fixes SF bug http://www.python.org/sf/635115
|
| |
|
| |
|
|
|
|
| |
have a nb_float slot. This matches what PyInt_AsLong does.
|
|
|
|
|
| |
PyNumber_Remainder(). This fixes SF bug #615506 and allows string and unicode
subclasses to override __mod__.
|
|
|
|
|
|
| |
Py_Init crash". refchain cannot be cleared because objects can live across
Py_Finalize() and Py_Initialize() if they are kept alive by circular
references.
|