| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
module had been compiled. It gives too many spurious warnings.
|
| |
|
|
|
|
|
|
|
| |
The !PyType_Check(base) check snuck in as part of rev 2.215, but was
unrelated to the SF patch that is mentioned in the checkin comment.
The test is currently unnecessary because base is set to the return
value of best_bases(), which returns a type or NULL.
|
|
|
|
|
| |
"print repr(proxy(a))" and "proxy(a)" at an interactive prompt.
Closes SF bug #722763.
|
| |
|
|
|
|
|
| |
defering to the encodings package.
As described in [ 763111 ] mbcs encoding should skip encodings package
|
| |
|
|
|
|
|
|
| |
Submitted By: Christopher A. Craig
Fillin some missing decrefs.
|
| |
|
|
|
|
|
|
| |
The language reference says you must return an int or a bool. This
fix limits the scope of SF bug 759227 (infinite recursion) to
subclasses of int.
|
| |
|
| |
|
|
|
|
|
|
| |
Check the argument to classmethod for callability.
Backport candidate.
|
| |
|
|
|
|
| |
huge start and stop arguments. Add tests.
|
| |
|
|
|
|
|
| |
- don't use min() and max()
- interpret negative start/stop argument like negative slice indices
|
|
|
|
| |
Also, modified UserList.index() to match and expanded the related tests.
|
|
|
|
| |
for SF bug 742860 (the next item).
|
| |
|
|
|
|
|
| |
names. Unfortunately, this is not bulletproof since the module
dictionary can be modified directly.
|
| |
|
|
|
|
| |
or emptying __dict__, just as we do for classic classes.
|
| |
|
|
|
|
|
| |
* Allow tuple re-use
* Call tp_iternext directly
|
|
|
|
|
|
|
| |
float_pow(): Don't let the platform pow() raise -1.0 to an integer power
anymore; at least glibc gets it wrong in some cases. Note that
math.pow() will continue to deliver wrong (but platform-native) results
in such cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tp_free is NULL or PyObject_Del at the end. Because it's a base type
it must call tp_free in its dealloc function, and because it's gc'able
it must not call PyObject_Del.
inherit_slots(): Don't inherit tp_free unless the type and its base
agree about whether they're gc'able. If the type is gc'able and the
base is not, and the base uses the default PyObject_Del for its
tp_free, give the type PyObject_GC_Del for its tp_free (the appropriate
default for a gc'able type).
cPickle.c: The Pickler and Unpickler types claim to be base classes
and gc'able, but their dealloc functions didn't call tp_free.
Repaired that. Also call PyType_Ready() on these typeobjects, so
that the correct (PyObject_GC_Del) default memory-freeing function
gets plugged into these types' tp_free slots.
|
|
|
|
| |
Fulfilled request to special case repetitions of lists of length 0 or 1.
|
| |
|
|
|
|
| |
are not supported.
|
| |
|
| |
|
|
|
|
|
| |
type implementation. Note that this same example lives in
Modules/xxmodule.c. (It is just as out of date there.)
|
|
|
|
| |
riscospath.extsep, and use os.extsep throughout.
|
|
|
|
| |
the terminal encoding on Windows and Unix.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reverted a Py2.3b1 change to iterator in subclasses of list and tuple.
They had been changed to use __getitem__ whenever it had been overriden
in the subclass.
This caused some usabilty and performance problems. Also, it was
inconsistent with the rest of python where many container methods
access the underlying object directly without first checking for
an overridden getter. Users needing a change in iterator behavior
should override it directly.
|
|
|
|
|
| |
Adjust resize argument for dict.update() and dict.copy().
Extends the previous change to dict.__setitem__().
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Increase dictionary growth rate resulting in more sparse dictionaries,
fewer lookup collisions, increased memory use, and better cache
performance. For dicts with over 50k entries, keep the current
growth rate in case an application is suffering from tight memory
constraints.
* Set the most common case (no resize) to fall-through the test.
|
| |
|
|
|
|
|
|
|
|
| |
Some version of gcc in the "RTEMS port running on the Coldfire (m5200)
processor" generates bad code for a loop in long_from_binary_base(),
comparing the wrong half of an int to a short. The patch changes the
decl of the short temp to be an int temp instead. This "simplifies"
the code enough that gcc no longer blows it.
|
|
|
|
|
|
|
| |
and adds.
* Note that dictionary iteration is negatively impacted by additional
sparseness.
|
|
|
|
| |
only. Repaired, and added new tests to test_file.py.
|
| |
|
|
|
|
| |
there or where to find it.
|
| |
|
| |
|
|
|
|
| |
functions with different signatures.
|
|
|
|
|
|
|
|
| |
As a side issue on this bug, it was noted that list and tuple iterators
used macros to directly access containers and would not recognize
__getitem__ overrides. If the method is overridden, the patch returns
a generic sequence iterator which calls the __getitem__ method; otherwise,
it returns a high custom iterator with direct access to container elements.
|
| |
|