Neal Norwitz [Mon, 17 Apr 2006 00:33:23 +0000 (00:33 +0000)]
moduleName can be NULL
Tim Peters [Sun, 16 Apr 2006 22:22:36 +0000 (22:22 +0000)]
Whitespace normalization.
Tim Peters [Sun, 16 Apr 2006 22:11:28 +0000 (22:11 +0000)]
Add missing SVN eol-style property to text files.
Thomas Wouters [Sun, 16 Apr 2006 22:04:49 +0000 (22:04 +0000)]
Use %zd instead of %i as format character (in call to PyErr_Format) for
Py_ssize_t argument.
Martin v. Löwis [Sun, 16 Apr 2006 20:55:38 +0000 (20:55 +0000)]
Patch #
1063914: Add clipboard_get.
Andrew M. Kuchling [Sun, 16 Apr 2006 19:53:27 +0000 (19:53 +0000)]
Add item
Martin v. Löwis [Sun, 16 Apr 2006 18:55:50 +0000 (18:55 +0000)]
Initialize structseq types only once.
Martin v. Löwis [Sun, 16 Apr 2006 18:55:07 +0000 (18:55 +0000)]
Update instructions for EXTRA_CFLAGS: configure ignores
them; they have to be passed to make.
Andrew M. Kuchling [Sun, 16 Apr 2006 18:45:11 +0000 (18:45 +0000)]
Describe contextlib module. (Done for today...)
Andrew M. Kuchling [Sun, 16 Apr 2006 18:20:05 +0000 (18:20 +0000)]
Write most of the 'writing context managers' section. I'd like comments on it,
but wait for a few hours before you read it; I'm still revising it
and will be tackling contextlib next.
Untabify
Thomas Wouters [Sun, 16 Apr 2006 16:26:28 +0000 (16:26 +0000)]
Make test_timeout not fail on systems with no dots in their fqdn.
Thomas Wouters [Sun, 16 Apr 2006 15:43:39 +0000 (15:43 +0000)]
Make test_warnings play nice with regrtest -R:: now that regrtest doesn't
always reload the module (specifically, it doesn't reload if the module has
a 'test_main'.)
Thomas Wouters [Sun, 16 Apr 2006 15:22:41 +0000 (15:22 +0000)]
Specialcase 'xs4all' (.nl/.net/.com/whatever else we have) as well as
'python.org' when deciding what server to use for the timeout tests; getting
tired of seeing the test fail on all my boxes ;P This'll still allow the
test to fail for hosts in the XS4ALL network that don't have an 'xs4all'
hostname, so maybe it should use a fallback scheme instead.
Thomas Wouters [Sun, 16 Apr 2006 15:11:33 +0000 (15:11 +0000)]
This test no longer leaks, and test_generators sufficiently tests it to
prevent unreported regression.
Neal Norwitz [Sun, 16 Apr 2006 03:37:19 +0000 (03:37 +0000)]
Fix valgrind problem with invalid memory read
Neal Norwitz [Sun, 16 Apr 2006 03:28:17 +0000 (03:28 +0000)]
Fix memory leak
Neal Norwitz [Sun, 16 Apr 2006 00:02:59 +0000 (00:02 +0000)]
err is no longer used
Thomas Wouters [Sat, 15 Apr 2006 23:27:28 +0000 (23:27 +0000)]
Add missing DECREF to PyErr_WriteUnraisable(). That function reports
exceptions that can't be raised any further, because (for instance) they
occur in __del__ methods. The coroutine tests in test_generators was
triggering this leak. Remove the leakers' testcase, and add a simpler
testcase that explicitly tests this leak to test_generators.
test_generators now no longer leaks at all, on my machine. This fix may also
solve other leaks, but my full refleakhunting run is still busy, so who
knows?
Tim Peters [Sat, 15 Apr 2006 22:59:10 +0000 (22:59 +0000)]
gen_del(): Looks like much this was copy/pasted from
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().
Tim Peters [Sat, 15 Apr 2006 22:51:26 +0000 (22:51 +0000)]
Remove now-unused variables from tp_traverse and tp_clear methods.
Thomas Wouters [Sat, 15 Apr 2006 22:44:07 +0000 (22:44 +0000)]
Consolidate 'leak_test1' and 'refleaks_tests', since they both test for the
same kind of thing.
Thomas Wouters [Sat, 15 Apr 2006 22:33:13 +0000 (22:33 +0000)]
Add missing PyObject_GC_Track call, causing *some* itertools.tee objects to
not be tracked by GC. This fixes 254 of test_generators' refleaks on my
machine, but I'm sure something else will make them come back :>
Not adding a separate test for this kind of cycle, since the existing
fib/m235 already test them in more extensive ways than any 'minimal' test
has been able to manage.
Thomas Wouters [Sat, 15 Apr 2006 21:47:09 +0000 (21:47 +0000)]
Use Py_VISIT in all tp_traverse methods, instead of traversing manually or
using a custom, nearly-identical macro. This probably changes how some of
these functions are compiled, which may result in fractionally slower (or
faster) execution. Considering the nature of traversal, visiting much of the
address space in unpredictable patterns, I'd argue the code readability and
maintainability is well worth it ;P
Thomas Wouters [Sat, 15 Apr 2006 21:41:56 +0000 (21:41 +0000)]
- Whitespace normalization
- 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.
Thomas Heller [Sat, 15 Apr 2006 20:43:22 +0000 (20:43 +0000)]
Fix typo.
Thomas Heller [Sat, 15 Apr 2006 20:23:54 +0000 (20:23 +0000)]
Fix for FreeBSD. Fixes http://python.org/sf/
1470353.
Looks like a libffi bug.
Martin v. Löwis [Sat, 15 Apr 2006 18:14:21 +0000 (18:14 +0000)]
Zap ZAP.
Martin v. Löwis [Sat, 15 Apr 2006 18:06:54 +0000 (18:06 +0000)]
Patch #
1470875: Building Python with MS Free Compiler.
Thomas Wouters [Sat, 15 Apr 2006 17:36:42 +0000 (17:36 +0000)]
Remove partial change (don't edit, commit and think at the same time :P)
Thomas Wouters [Sat, 15 Apr 2006 17:33:14 +0000 (17:33 +0000)]
Re-instate backward compatibility by defining Py_CLEAR if it isn't
available.
Thomas Wouters [Sat, 15 Apr 2006 17:28:34 +0000 (17:28 +0000)]
Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for
tp_clear methods.
Martin v. Löwis [Sat, 15 Apr 2006 12:47:23 +0000 (12:47 +0000)]
Clear dummy and emptyfrozenset, so that we don't have
dangling references in case of a Py_Initialize/Py_Finalize
cycle.
Martin v. Löwis [Sat, 15 Apr 2006 12:46:09 +0000 (12:46 +0000)]
Fix sys.getobjects(0): we get a reference to the
arena's "private" list of objects, so there might
be two references to that list.
Martin v. Löwis [Sat, 15 Apr 2006 12:45:05 +0000 (12:45 +0000)]
Unlink the structseq type from the global list of
objects before initializing it. It might be linked
already if there was a Py_Initialize/Py_Finalize
cycle earlier; not unlinking it would break the global
list.
Martin v. Löwis [Sat, 15 Apr 2006 08:41:11 +0000 (08:41 +0000)]
Patch #
1191700: Adjust column alignment in bdb breakpoint lists.
Backported to 2.4.
Martin v. Löwis [Sat, 15 Apr 2006 08:35:59 +0000 (08:35 +0000)]
Patch #
1191065: Fix preprocessor problems on systems where recvfrom
is a macro.
Martin v. Löwis [Sat, 15 Apr 2006 08:13:05 +0000 (08:13 +0000)]
Patch #
1161914: Add python-config.
Tim Peters [Sat, 15 Apr 2006 03:30:08 +0000 (03:30 +0000)]
frame_clear(): Explain why it's important to make the frame
look dead right at the start. Use Py_CLEAR for four more
frame members.
Tim Peters [Sat, 15 Apr 2006 03:22:46 +0000 (03:22 +0000)]
frame_traverse(): Use the standard Py_VISIT macro.
Py_VISIT: cast the `op` argument to PyObject* when calling
`visit()`. Else the caller has to pay too much attention to
this silly detail (e.g., frame_traverse needs to traverse
`struct _frame *` and `PyCodeObject *` pointers too).
Tim Peters [Sat, 15 Apr 2006 03:15:24 +0000 (03:15 +0000)]
Trimmed trailing whitespace.
Tim Peters [Sat, 15 Apr 2006 02:14:03 +0000 (02:14 +0000)]
There were no comments explaining what Py_CLEAR() did or
why it's important. Now there are ;-)
If someone else hasn't already, I'll add a Py_CLEAR cleanup
task to the TODO Wiki next.
Tim Peters [Sat, 15 Apr 2006 01:48:57 +0000 (01:48 +0000)]
Changed comments to make sense now that the LazyList-based
examples no longer require any explicit closing to avoid
leaking.
That the tee-based examples still do is (I think) still a
mystery. Part of the mystery is that gc.garbage remains
empty: if it were the case that some generator in a trash
cycle said it needed finalization, suppressing collection
of that cycle, that generator _would_ show up in gc.garbage.
So this is acting more like, e.g., some tp_traverse slot
isn't visiting all the pointers it should (in which case
the skipped pointer(s) would act like an external root,
silently suppressing collection of everything reachable
from it(them)).
Phillip J. Eby [Sat, 15 Apr 2006 01:02:17 +0000 (01:02 +0000)]
Fix SF#
1470508: crash in generator cycle finalization. There were two
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.
Thomas Wouters [Fri, 14 Apr 2006 21:23:42 +0000 (21:23 +0000)]
Coverity-found bug: datetime_strptime() failed to check for NULL return from
PySequence_GetItem of the time.strptime() result. Not a high probability
bug, but not inconceivable either, considering people can provide their own
'time' module.
Andrew M. Kuchling [Fri, 14 Apr 2006 20:35:17 +0000 (20:35 +0000)]
Add an item; better crediting; fix error in SQL example; minor edits
Andrew M. Kuchling [Fri, 14 Apr 2006 20:32:36 +0000 (20:32 +0000)]
Typo fix
Tim Peters [Fri, 14 Apr 2006 18:34:14 +0000 (18:34 +0000)]
Whitespace normalization.
Walter Dörwald [Fri, 14 Apr 2006 18:25:39 +0000 (18:25 +0000)]
Add a BufferedIncrementalEncoder class that can be used for implementing
an incremental encoder that must retain part of the data between calls
to the encode() method.
Fix the incremental encoder and decoder for the IDNA encoding.
This closes SF patch #
1453235.
Walter Dörwald [Fri, 14 Apr 2006 17:00:36 +0000 (17:00 +0000)]
Make error message less misleading for u"a..b".encode("idna").
Martin v. Löwis [Fri, 14 Apr 2006 15:58:03 +0000 (15:58 +0000)]
Patch #702933: Undocument PyObject_NEW, PyObject_NEW_VAR,
and PyObject_DEL.
Walter Dörwald [Fri, 14 Apr 2006 15:40:54 +0000 (15:40 +0000)]
Fix wrong attribute name.
Walter Dörwald [Fri, 14 Apr 2006 15:22:27 +0000 (15:22 +0000)]
Make raise statements PEP 8 compatible.
Martin v. Löwis [Fri, 14 Apr 2006 15:16:15 +0000 (15:16 +0000)]
Patch #
1045620: Prepend Modules/ before Setup in stdout.
Martin v. Löwis [Fri, 14 Apr 2006 15:07:46 +0000 (15:07 +0000)]
Patch #
1470300: Port _hotshot to QNX4.25 port.
Martin v. Löwis [Fri, 14 Apr 2006 15:02:32 +0000 (15:02 +0000)]
Patch #
1355883: Build Python-ast.c and Python-ast.h
independently. Fixes #
1355883.
Armin Rigo [Fri, 14 Apr 2006 14:58:30 +0000 (14:58 +0000)]
Show case: reference cycles involving only the ob_type field are rather
uncommon but possible. Inspired by SF bug
1469629.
Andrew M. Kuchling [Fri, 14 Apr 2006 14:54:18 +0000 (14:54 +0000)]
Typo fix
Martin v. Löwis [Fri, 14 Apr 2006 14:34:26 +0000 (14:34 +0000)]
Patch #
1324762: Change --with-cxx to --with-cxx-main.
Walter Dörwald [Fri, 14 Apr 2006 14:03:55 +0000 (14:03 +0000)]
Call encode()/decode() with final==True as the last call in the
incremental codec tests.
Andrew M. Kuchling [Fri, 14 Apr 2006 12:42:09 +0000 (12:42 +0000)]
Typo fixes
Andrew M. Kuchling [Fri, 14 Apr 2006 12:41:19 +0000 (12:41 +0000)]
Add more items
Andrew M. Kuchling [Fri, 14 Apr 2006 12:07:41 +0000 (12:07 +0000)]
Typo fix
Andrew M. Kuchling [Fri, 14 Apr 2006 10:29:55 +0000 (10:29 +0000)]
Add an item and a reminder
Martin v. Löwis [Fri, 14 Apr 2006 09:08:42 +0000 (09:08 +0000)]
Make Py_BuildValue, PyObject_CallFunction and
PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
Neal Norwitz [Fri, 14 Apr 2006 06:35:46 +0000 (06:35 +0000)]
Copy note from leakers README here too. We want to keep all test cases.
Neal Norwitz [Fri, 14 Apr 2006 06:33:24 +0000 (06:33 +0000)]
Restore test tee with some modifications.
The test case came from test_generators, not test_itertools.
Ensure there's no cyclic garbage we are counting.
This is weird because it leaks, then reaches a limit:
python.exe -i test_tee.py
>>> leak()
0
[26633 refs]
>>> leak()
0
[26658 refs]
>>> leak()
0
[26683 refs]
>>> leak()
0
[26708 refs]
>>> leak()
0
[26708 refs]
>>> leak()
0
[26708 refs]
>>> leak()
0
Neal Norwitz [Fri, 14 Apr 2006 06:11:08 +0000 (06:11 +0000)]
Move the old test_generator_cycle.py which leaked but was removed into the test
Neal Norwitz [Fri, 14 Apr 2006 05:35:39 +0000 (05:35 +0000)]
Update notes to address cyclic garbage and what should happen when a test is fixed.
Neal Norwitz [Fri, 14 Apr 2006 05:20:28 +0000 (05:20 +0000)]
SF Bug #
1454485, array.array('u') could crash the interpreter when
passing a string. Martin already fixed the actual crash by ensuring
Py_UNICODE is unsigned. As discussed on python-dev, this fix
removes the possibility of creating a unicode string from a raw buffer.
There is an outstanding question of how to fix the crash in 2.4.
Tim Peters [Fri, 14 Apr 2006 04:54:58 +0000 (04:54 +0000)]
Added George Yoshida.
Neal Norwitz [Fri, 14 Apr 2006 03:53:34 +0000 (03:53 +0000)]
ALIGNMENT_SHIFT is not used
Tim Peters [Thu, 13 Apr 2006 23:12:24 +0000 (23:12 +0000)]
When using -R, lots of "*** DocTestRunner.merge:" nuisance messages
appear. Get rid of them by nuking doctest's default DocTestRunner
instance as part of cleanup(). Also cleanup() before running the
first test repetition (the test was run once before we get into
the -R branch).
Tim Peters [Thu, 13 Apr 2006 22:58:42 +0000 (22:58 +0000)]
Whitespace normalization.
Gregory P. Smith [Thu, 13 Apr 2006 19:19:01 +0000 (19:19 +0000)]
raise the minimum supported BerkeleyDB version to 3.3 and add notes to
news about this and a couple other recent fixes.
Martin v. Löwis [Thu, 13 Apr 2006 19:16:13 +0000 (19:16 +0000)]
Force 8-alignment of memory blocks, as needed on
64-bit machines that require pointers to be aligned (e.g. IA64)
Martin v. Löwis [Thu, 13 Apr 2006 13:08:58 +0000 (13:08 +0000)]
Fix type errors.
Andrew M. Kuchling [Thu, 13 Apr 2006 13:02:42 +0000 (13:02 +0000)]
Typo fix
Andrew M. Kuchling [Thu, 13 Apr 2006 12:49:39 +0000 (12:49 +0000)]
[Bug #
1464571] Mention that generator's .gi_frame can now be None
Andrew M. Kuchling [Thu, 13 Apr 2006 12:37:21 +0000 (12:37 +0000)]
Add some items
Martin v. Löwis [Thu, 13 Apr 2006 12:29:43 +0000 (12:29 +0000)]
Introduce asdl_int_seq, to hold cmpop_ty.
Andrew M. Kuchling [Thu, 13 Apr 2006 12:09:08 +0000 (12:09 +0000)]
Include more detail on Coverity results and add a link; minor edits
Andrew M. Kuchling [Thu, 13 Apr 2006 11:51:07 +0000 (11:51 +0000)]
Describe sys.subversion, Py_GetBuildInfo()
Add metadata example
Andrew M. Kuchling [Thu, 13 Apr 2006 11:40:29 +0000 (11:40 +0000)]
Add missing word
Skip Montanaro [Thu, 13 Apr 2006 09:48:28 +0000 (09:48 +0000)]
revert - breaks build of Python/ast.c w/ gcc
Skip Montanaro [Thu, 13 Apr 2006 09:37:01 +0000 (09:37 +0000)]
Use union to discriminate pointer types from enum/int types.
Martin v. Löwis [Thu, 13 Apr 2006 08:52:56 +0000 (08:52 +0000)]
Change more occurrences of maxsplit to Py_ssize_t.
Martin v. Löwis [Thu, 13 Apr 2006 08:37:17 +0000 (08:37 +0000)]
Change maxsplit types to Py_ssize_t.
Thomas Heller [Thu, 13 Apr 2006 08:33:58 +0000 (08:33 +0000)]
Allocate the 0x1D1A0000 base adress for the _ctypes extension module.
Export the COM entry point functions.
Note that there are several conflicting base addresses defined for
other extensions, also not all are listed in dllbase_nt.txt.
Georg Brandl [Thu, 13 Apr 2006 08:04:56 +0000 (08:04 +0000)]
Add two entries about how to actually clear a list.
Georg Brandl [Thu, 13 Apr 2006 07:59:30 +0000 (07:59 +0000)]
Add a test for Py_ssize_t. Correct typo in getargs.c.
Martin v. Löwis [Thu, 13 Apr 2006 07:52:27 +0000 (07:52 +0000)]
Replace INT_MAX with PY_SSIZE_T_MAX.
Martin v. Löwis [Thu, 13 Apr 2006 07:37:25 +0000 (07:37 +0000)]
Replace INT_MAX with PY_SSIZE_T_MAX where string length
are concerned.
Martin v. Löwis [Thu, 13 Apr 2006 07:34:09 +0000 (07:34 +0000)]
Replace INT_MAX with PY_SSIZE_T_MAX.
Georg Brandl [Thu, 13 Apr 2006 07:29:18 +0000 (07:29 +0000)]
Add PY_SSIZE_T_MIN/MAX to _testcapi.
Martin v. Löwis [Thu, 13 Apr 2006 07:28:29 +0000 (07:28 +0000)]
Stop claiming that Py_Finalize releases all memory.
Fixes part of #
1445210.
Martin v. Löwis [Thu, 13 Apr 2006 07:24:50 +0000 (07:24 +0000)]
Remove another INT_MAX limitation
Martin v. Löwis [Thu, 13 Apr 2006 07:22:51 +0000 (07:22 +0000)]
Replace most INT_MAX with PY_SSIZE_T_MAX.
Anthony Baxter [Thu, 13 Apr 2006 07:19:01 +0000 (07:19 +0000)]
C++ compiler changes. casts, rename variables with reserved names.
Martin v. Löwis [Thu, 13 Apr 2006 06:36:31 +0000 (06:36 +0000)]
Support NFD of very long strings.
Neal Norwitz [Thu, 13 Apr 2006 06:34:59 +0000 (06:34 +0000)]
test_compile can be really long if we are using -u compiler.
This may be causing the debian sparc buildbot to fail.
Print a little message to let the user ^w buildbot know it's still thinking.
We may want to adjust the time period which is currently 5 minutes.
Will backport.