summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* SF bug [#467145] Python 2.2a4 build problem on HPUX 11.0.Tim Peters2001-10-112-68/+71
| | | | | | | | | | | | | | The platform requires 8-byte alignment for doubles, but the GC header was 12 bytes and that threw off the natural alignment of the double members of a subtype of complex. The fix puts the GC header into a union with a double as the other member, to force no-looser-than double alignment of GC headers. On boxes that require 8-byte alignment for doubles, this may add pad bytes to the GC header accordingly; ditto for platforms that *prefer* 8-byte alignment for doubles. On platforms that don't care, it shouldn't change the memory layout (because the size of the old GC header is certainly greater than the size of a double on all platforms, so unioning with a double shouldn't change size or alignment on such boxes).
* Somebody checked in a version of httplib that doesn't even compile --Tim Peters2001-10-111-1/+1
| | | | SyntaxError. Fix it.
* Fix for SF buf #458835Jeremy Hylton2001-10-111-3/+14
| | | | | | | | | | | | | | | | | Try to be systematic about dealing with socket and ssl exceptions in FakeSocket.makefile(). The previous version of the code caught all ssl errors and treated them as EOF, even though most of the errors don't mean EOF. An SSL error can mean on of three things: 1. The SSL/TLS connection was closed. 2. The operation should be retried. 3. An error occurred. Also, if a socket error occurred and the error was EINTR, retry the call. Otherwise, it was a legitimate error and the caller should receive the exception.
* Use PySocket_Err() instead of PyErr_SetFromErrno().Jeremy Hylton2001-10-111-3/+2
| | | | The former does the right thing on Windows, the latter does not.
* Commit parts of SF patch #462759Jeremy Hylton2001-10-111-68/+68
| | | | | | | | | | | | | | | Use #define X509_NAME_MAXLEN for server/issuer length on an SSL object. Update doc strings for socket.ssl() and ssl methods read() and write(). PySSL_SSLwrite(): Check return value and raise exception on error. Use int for len instead of size_t. (All the function the size_t obj was passed to our from expected an int!) PySSL_SSLread(): Check return value of PyArg_ParseTuple()! More robust checks of return values from SSL_read().
* Convert socket methods to use METH_O and METH_NOARGS where possible.Jeremy Hylton2001-10-111-50/+39
|
* Document that keyfile and certfile are now optional.Jeremy Hylton2001-10-111-1/+1
| | | | XXX Forgot to mention this in the last socketmodule.c checkin.
* Describe the HeaderParser class.Barry Warsaw2001-10-111-0/+11
|
* Add a test for the HeaderParser class.Barry Warsaw2001-10-111-1/+17
|
* HeaderParser: A new subclass of Parser which only parses the messageBarry Warsaw2001-10-111-0/+16
| | | | | | headers. It does not parse the body of the message, instead simply assigning it as a string to the container's payload. This can be much faster when you're only interested in a message's header.
* Undo part of 2.59: 't' case of convertsimple() should not use convertbuffer().Jeremy Hylton2001-10-111-5/+11
| | | | | convertbuffer() uses the buffer interface's getreadbuffer(), but 't' should use getcharbuffer().
* Add test of hexlify on Unicode stringsJeremy Hylton2001-10-111-0/+4
|
* Add a bunch of SSL error constantsJeremy Hylton2001-10-111-0/+12
|
* Lots of code reorganization with a few small API changes.Jeremy Hylton2001-10-101-45/+113
| | | | | | | | | | | | | | | | | | | | | | Change all the local names that start with SSL to start with PySSL. The OpenSSL library defines lots of calls that start with "SSL_". The calls for Python's SSL objects also started with "SSL_". This choice made it really confusing to figure out which calls were to the library and which calls were local to the file. Add PySSL_SetError() that sets an exception based on the information from SSL_get_error(). This function will eventually replace all the calls that set it with an error message that is based on the name of the call that failed rather than the reason it failed. (Example: If SSL_connect() failed it used to report "SSL_connect error" now it will offer a specific message about why SSL_connect failed.) XXX It might be helpful to augment the error message generated below with the name of the SSL function that generated the error. I expect it's obvious most of the time. Remove several unnecessary INCREFs in the module's constructor call. PyDict_SetItem() and friends do the INCREF for you.
* Do simple error checking before doing any SSL calls.Jeremy Hylton2001-10-101-5/+5
|
* USe PyObject_SetString() instead of PyObject_SetObject() in newSSLObject().Jeremy Hylton2001-10-101-14/+9
|
* Rather gross workaround for a bug in the mac GUSI I/O library:Jack Jansen2001-10-101-1/+7
| | | | | | lseek(fp, 0L, SEEK_CUR) can make a filedescriptor unusable. This workaround is expected to last only a few weeks (until GUSI is fixed), but without it test_email fails.
* Some of the lesser used targets still used FMADD/FMSUB instructions. Fixed.Jack Jansen2001-10-102-0/+0
|
* allow long ints to be marshalled as ints - no check is made to the incomingSkip Montanaro2001-10-101-0/+6
| | | | | | | value, so the programmer will have to catch OverflowError. I'm not sure what /F's perspective is on this. Perhaps it should be caught and mapped to an xmlrpclib-specific exception. None of the other type-specific dump methods seem to do any exception handling though.
* Fred's done with weakrefsGuido van Rossum2001-10-101-2/+1
|
* SF bug [#469732] os.path.walk docstring inconsistent.Tim Peters2001-10-105-27/+67
| | | | | We have 5 implementations of walk(), and 5 different docstrings. Combined 'em. Let's see how long it takes before they're all different again!
* In newSSLObject(), initialize the various members of an SSLObject to NULL.Jeremy Hylton2001-10-101-2/+8
| | | | | | | In SSL_dealloc(), free/dealloc them only if they're non-NULL. Fixes some obvious core dumps, but not sure yet if there are more semantics to the SSL calls that would affect the dealloc.
* A bit of reformatting to match the standard styleJeremy Hylton2001-10-101-7/+7
|
* Fix two memory leaks in socket.ssl().Jeremy Hylton2001-10-101-39/+29
| | | | | | | | | | | | | | | | | | | | | | | | XXX [1] These changes aren't tested very thoroughly, because regrtest doesn't do any SSL tests. I've done some trivial tests on my own, but don't really know how to use the key and cert files. In one case, an SSL-level error causes Python to dump core. I'll get the fixed in the next round of changes. XXX [2] The checkin removes the x_attr member of the SSLObject struct. I'm not sure if this is kosher for backwards compatibility at the binary level. Perhaps its safer to keep the member but keep it assigned to NULL. And the leaks? newSSLObject() called PyDict_New(), stored the result in x_attr without checking it, and later stored NULL in x_attr without doing anything to the dict. So the dict always leaks. There is no further reference to x_attr, so I just removed it completely. The error cases in newSSLObject() passed the return value of PyString_FromString() directly to PyErr_SetObject(). PyErr_SetObject() expects a borrowed reference, so the string leaked.
* One more place where PyString_AsString() was used after aJeremy Hylton2001-10-101-1/+1
| | | | PyString_Check() had already succeeded.
* Use AS_STRING() following the check and avoid an extra call.Jeremy Hylton2001-10-101-1/+1
|
* SF patch [ #468662 ] Allow jython to complete test_grammarJeremy Hylton2001-10-101-4/+14
| | | | | | The behavior of co_varnames in the presence of nested argument tuples is not consistent across Python and Jython. Test each platform separately.
* Updated, and added a very terse description of PyMac_SetConsoleHandler().Jack Jansen2001-10-091-10/+8
|
* Fixed the embedding demo to correctly show the use ofJack Jansen2001-10-092-11/+19
| | | | overriding the console writer.
* Add item about new "Edit with IDLE" menu entry created by Windows installer.Tim Peters2001-10-091-0/+4
|
* If all of Python, IDLE and Tcl/Tk are being installed, and the user hasTim Peters2001-10-091-0/+42
| | | | | | not disabled file-extension registration, arrange for .py and .pyw files to have an "Edit with IDLE" context (right-click) menu entry, selecting which executes IDLE w/ the -e switch followed by the selected file's path.
* Repair key stutter + auto-complete ugliness.Tim Peters2001-10-091-2/+2
|
* A copy-and-paste job forget the "paste" half.Tim Peters2001-10-091-1/+1
|
* Remove obsolete email address.Fred Drake2001-10-091-1/+1
|
* Allow the profiler's calibration constant to be specified in the constructorTim Peters2001-10-093-73/+70
| | | | | | | | call, or via setting an instance or class vrbl. Rewrote the calibration docs. Modern boxes are so friggin' fast, and a profiler event does so much work anyway, that the cost of looking up an instance vrbl (the bias constant) per profile event just isn't a big deal.
* Add a bunch of tests for a list subclass that would have caught theGuido van Rossum2001-10-091-0/+22
| | | | previous embarrassment (typeobject.c checking crashing minidom).
* The slot definition table entry for mp_getitem had a bogus wrapperGuido van Rossum2001-10-091-1/+2
| | | | function, which caused test_minidom to fail. Fixed this.
* An audio/* class, like MIMEImage, contributed by Anthony Baxter.Barry Warsaw2001-10-091-0/+71
| | | | | Rewritten for style and the email package naming conventions by Barry.
* Halfway checkin. This is still messy, but it's beginning to addressGuido van Rossum2001-10-092-140/+302
| | | | | | | | | | the problem that slots weren't inherited properly. override_slots() no longer exists; in its place comes fixup_slot_dispatchers() which does more and different work and is table-based. (Eventually I want this table also to replace all the little tab_foo tables.) Also add a wrapper for __delslice__; this required a change in test_descrtut.py.
* Fix minor cut-and-paste typo.Barry Warsaw2001-10-091-1/+1
|
* Update the documentation for the isinstance() function to reflect recentFred Drake2001-10-091-221/+226
| | | | | changes in the implementation. Indented all descriptions consistently.
* Added tests for MIMEAudio class/moduleBarry Warsaw2001-10-091-4/+69
|
* Fix __all__ to the current list of exported modules (must pass theBarry Warsaw2001-10-091-3/+4
| | | | tests in test_email.py).
* Add documentation for the MIMEAudio class/module, contributed byBarry Warsaw2001-10-091-0/+26
| | | | Anthony Baxter.
* Improve the documentation for the os.P_* constants used with the os.spawn*()Fred Drake2001-10-091-9/+29
| | | | | | | | | | functions to include information about how they affect the operation of those functions when used as the "mode" parameter. This closes SF bug #468384. Added warnings to the os.tempnam() and os.tmpnam() functions regarding their security problem. These warning mirror the warnings added to the runtime by Skip Montanaro.
* New markup: \note{...} and \warning{...}Fred Drake2001-10-094-0/+36
|
* Fix [ #465502 ] urllib2: urlopen unicode problemJeremy Hylton2001-10-091-67/+36
| | | | | | | | When checking for strings use, ! if isinstance(uri, (types.StringType, types.UnicodeType)): Also get rid of some dodgy code that tried to guess whether attributes were callable or not.
* Add a test for get_all() returning failobj. msg_20.txt is a sampleBarry Warsaw2001-10-092-0/+28
| | | | message with multiple CC: fields, used in the get_all() test.
* get_all(): We never returned failobj if we found no matching headers.Barry Warsaw2001-10-091-0/+4
| | | | Fix that, and also make the docstring describe failobj.
* SMTPServer.__init__(): The asyncore.dispatcher base class has a methodBarry Warsaw2001-10-091-3/+1
| | | | set_reuse_addr() that does the setsockopt fiddling. Use it instead.