Commit Graph

34754 Commits

Author SHA1 Message Date
Tim Peters 638144305c dict_print(): Explicitly narrow the return value
from a (possibly) wider variable.
2006-05-30 05:04:59 +00:00
Neal Norwitz 5e1b45dc21 No DOWNCAST is required since sizeof(Py_ssize_t) >= sizeof(int) and Py_ReprEntr returns an int 2006-05-30 04:43:23 +00:00
Neal Norwitz d3881b026c Use Py_SAFE_DOWNCAST for safety. Fix format strings. Remove 2 more stray | in comment 2006-05-30 04:25:05 +00:00
Neal Norwitz 80af59cbd4 Remove stray | in comment 2006-05-30 04:19:21 +00:00
Tim Peters 9b10f7e0cb Convert relevant dict internals to Py_ssize_t.
I don't have a box with nearly enough RAM, or an OS,
that could get close to tickling this, though (requires
a dict w/ at least 2**31 entries).
2006-05-30 04:16:25 +00:00
Neal Norwitz 1e44ca94ac Simplify further by using AddStringConstant 2006-05-30 03:18:50 +00:00
Tim Peters f0d55aca5d Set a binary svn:mime-type property on this UTF-8 encoded file. 2006-05-30 02:30:30 +00:00
Tim Peters 27c70598a8 Whitespace normalization. 2006-05-30 02:26:46 +00:00
Tim Peters aba19bc45f deprecated_err(): Stop bizarre warning messages when the tests
are run in the order:

    test_genexps (or any other doctest-based test)
    test_struct
    test_doctest

The `warnings` module needs an advertised way to save/restore
its internal filter list.
2006-05-30 02:25:25 +00:00
Bob Ippolito 6067f20172 Add a length check to aifc to ensure it doesn't write a bogus file 2006-05-30 00:26:01 +00:00
Bob Ippolito 2fd3977a9d struct: modulo math plus warning on all endian-explicit formats for compatibility with older struct usage (ugly) 2006-05-29 22:55:48 +00:00
Fredrik Lundh b51b470eb8 fixed "abc".count("", 100) == -96 error (hopefully, nobody's relying on
the current behaviour ;-)
2006-05-29 22:42:07 +00:00
Georg Brandl a355c14fa1 Whoops. 2006-05-29 22:00:30 +00:00
Georg Brandl bf92f46572 Convert more modules to METH_VARARGS. 2006-05-29 21:58:42 +00:00
Georg Brandl 96a8c3954c Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
2006-05-29 21:04:52 +00:00
Georg Brandl fd9a4b19e9 Add News entry for last commit. 2006-05-29 20:57:01 +00:00
Georg Brandl 261e251df8 Patches #1497027 and #972322: try HTTP digest auth first,
and watch out for handler name collisions.
2006-05-29 20:52:54 +00:00
Nick Coghlan 08490146df When adding a module like functools, it helps to let SVN know about the file. 2006-05-29 20:27:44 +00:00
Georg Brandl 2cfaa34dfa Correct some value converting strangenesses. 2006-05-29 19:39:45 +00:00
Armin Rigo 162997efb1 Silence a warning. 2006-05-29 17:59:47 +00:00
Bob Ippolito 28b2686260 simplify the struct code a bit (no functional changes) 2006-05-29 15:47:29 +00:00
Georg Brandl 47dc118247 Fix #1494787 (pyclbr counts whitespace as superclass name) 2006-05-29 14:39:00 +00:00
Georg Brandl 80181e2b78 Fix compiler warning. 2006-05-29 14:33:55 +00:00
Georg Brandl b569ee4863 Handle PyMem_Malloc failure in pystrtod.c. Closes #1494671. 2006-05-29 14:28:05 +00:00
Georg Brandl a1121fa935 Fix #1494605. 2006-05-29 14:13:21 +00:00
Georg Brandl bda0744d55 Convert fmmodule to METH_VARARGS. 2006-05-29 13:53:16 +00:00
Nick Coghlan c649ec5b69 Apply modified version of Collin Winter's patch #1478788
Renames functional extension module to _functools and adds a Python
functools module so that utility functions like update_wrapper can be
added easily.
2006-05-29 12:43:05 +00:00
Georg Brandl c7c51147c7 Fix refleak in socketmodule. Replace bogus Py_BuildValue calls.
Fix refleak in exceptions.
2006-05-29 09:46:51 +00:00
Georg Brandl 964f5978dc METH_NOARGS functions do get called with two args. 2006-05-28 22:38:57 +00:00
Georg Brandl 660222f955 Convert audioop over to METH_VARARGS. 2006-05-28 22:34:51 +00:00
Georg Brandl fbef5888e7 Fix C function calling conventions in _sre module. 2006-05-28 22:14:04 +00:00
Armin Rigo a6123abb72 A clearer error message when passing -R to regrtest.py with
release builds of Python.
2006-05-28 22:07:08 +00:00
Georg Brandl 5f6861df93 Correct None refcount issue in Mac modules. (Are they
still used?)
2006-05-28 21:57:35 +00:00
Georg Brandl c26025c562 Fix ref-antileak in _struct.c which eventually lead to deallocating None. 2006-05-28 21:42:54 +00:00
Thomas Wouters c1282eef0c Make last patch valid C89 so Windows compilers can deal with it. 2006-05-28 21:32:12 +00:00
Michael W. Hudson 27596279a2 use the UnicodeError traversal and clearing functions in UnicodeError
subclasses.
2006-05-28 21:19:03 +00:00
Georg Brandl 43ab100cdc Fix refleaks in UnicodeError get and set methods. 2006-05-28 20:57:09 +00:00
Georg Brandl 2b33037611 Patch #1496206: urllib2 PasswordMgr ./. default ports 2006-05-28 20:23:12 +00:00
Georg Brandl 0fd1291c38 The empty string is a valid import path.
(fixes #1496539)
2006-05-28 20:11:45 +00:00
Armin Rigo a3f092751a ("Forward-port" of r46506)
Remove various dependencies on dictionary order in the standard library
tests, and one (clearly an oversight, potentially critical) in the
standard library itself - base64.py.

Remaining open issues:
 * test_extcall is an output test, messy to make robust
 * tarfile.py has a potential bug here, but I'm not familiar
   enough with this code.  Filed in as SF bug #1496501.
 * urllib2.HTTPPasswordMgr() returns a random result if there is more
   than one matching root path.  I'm asking python-dev for
   clarification...
2006-05-28 19:13:17 +00:00
Marc-André Lemburg e9eeab5c05 Initial version of systimes - a module to provide platform dependent
performance measurements.

The module is currently just a proof-of-concept implementation, but
will integrated into pybench once it is stable enough.

License: pybench license.
Author: Marc-Andre Lemburg.
2006-05-28 17:46:58 +00:00
Michael W. Hudson 96495ee6dd Quality control, meet exceptions.c, round two.
Make some functions that should have been static static.

Fix a bunch of refleaks by fixing the definition of
MiddlingExtendsException.

Remove all the __new__ implementations apart from
BaseException_new.  Rewrite most code that needs it to cope with
NULL fields (such code could get excercised anyway, the
__new__-removal just makes it more likely).  This involved
editing the code for WindowsError, which I can't test.

This fixes all the refleaks in at least the start of a regrtest
-R :: run.
2006-05-28 17:40:29 +00:00
Martin v. Löwis 8301c7923d Rest of patch #1490384: Commit icon source, remove
claim that Erik von Blokland is the author of the
installer picture.
2006-05-28 16:57:38 +00:00
George Yoshida f3c65de460 Patch #1080727: add "encoding" parameter to doctest.DocFileSuite
Contributed by Bjorn Tillenius.
2006-05-28 16:39:09 +00:00
Michael W. Hudson 22a80e7cb0 Quality control, meet exceptions.c.
Fix a number of problems with the need for speed code:

One is doing this sort of thing:

    Py_DECREF(self->field);
    self->field = newval;
    Py_INCREF(self->field);

without being very sure that self->field doesn't start with a
value that has a __del__, because that almost certainly can lead
to segfaults.

As self->args is constrained to be an exact tuple we may as well
exploit this fact consistently.  This leads to quite a lot of
simplification (and, hey, probably better performance).

Add some error checking in places lacking it.

Fix some rather strange indentation in the Unicode code.

Delete some trailing whitespace.

More to come, I haven't fixed all the reference leaks yet...
2006-05-28 15:51:40 +00:00
Fredrik Lundh 80f8e80c15 needforspeed: added Py_MEMCPY macro (currently tuned for Visual C only),
and use it for string copy operations.  this gives a 20% speedup on some
string benchmarks.
2006-05-28 12:06:46 +00:00
Tim Peters 5e9d6cfbda PyErr_Display(), PyErr_WriteUnraisable(): Coverity found a cut-and-paste
bug in both:  `className` was referenced before being checked for NULL.
2006-05-28 10:41:29 +00:00
Tim Peters a37722cc42 Added missing svn:eol-style property to text files. 2006-05-28 01:52:38 +00:00
George Yoshida a2d6c8a9d3 fix typo 2006-05-27 17:09:17 +00:00
George Yoshida 3689571425 End of Ch.3 is now about "with statement".
Avoid obsolescence by directly referring to the section.
2006-05-27 16:51:43 +00:00