Commit Graph

33140 Commits

Author SHA1 Message Date
Martin v. Löwis f84d1b9375 Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.
Proposed by Tim Peters.
2006-02-11 09:27:05 +00:00
Thomas Wouters 03ca23d892 Explain the clearing of the stack in a comment in Python/ceval.c's
call_function(), rather than commenting on the lack of an explanation in a
comment.
2006-02-10 22:51:45 +00:00
Jack Jansen c49250264d One more mod for support of C++ classes. 2006-02-10 22:15:09 +00:00
Martin v. Löwis 82bca63c2b Avoid linking python with readline. 2006-02-10 20:49:30 +00:00
Jack Jansen 03904bf20b For overriding C++ methods we also need to know whether a parameter
is an output parameter or not. Added support for that.
2006-02-10 16:17:24 +00:00
Armin Rigo 2bc23f512d The default timer unit was incorrectly measured in milliseconds instead
of seconds, producing numbers 1000 times too large.  It would be nice to
write a test for this, but how...  (thanks mwh)
2006-02-10 13:19:53 +00:00
Vinay Sajip b4549c4a7e Added information on function name added to LogRecord, and the 'extra' keyword parameter. 2006-02-09 08:54:11 +00:00
Vinay Sajip ed1992f2aa Added function name to LogRecord. 2006-02-09 08:48:36 +00:00
Vinay Sajip 260ce43252 Propagate exceptions from shutdown() if raiseExceptions is not set.
Added 'extra' keyword argument handling to logging calls, as discussed on python-dev.
2006-02-09 08:34:14 +00:00
Vinay Sajip 1eb77a50c8 Added lock acquisition/release around shared data structure manipulation 2006-02-09 08:31:00 +00:00
Neal Norwitz bd3490abdb Be a little less sensitive to failures. Only check for the result from
regrtest.py.  If we grep for just "fail", that finds bsddb deadlock
messages, which presumably are just warnings.  They don't cause
a test failure.
2006-02-09 05:08:56 +00:00
Brett Cannon 82a9394237 Add doc discussing how AST compiler is structured and designed.
It is out of date, though, thanks to lacking info on the arena API.  It also
should eventually be removed in favor of updating PEP 339.
2006-02-09 02:43:14 +00:00
Barry Warsaw e58df82919 Port relevant patches for SF 1409455 to the trunk for email 3.0/Python 2.5.
Will port to Python 2.4.
2006-02-08 14:34:21 +00:00
Armin Rigo a871ef2b3e Added the cProfile module.
Based on lsprof (patch #1212837) by Brett Rosen and Ted Czotter.
With further editing by Michael Hudson and myself.
History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof

* Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper.
* pstats.py updated to display cProfile's caller/callee timings if available.
* setup.py and NEWS updated.
* documentation updates in the profiler section:
   - explain the differences between the three profilers that we have now
   - profile and cProfile can use a unified documentation, like (c)Pickle
   - mention that hotshot is "for specialized usage" now
   - removed references to the "old profiler" that no longer exists
* test updates:
   - extended test_profile to cover delicate cases like recursion
   - added tests for the caller/callee displays
   - added test_cProfile, performing the same tests for cProfile
* TO-DO:
   - cProfile gives a nicer name to built-in, particularly built-in methods,
     which could be backported to profile.
   - not tested on Windows recently!
2006-02-08 12:53:56 +00:00
Andrew M. Kuchling 5eefdca654 Update projected release date 2006-02-08 11:36:09 +00:00
Jack Jansen 35f82d7051 Fixed an oversight and a misunderstanding of PEP253:
- Call tp_dealloc on the static baseclass, not dynamic (which leads to
  infinite loops with more than one baseclass)
- Call tp_new and tp_init on baseclasses (overridable)
-This line, and those below, will be ignored--

M    bgen/bgenObjectDefinition.py
2006-02-07 22:28:09 +00:00
Vinay Sajip e0f85926d6 Removed defensive test in Handler.close 2006-02-07 13:55:52 +00:00
Vinay Sajip f0a95eca45 Saved and restored logging._handlerList at the same time as saving/restoring logging._handlers. 2006-02-07 13:44:48 +00:00
Neal Norwitz 05110aaef5 Add versionadded note for new methods 2006-02-07 07:23:26 +00:00
Neal Norwitz 082b2df33f Bug #876637, prevent stack corruption when socket descriptor
is larger than FD_SETSIZE.

This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE
which is typically only available to root.  Since this wouldn't normally
be run in a test (ie, run as root), it doesn't seem too worthwhile to
add a normal test.  The bug report has one version of a test.  I've
written another.  Not sure what the best thing to do is.

Do the check before calling internal_select() because we can't set
an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS.
This seemed the clearest solution, ie handle before calling internal_select()
rather than inside.  Plus there is at least one place outside
of internal_select() that needed to be handled.

Will backport.
2006-02-07 07:04:46 +00:00
Neal Norwitz 19cbcad20e Fix indentation (whitespace only). 2006-02-07 06:59:20 +00:00
Neal Norwitz 02876df9de Check return results for errors 2006-02-07 06:58:52 +00:00
Martin v. Löwis 0075690ced Patch #1412872: zipfile: use correct system type on unixy systems. 2006-02-05 17:09:41 +00:00
Neal Norwitz 55cd82fe0a Get test_logging to not hang when running under regrtest.py -R ::
Not sure why/how _handlers/_handlerList is out of sync.  This could
indicate a deeper problem.

In test_logging, the only absolutely necessary change to get working
was tcpserver.abort = 1.  But we don't want to wait infinitely
to join the threads, so give a 2.0 second timeout.

There doesn't appear to be a need for a local abort variable
in serve_until_stopped, so just use the instance member.

Note the problem is only on HEAD, not in 2.4.
2006-02-05 08:21:08 +00:00
Neal Norwitz 0e6bc8c260 Patch #1407135, bug #1424041, make mmap.mmap(-1, length) work the same
on both Unix (SVR4 and BSD) and Windows.  Restores behaviour of passing -1
for anonymous memory on Unix.  Use MAP_ANONYMOUS instead of _ANON since
the latter is deprecated according to Linux (gentoo) man pages.

Should we continue to allow mmap.mmap(0, length) to work on Windows?
0 is a valid fd.

Will backport bugfix portions.
2006-02-05 05:45:43 +00:00
Neal Norwitz d1cfc8ade1 Whitespace normalization 2006-02-05 03:36:57 +00:00
Neal Norwitz 96e48d4698 Use C-style comment 2006-02-05 02:07:19 +00:00
Barry Warsaw e3dd5b2c87 Resolves SF bug #1423972. 2006-02-04 23:32:26 +00:00
Neal Norwitz b7b54f78b3 SF bug 1415455, fix typo in module name 2006-02-04 23:00:48 +00:00
Martin v. Löwis 57a34e8026 Patch #1422385: Changes to nis module to support multiple NIS domains 2006-02-04 19:12:37 +00:00
Neal Norwitz faa26dfdd8 Fix typo 2006-02-04 03:26:20 +00:00
Martin v. Löwis 14694662d5 Drop C library for stat/fstat on Windows. 2006-02-03 12:54:16 +00:00
Barry Warsaw 602426e3cf parsedate_tz(): Minor cleanup.
Port from Python 2.3/email 2.5: Add a test for the tm_yday field is 1 in the
return of parsedate().
2006-02-03 04:44:52 +00:00
Fredrik Lundh 5a49fae1ab SF patch #1421726
fixed typo in language reference
2006-02-02 21:58:55 +00:00
Thomas Wouters 553489ab1d As discussed on python-dev, silence three gcc-4.0.x warnings, using assert()
to protect against actual uninitialized usage.

Objects/longobject.c: In function ‘PyLong_AsDouble’:
Objects/longobject.c:655: warning: ‘e’ may be used uninitialized in this function

Objects/longobject.c: In function ‘long_true_divide’:
Objects/longobject.c:2263: warning: ‘aexp’ may be used uninitialized in this function
Objects/longobject.c:2263: warning: ‘bexp’ may be used uninitialized in this function
2006-02-01 21:32:04 +00:00
Gustavo Niemeyer 548148810b Patch #1413711: Certain patterns of differences were making difflib
touch the recursion limit. The applied patch inlines the recursive
__helper method in a non-recursive way.
2006-01-31 18:34:13 +00:00
Martin v. Löwis c81e3a63af Fix typo. 2006-01-30 15:04:31 +00:00
Gregory P. Smith fd049a696d maintain support for older python versions in this module so that it
is ok for a standalone pybsddb source dist for use with <= 2.3.
2006-01-30 00:22:08 +00:00
Gregory P. Smith c26cf5a6f1 fix test import for use in standalone pybsddb project bsddb3 module as well
as python builtin bsddb.
2006-01-29 23:54:38 +00:00
Tim Peters 249c7b050b Whitespace normalization. 2006-01-29 22:50:26 +00:00
Martin v. Löwis 5b1e003da8 Try a number of ports, in case 9020 is already in use. 2006-01-29 20:10:38 +00:00
Martin v. Löwis f684888b1e Explicitly close the server socket. 2006-01-29 19:55:18 +00:00
Gregory P. Smith cfc4a8dae7 add bsddb.db.DBEnv.set_tx_timestamp mention 2006-01-29 19:46:23 +00:00
Martin v. Löwis 4ddc78a6a1 Delete aclocal.m4, and require autoconf 2.59, fixing
#811160 in a different way.
2006-01-29 09:53:44 +00:00
Thomas Wouters 35f34f8d60 Work around a Solaris peculiarity that caused test_pty to sometimes fail: a
tty opened by os.openpty() isn't always a tty according to os.isatty(), when
it's tested inside the process that opened it. Doesn't affect actual
functionality, as using a tty this way is rarely, if ever, useful. Ignoring
the failure allows the test for actual functionality to continue.

Will backport to 2.4-maint.
2006-01-28 12:05:54 +00:00
Jeremy Hylton c960f26044 Improved handling of syntax errors.
Expand set of errors caught in set_context().  Some new errors, some
old error messages changed for consistency.

Fixed error checking in generator expression code.  The first set of
tests were impossible condition given the grammar.  In general, the
ast code uses REQ() for those sanity checks.

Fix some error handling for augmented assignments.  As comments in the
code explain, set_context() ought to work here, but I got unexpected
crashes when I tried it.  Should come back to this.

Add note to Grammar that yield expression is a special case.

Add doctest cases for SyntaxErrors raised by ast.c.
2006-01-27 15:18:39 +00:00
Gregory P. Smith 3d344e8b07 Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVER
(test cases and dbobj wrapping)
2006-01-27 07:06:15 +00:00
Gregory P. Smith 8a47404799 Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVER 2006-01-27 07:05:40 +00:00
Barry Warsaw b941825fa2 Fix PyGC_Collect() to be exported from the built DLL on Windows. (Fix given
by Matt Messier).
2006-01-26 18:59:06 +00:00
Neal Norwitz 08e301f8bd There was a race condition where the connector would try to connect
before the listener was ready (on gentoo x86 buildslave).  This
caused the listener to not exit normally since nobody connected to it
(waited in accept()).  The exception was raised in the other thread
and the test failed.

This fix doesn't completely eliminate the race, but should make it
near impossible to trigger.  Hopefully it's good enough.
2006-01-25 08:39:35 +00:00