Commit Graph

18035 Commits

Author SHA1 Message Date
Tim Peters be80085514 Make clear in the docstring that "std" applies to both size and alignment,
not just to alignment.  Spotted by Guido.

Bugfix candidate.
2001-06-11 16:45:33 +00:00
Thomas Wouters 819bb2c502 Protect the use of the VWERASE symbol by an #ifdef, it's apparently missing
on (some versions of ?) AIX.
2001-06-11 15:25:16 +00:00
Fred Drake 046f4d810d Fixed parameter order for os.popen2(), os.popen3(), and os.popen(4). Added
a reference to these functions and popen() from the "Process Management"
section.

Based on a suggestion from comp.lang.python.
2001-06-11 15:21:48 +00:00
Fred Drake c115835457 Fix recent changes so that this section will format again. 2001-06-11 14:55:01 +00:00
Tim Peters c533edceb1 Renamed some stuff to tell the truth about what it does. 2001-06-10 23:52:59 +00:00
Tim Peters 7b9542a3f7 Initial support for 'q' and 'Q' struct format codes: for now, only in
native mode, and only when config #defines HAVE_LONG_LONG.  Standard mode
will eventually treat them as 8-byte ints across all platforms, but that
likely requires a new set of routines in longobject.c first (while
sizeof(long) >= 4 is guaranteed by C, there's nothing in C we can rely
on x-platform to hold 8 bytes of int, so we'll have to roll our own;
I'm thinking of a simple pair of conversion functions, Python long
to/from sized vector of unsigned bytes; that may be useful for GMP
conversions too; std q/Q would call them with size fixed at 8).

test_struct.py:  In addition to adding some native-mode 'q' and 'Q' tests,
got rid of unused code, and repaired a non-portable assumption about
native sizeof(short) (it isn't 2 on some Cray boxes).

libstruct.tex:  In addition to adding a bit of 'q'/'Q' docs (more needed
later), removed an erroneous footnote about 'I' behavior.
2001-06-10 23:40:19 +00:00
Jack Jansen fcc54cab10 Added a missing cast to the hashfunc initializer. 2001-06-10 21:43:28 +00:00
Tim Peters 0bb580d297 SF bug 431772: traceback.print_exc() causes traceback
Patch from Michael Hundson.
format_exception_only() blew up when trying to report a SyntaxError
from a string input (line is None in this case, but it assumed a string).
Bugfix candidate.
2001-06-10 18:58:26 +00:00
Peter Schneider-Kamp 07c1922b12 annoying whitespace inconsistency 2001-06-10 16:45:08 +00:00
Tim Peters 2a7f384122 SF bug 430991: wrong co_lnotab
Armin Rigo pointed out that the way the line-# table got built didn't work
for lines generating more than 255 bytes of bytecode.  Fixed as he
suggested, plus corresponding changes to pyassem.py, plus added some
long overdue docs about this subtle table to compile.c.

Bugfix candidate (line numbers may be off in tracebacks under -O).
2001-06-09 09:26:21 +00:00
Martin v. Löwis eefa964932 Cast the result of xxxPyCObject_Import to PycStringIO_CAPI*.
This fixes bug #431557.
2001-06-09 07:59:43 +00:00
Martin v. Löwis 0163d6d6ef Patch #424475: Speed-up tp_compare usage, by special-casing the common
case of objects with equal types which support tp_compare. Give
type objects a tp_compare function.
Also add c<0 tests before a few PyErr_Occurred tests.
2001-06-09 07:34:05 +00:00
Fred Drake 7bc50714fe Fix the attributions for the new floating point text. 2001-06-08 17:09:01 +00:00
Fred Drake 8c27d99941 Added credits in the right places. 2001-06-08 16:28:53 +00:00
Fred Drake 417d667dd9 Text from Tim & Guido discussing floating point arithmetic and what users
need to understand about the binary & decimal fp, so that representation
weirdness is documented somewhere.  This makes it easier to repond to "bug"
reports caused by user confusion & ignorance of the issues.

This closes SF patch #426208.
2001-06-08 16:24:58 +00:00
Skip Montanaro 1dc98c44fe add warning about situation where code may be executed twice, once when
module is __main__ and once when module is imported.
2001-06-08 14:40:28 +00:00
Fred Drake 62f9d7c021 In the section on extending the profiler, add some additional discussion
about setting up the dispatch table, and update the OldProfile and
HotProfile classes to the current implementations, showing the adjusted
construction for the dispatch table.
2001-06-08 05:04:19 +00:00
Fred Drake 904aa7bb00 call_trace(): Add an additional parameter -- pointer to a PyObject*
that should be used to cache an interned version of the event
    string passed to the profile/trace function.  call_trace() will
    create interned strings and cache them in using the storage
    specified by this additional parameter, avoiding a lot of string
    object creation at runtime when using the profiling or tracing
    functions.

All call sites are modified to pass the additional parameter, and four
static PyObject* variables are allocated to cache the interned string
objects.

This closes SF patch #431257.
2001-06-08 04:33:09 +00:00
Fred Drake edb5ffb2c1 Performance improvements to the profiler:
Ensure that all the default timers are called as functions, not an
expensive method wrapper around a variety of different functions.

Agressively avoid dictionary lookups.

Modify the dispatch scheme (Profile.trace_dispatch_*(), where * is not
'call', 'exception' or 'return') so that the callables dispatched to
are simple functions and not bound methods -- this reduces the number
of layers of Python call machinery that gets touched.

Remove a couple of duplicate imports from the "if __name__ == ..."
section.

This closes SF patch #430948.
2001-06-08 04:25:24 +00:00
Martin v. Löwis 13b8bc5478 Patch #429957: Add support for cp1140, which is identical to cp037,
with the addition of the euro character.
Also added a few EDBDIC aliases.
2001-06-07 19:39:25 +00:00
Martin v. Löwis e2ccb89513 Document filter. 2001-06-07 19:01:24 +00:00
Peter Schneider-Kamp fbb2b4c4a5 check in for patch #430846
use faster code for base64.encodestring (courtesy of Mr. Tim Peters)
and for base64.decodestring (courtesy of Anthony Baxter)
2001-06-07 18:56:13 +00:00
Martin v. Löwis a4debfffc9 Patch #430754: Makes ftpmirror.py .netrc aware 2001-06-07 17:17:00 +00:00
Marc-André Lemburg 8879a33613 Fixes [ #430986 ] Buglet in PyUnicode_FromUnicode. 2001-06-07 12:26:56 +00:00
Martin v. Löwis 2c07195574 Previous check-in was by mistake, undo it. 2001-06-07 05:52:17 +00:00
Peter Schneider-Kamp d895b20da0 This closes bug #430849 (internal error produced by binascii.a2b_base64) 2001-06-07 05:51:36 +00:00
Martin v. Löwis 22adac50cb Patch #416220: Fix misplaced paren. 2001-06-07 05:49:05 +00:00
Guido van Rossum 1d88c59f75 Acknowledge the existence of the 'platform' file, generated by the
Makefile and used by the setup.py script.  Ignore it in .cvsignore;
remove it in "make clobber".
2001-06-06 17:51:57 +00:00
Fred Drake 2a9bda9223 Typo: "descrition" --> "description"
Add reference to the documentation for the Python documentation markup.

Fixed up a couple of descriptions.

This closes SF bug #430627.
2001-06-06 16:02:47 +00:00
Fred Drake 9ccc0df52f Add references to the documentation for the Python documentation markup.
Suggested by the comments in SF bug #430627.
2001-06-06 15:59:04 +00:00
Guido van Rossum c341580afd Added quopri codec. 2001-06-06 13:30:54 +00:00
Martin v. Löwis ebf94db60b Report on fnmatch.filter. 2001-06-06 06:25:40 +00:00
Martin v. Löwis b5d4d2a7d5 Patch #409973: Speedup glob.glob, add fnmatch.filter. 2001-06-06 06:24:38 +00:00
Martin v. Löwis 3d10b34b9c Wrap with extern "C". Fixes bug #428419.
Also protect against multiple inclusion.
2001-06-05 05:58:44 +00:00
Martin v. Löwis e24fef0dd2 Fix bug #422702: Make flag argument to open optional, and document it that way. 2001-06-05 05:33:19 +00:00
Martin v. Löwis 2750bcc2d1 Add .pyo as an extension, fixes bug #416462. Also restore alphabetic order. 2001-06-05 05:17:00 +00:00
Tim Peters b870c75253 Make it possible to find the use of tp_as_buffer here with a global search.
(Just a change to a comment)
2001-06-05 04:43:26 +00:00
Fred Drake 88382696f4 Update a "Programmer's note" about lambda forms and scoping to reflect
the availability of nested scoping in Python 2.1 and 2.2.
2001-06-05 02:17:02 +00:00
Guido van Rossum d993c87918 Quick update to the extension mechanism (extend.py is gone, long live
config.txt).

*** This is a bugfix-release candidate (for 2.1.1 and 2.0.1)! ***
2001-06-04 21:21:11 +00:00
Tim Peters afb6ae8452 Store the mask instead of the size in dictobjects. The mask is more
frequently used, and in particular this allows to drop the last
remaining obvious time-waster in the crucial lookdict() and
lookdict_string() functions.  Other changes consist mostly of changing
"i < ma_size" to "i <= ma_mask" everywhere.
2001-06-04 21:00:21 +00:00
Skip Montanaro b9d973dac5 is -> if in rename description 2001-06-04 15:31:17 +00:00
Fred Drake 58422e5820 Convert the parser module test to use PyUnit. 2001-06-04 03:56:24 +00:00
Mark Hammond 194bfb2805 Add some useful Windows encodings - patch #423221. 2001-06-04 02:31:23 +00:00
Martin v. Löwis 351c3d0554 Implement testGetElementsByTagNameNS. 2001-06-03 14:27:02 +00:00
Martin v. Löwis ed525fb0df Fix getElementsByTagNameNS:
- actually return a result
  - Compare with tag.localName in getElementsByTagNameNSHelper
2001-06-03 14:06:42 +00:00
Tim Peters 453163d842 lookdict: stop more insane core-dump mutating comparison cases. Should
be possible to provoke unbounded recursion now, but leaving that to someone
else to provoke and repair.
Bugfix candidate -- although this is getting harder to backstitch, and the
cases it's protecting against are mondo contrived.
2001-06-03 04:54:32 +00:00
Tim Peters 7b5d0afb1e lookdict: Reduce obfuscating code duplication with a judicious goto.
This code is likely to get even hairier to squash core dumps due to
mutating comparisons, and it's hard enough to follow without that.
2001-06-03 04:14:43 +00:00
Fred Drake 00d0cb6ec3 Explained more differences between PyList_SetItem() and PyList_SET_ITEM().
In particular, the affect on existing list content was not sufficiently
explained.

This closes SF bug #429554.
2001-06-03 03:12:57 +00:00
Tim Peters 19b77cfc4b Finish the dict->string coredump fix. Need sleep.
Bugfix candidate.
2001-06-02 08:27:39 +00:00
Tim Peters fa517b277f Fix comment. 2001-06-02 08:18:58 +00:00