| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
|
| |
|
| |
|
| |
|
|
|
|
| |
the original code object backing the generator. Patch by Collin Winter.
|
|
|
|
| |
Py_REFCNT. Macros for b/w compatibility are available.
|
|
|
|
|
|
|
| |
no-no.
Fixes issue #1147. Need to fix 2.5 to raise a proper warning if a string
exception is passed in.
|
|
|
|
|
| |
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
|
|
|
|
| |
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
|
|
|
|
|
|
| |
slot_tp_del(), but while the latter had to cater to types
that don't participate in GC, we know that generators do.
That allows strengthing an assert().
|
|
|
|
|
|
| |
- In functions where we already hold the same object in differently typed
pointers, use the correctly typed pointer instead of casting the other
pointer a second time.
|
|
|
|
|
|
|
|
|
|
|
| |
problems: first, PyGen_NeedsFinalizing() had an off-by-one bug that
prevented it from ever saying a generator didn't need finalizing, and
second, frame objects cleared themselves in a way that caused their
owning generator to think they were still executable, causing a double
deallocation of objects on the value stack if there was still a loop
on the block stack. This revision also removes some unnecessary
close() operations from test_generators that are now appropriately
handled by the cycle collector.
|
| |
|
|
|
|
| |
pointer dereferences.
|
| |
|
|
|
|
|
|
| |
"O" arguments, so must not decref them. This accounts
for why running test_contextlib.test_main() in a loop
eventually tried to deallocate Py_None.
|
|
|
|
|
|
|
|
| |
that are suspended outside of any try/except/finally blocks to be
garbage collected even if they are part of a cycle. Generators that
suspend inside of an active try/except or try/finally block (including
those created by a ``with`` statement) are still not GC-able if they
are part of a cycle, however.
|
| |
|
|
|
|
|
| |
Add (int) casts to silence compiler warnings.
Raise Python exceptions for overflows.
|
|
|
|
|
|
|
|
|
| |
added message attribute compared to the previous version of Exception. It is
also a new-style class, making all exceptions now new-style. KeyboardInterrupt
and SystemExit inherit from BaseException directly. String exceptions now
raise DeprecationWarning.
Applies patch 1104669, and closes bugs 1012952 and 518846.
|
|
|
|
|
|
|
| |
* Allow the 3rd argument to generator.throw() to be None.
The 'raise' statement does the same, and anyway it follows the
general policy that optional arguments of built-ins should, when
reasonable, have a default value specifiable from Python.
|
|
|
|
|
|
|
|
|
| |
was never called during interpreter shutdown GC, so the f_back!=NULL
assertion was correct. Now that generators get close()d during GC,
the assertion was being triggered because the generator close() was being
called as the top-level frame. However, nothing actually is broken by
this; it's just that the condition was unexpected in previous Python
versions.
|
|
|
|
|
| |
method still needs to support string exceptions, and allow None for the
third argument. Documentation updates are needed, too.
|
|
|
|
| |
(Contributed by Dima Dorfman)
|
| |
|
|
|
|
| |
* Change a XDECREF to DECREF (adding an assertion just to be sure).
|
|
|