summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Make the low-level log-reader object export a dictionary mapping keysFred Drake2001-10-291-45/+163
| | | | | | | | | | | | | | to lists of values, giving the contents of all the ADD_INFO records seen so far. This is initialized agressively when the log file is opened, so that whoever is looking at the log reader can always see the initial data loaded into the data stream. ADD_INFO events later in the log file continue to be reported to the application layer as before. Add a new method, addinfo(), to the profiler. This can be used to insert additional ADD_INFO records into the profiler log. Fix the tp_flags and tp_name slots on the type objects.
* dictionary -> dictAndrew M. Kuchling2001-10-291-1/+1
|
* Fix two typos noted by Jens QuadeAndrew M. Kuchling2001-10-291-5/+12
| | | | Bump version number
* Add additional information on exceptions from time.mktime() and related toFred Drake2001-10-291-2/+7
| | | | | improper time tuples passed to various functions. Based on comments from Andreas Jung.
* More refcount information.Fred Drake2001-10-291-0/+40
|
* Ignore all *.tex files in the typesetting output directories since there areFred Drake2001-10-292-2/+2
| | | | a bunch of them now.
* Make sure we generate versions of each file in the Python/C API manual withFred Drake2001-10-292-3/+52
| | | | | reference-count annotations; this is needed for the typeset forms of the manuals.
* Use connect_ex() instead of connect().Jeremy Hylton2001-10-291-12/+9
| | | | Removes old XXX comment and possible source of long-delays.
* Fix for SF bug 453099 -- select not defensiveJeremy Hylton2001-10-291-5/+16
| | | | | | | | | | And SF patch 473223 -- infinite getattr loop Wrap select() and poll() calls with try/except for EINTR. If EINTR is raised, treat as a response where no fd is ready. In dispatcher constructor, make sure self.socket is always initialized.
* Fix some markup errors noted by MHAndrew M. Kuchling2001-10-291-5/+5
| | | | Use attribute assignment to illustrate __slots__ raising an error
* When overriding __str__ or __repr__, set the tp_print slot to NULL.Guido van Rossum2001-10-291-0/+2
|
* more loading from cfg filesSteven M. Gava2001-10-291-17/+61
|
* more of config dialog reading from filesSteven M. Gava2001-10-294-38/+82
|
* Use sendall() in the stream test instead of send().Guido van Rossum2001-10-291-1/+1
|
* Test sendall().Guido van Rossum2001-10-291-1/+1
|
* Add 'sendall' to list of socket methods.Guido van Rossum2001-10-291-1/+1
|
* added finditer sanity checkFredrik Lundh2001-10-282-3/+13
|
* Oops. In the tp_name field, the name should be "_socket.socket", notGuido van Rossum2001-10-281-2/+2
| | | | | | "socket.socket" -- on Windows, "socket.socket" is the wrapper class. Also added the module name to the SSL type (which is not a new-style class -- I don't want to mess with it yet).
* PyObject_CallFunctionObArgs() ---> PyObject_CallFunctionObjArgs()Fred Drake2001-10-284-23/+23
| | | | PyObject_CallMethodObArgs() ---> PyObject_CallMethodObjArgs()
* News about the socket type and the HP-UX port.Guido van Rossum2001-10-271-1/+8
|
* Made SocketType and socket the same thing: a subclassable type whoseGuido van Rossum2001-10-271-119/+167
| | | | | | | | | | | | | | | | | | | | | constructor acts just like socket() before. All three arguments have a sensible default now; socket() is equivalent to socket(AF_INET, SOCK_STREAM). One minor issue: the socket() function and the SocketType had different doc strings; socket.__doc__ gave the signature, SocketType.__doc__ gave the methods. I've merged these for now, but maybe the list of methods is no longer necessary since it can easily be recovered through socket.__dict__.keys(). The problem with keeping it is that the total doc string is a bit long (34 lines -- it scrolls of a standard tty screen). Another general issue with the socket module is that it's a big mess. There's pages and pages of random platform #ifdefs, and the naming conventions are totally wrong: it uses Py prefixes and CapWords for static functions. That's a cleanup for another day... (Also I think the big starting comment that summarizes the API can go -- it's a repeat of the docstring.)
* SF patch #475657 (Dietmar Schwertberger)Guido van Rossum2001-10-273-9/+14
| | | | | | | | | | | | RISCOS/Makefile: include structseq and weakrefobject; changes to keep command line length below 2048 RISCOS/Modules/riscosmodule.c: typos from the stat structseq patch Include/pyport.h: don't re-#define __attribute__(__x) on RISC OS as it is already defined in c library
* SF bug #475327: type() produces incorrect error msgTim Peters2001-10-272-6/+22
| | | | | | | | | | | | | object.h: Added PyType_CheckExact macro. typeobject.c, type_new(): + Use the new macro. + Assert that the arguments have the right types rather than do incomplete runtime checks "sometimes". + If this isn't the 1-argument flavor() of type, and there aren't 3 args total, produce a "types() takes 1 or 3 args" msg before PyArg_ParseTupleAndKeywords produces a "takes exactly 3" msg.
* dictionary() constructor:Tim Peters2001-10-272-11/+9
| | | | | | + Change keyword arg name from "x" to "items". People passing a mapping object can stretch their imaginations <wink>. + Simplify the docstring text.
* vgetargskeywords()Tim Peters2001-10-271-16/+17
| | | | | | | | | | + Squash another potential buffer overrun. + Simplify the keyword-arg loop by decrementing the count of keywords remaining instead of incrementing Yet Another Variable; also break out early if the number of keyword args remaining hits 0. Since I hit the function's closing curly brace with this patch, that's enough of this for now <wink>.
* vgetargskeywords: Now that it's clear that nkwlist must equal max, andTim Peters2001-10-271-4/+3
| | | | we're ensuring that's true during the format parse, get rid of nkwlist.
* vgetargskeywords: Prevent another potential sprintf buffer overrun.Tim Peters2001-10-271-2/+2
|
* vgetargskeywords: Verify kwlist has the required length while parsingTim Peters2001-10-271-20/+24
| | | | | the format, instead of waiting until after we can overindex it by mistake.
* PyObject_CallFunction(), PyObject_CallMethod(): Make sure we do not touchFred Drake2001-10-271-18/+11
| | | | | | the va_list until we are sure we have a format string and need to use it; this avoid premature initialization and having to finalize it several different places because of error returns.
* vgetargskeywords: Removed all PyErr_Clear() calls. It's possible thatTim Peters2001-10-271-4/+8
| | | | | this routine will report an error now when it didn't before, but, if so, it's a legitimate error that should never have been suppressed.
* vgetargskeywords: The keywords arg is a dict (if non-NULL), so use theTim Peters2001-10-271-5/+5
| | | | | dict API everywhere on it instead of sometimes using the slower mapping API.
* vgetargskeywords: Removed one of the mysterious PyErr_Clear() calls.Tim Peters2001-10-271-10/+1
| | | | | | | The "need" for this was probably removed by an earlier patch that stopped the loop right before it from passing NULL to a dict lookup routine. I still haven't convinced myself that the next loop is correct, so am leaving the next mysterious PyErr_Clear() call in for now.
* vgetargskeywords:Tim Peters2001-10-271-16/+9
| | | | | | | | | | | | + Generally test nkeywords against 0 instead of keywords against NULL (saves a little work if an empty keywords dict is passed, and is conceptually more on-target regardless). + When a call erroneously specifies a keyword argument both by position and by keyword name: - It was easy to provoke this routine into an internal buffer overrun by using a long argument name. Now uses PyErr_format instead (which computes a safe buffer size). - Improved the error msg.
* vgetargskeywords:Tim Peters2001-10-271-20/+7
| | | | | | + Got rid of now-redundant dict typecheck. + Renamed nkwds to nkwlist. Now all the "counting" vrbls have names related to the things they're counting in an obvious way.
* vgetargskeywords:Tim Peters2001-10-271-12/+13
| | | | | | | + Renamed argslen to nargs. + Renamed kwlen to nkeywords. This one was especially confusing because kwlen wasn't the length of the kwlist argument, but of the keywords argument.
* vgetargskeywords:Tim Peters2001-10-271-15/+10
| | | | | | | + Removed now-redundant tuple typecheck. + Renamed "tplen" local to "argslen" (it's the length of the "args" argument; I suppose "tp" was for "Tim Peters should rename me someday <wink>).
* PyArg_ParseTupleAndKeywords: return false on internal error, not -1 (ITim Peters2001-10-271-30/+34
| | | | | | | | | | | introduced this bug just a little while ago, when *adding* internal error checks). vgetargskeywords: Rewrote the section that crawls over the format string. + Added block comment so it won't take the next person 15 minutes to reverse-engineer what it's doing. + Lined up the "else" clauses. + Rearranged the ifs in decreasing order of likelihood (for speed).
* PyArg_ParseTupleAndKeywords: do basic sanity checks on the arguments,Tim Peters2001-10-271-1/+16
| | | | | | and raise an error if they're insane. vgetargskeywords: the same, except that since this is an internal routine, just assert that the arguments are sane.
* tuple(3,4,5,x=2) dumped core on my box. vgetargskeywords() overindexedTim Peters2001-10-271-3/+13
| | | | | | | | | | | | | | the kwlist vector whenever there was a mix of positional and keyword arguments, and the number of positional arguments exceeded the length of the kwlist vector. If there was just one more positional arg than keyword, the kwlist-terminating NULL got passed to PyMapping_HasKeyString, which set an internal error that vgetargskeywords() then squashed (but it's impossible to say whether it knew it was masking an error). If more than one more positional argument, it went on to pass random trash to PyMapping_HasKeyString, which is why the example at the start happened to kill the process. Pure bugfix candidate.
* vgetargskeywords(): remove test that can't succeed. Not a bugfix, justTim Peters2001-10-271-13/+7
| | | | removing useless obfuscation.
* dict_constructor(): The last test was passing for the wrong reason (itTim Peters2001-10-261-1/+1
| | | | | was intended to verify that sub-sequences of lengths 1 and 3 raise ValueError, but was actually testing string lengths).
* Fill in remaining XXX spotsAndrew M. Kuchling2001-10-261-19/+31
| | | | | | | | - Describe UnpackTuple() - Credit __unicode__ to MAL Use \pep macro everywhere in body text. (Listening to "The Great Gate of Kiev" -- appropriately triumphal music for this check-in...)
* Fix up a number of small problems with the DOM documentation.Fred Drake2001-10-262-20/+35
| | | | There's still a lot to do, but it's better now.
* Finish off the type/class section; I don't think there's much elseAndrew M. Kuchling2001-10-261-73/+125
| | | | to be covered in an overview article like this.
* Remove unused variable.Fred Drake2001-10-261-1/+0
|
* Now that Misc/Makefile.pre.in is gone, do not attempt to install it.Fred Drake2001-10-261-1/+0
|
* Explain what [].insert() does when the target index is negative.Fred Drake2001-10-261-7/+11
|
* Add notes pointing out that these classes are kept for backward compatibilityFred Drake2001-10-261-0/+17
| | | | | and suggeest that new code that does not require compatibility with older Python versions subclass dictionary, list, or str.
* Re-arrange things and remove some unused variables/imports to keep pycheckerFred Drake2001-10-262-4/+14
| | | | happy. (This does not cover everything it complained about, though.)
* Be smarter about clearing the weakref lists for instances, instance methods,Fred Drake2001-10-262-3/+6
| | | | | | and functions: we only need to call PyObject_ClearWeakRefs() if the weakref list is non-NULL. Since these objects are common but weakrefs are still unusual, saving the call at deallocation time makes a lot of sense.