- 11 Oct, 2001 13 commits
-
-
Tim Peters authored
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).
-
Tim Peters authored
SyntaxError. Fix it.
-
Jeremy Hylton authored
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.
-
Jeremy Hylton authored
The former does the right thing on Windows, the latter does not.
-
Jeremy Hylton authored
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().
-
Jeremy Hylton authored
-
Jeremy Hylton authored
XXX Forgot to mention this in the last socketmodule.c checkin.
-
Barry Warsaw authored
-
Barry Warsaw authored
-
Barry Warsaw authored
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.
-
Jeremy Hylton authored
convertbuffer() uses the buffer interface's getreadbuffer(), but 't' should use getcharbuffer().
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
- 10 Oct, 2001 14 commits
-
-
Jeremy Hylton authored
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.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jack Jansen authored
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.
-
Jack Jansen authored
-
Skip Montanaro authored
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.
-
Guido van Rossum authored
-
Tim Peters authored
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!
-
Jeremy Hylton authored
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.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
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.
-
Jeremy Hylton authored
PyString_Check() had already succeeded.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
The behavior of co_varnames in the presence of nested argument tuples is not consistent across Python and Jython. Test each platform separately.
-
- 09 Oct, 2001 13 commits
-
-
Jack Jansen authored
-
Jack Jansen authored
overriding the console writer.
-
Tim Peters authored
-
Tim Peters authored
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.
-
Tim Peters authored
-
Tim Peters authored
-
Fred Drake authored
-
Tim Peters authored
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.
-
Guido van Rossum authored
previous embarrassment (typeobject.c checking crashing minidom).
-
Guido van Rossum authored
function, which caused test_minidom to fail. Fixed this.
-
Barry Warsaw authored
Rewritten for style and the email package naming conventions by Barry.
-
Guido van Rossum authored
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.
-
Barry Warsaw authored
-