summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Patch # 1140 (my code, approved by Effbot).Guido van Rossum2007-09-101-17/+8
| | | | | | | | | Make sure the type of the return value of re.sub(x, y, z) is the type of y+x (i.e. unicode if either is unicode, str if they are both str) even if there are no substitutions or if x==z (which triggered various special cases in join_list()). Could be backported to 2.5; no need to port to 3.0.
* More work on SSL support.Bill Janssen2007-09-101-131/+672
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Much expanded test suite: All protocols tested against all other protocols. All protocols tested with all certificate options. Tests for bad key and bad cert. Test of STARTTLS functionality. Test of RAND_* functions. * Fixes for threading/malloc bug. * Issue 1065 fixed: sslsocket class renamed to SSLSocket. sslerror class renamed to SSLError. Function "wrap_socket" now used to wrap an existing socket. * Issue 1583946 finally fixed: Support for subjectAltName added. Subject name now returned as proper DN list of RDNs. * SSLError exported from socket as "sslerror". * RAND_* functions properly exported from ssl.py. * Documentation improved: Example of how to create a self-signed certificate. Better indexing.
* Change socket.error to inherit from IOError rather than being a standGregory P. Smith2007-09-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | alone class. This addresses the primary concern in http://bugs.python.org/issue1706815 python-dev discussion here: http://mail.python.org/pipermail/python-dev/2007-July/073749.html I chose IOError rather than EnvironmentError as the base class since socket objects are often used as transparent duck typed file objects in code already prepared to deal with IOError exceptions. also a minor fix: urllib2 - fix a couple places where IOError was raised rather than URLError. for better or worse, URLError already inherits from IOError so this won't break any existing code. test_urllib2net - replace bad ftp urls.
* email address updateGregory P. Smith2007-09-095-8/+8
|
* Remove unneeded #include.Thomas Heller2007-09-071-1/+0
|
* Add a 'c_longdouble' type to the ctypes module.Thomas Heller2007-09-075-1/+69
|
* Patch #1733973 by peaker:Armin Rigo2007-09-061-2/+14
| | | | | ptrace_enter_call() assumes no exception is currently set. This assumption is broken when throwing into a generator.
* Patch #786737: Allow building in a tree of symlinks pointing toMartin v. Löwis2007-09-051-1/+1
| | | | a readonly source.
* SSL certificate distinguished names should be represented by tuplesBill Janssen2007-09-051-10/+15
|
* - Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*.Matthias Klose2007-09-042-2/+2
|
* Patch #1388440: Add set_completion_display_matches_hook andMartin v. Löwis2007-09-041-0/+77
| | | | get_completion_type to readline.
* Document that we rely on the OS to release the cryptoMartin v. Löwis2007-09-041-0/+2
| | | | context. Fixes #1626801.
* Somewhat-preliminary slice-object and extended slicing support for ctypes.Thomas Wouters2007-08-301-2/+305
| | | | | | The exact behaviour of omitted and negative indices for the Pointer type may need a closer look (especially as it's subtly different from simple slices) but there's time yet before 2.6, and not enough before 3.0a1 :-)
* Improve extended slicing support in builtin types and classes. Specifically:Thomas Wouters2007-08-282-93/+287
| | | | | | | | | | | | | | | | | | | | - Specialcase extended slices that amount to a shallow copy the same way as is done for simple slices, in the tuple, string and unicode case. - Specialcase step-1 extended slices to optimize the common case for all involved types. - For lists, allow extended slice assignment of differing lengths as long as the step is 1. (Previously, 'l[:2:1] = []' failed even though 'l[:2] = []' and 'l[:2:None] = []' do not.) - Implement extended slicing for buffer, array, structseq, mmap and UserString.UserString. - Implement slice-object support (but not non-step-1 slice assignment) for UserString.MutableString. - Add tests for all new functionality.
* > Some of the code sets the error string in this directly beforeGuido van Rossum2007-08-271-88/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | > returning NULL, and other pieces of the code call PySSL_SetError, > which creates the error string. I think some of the places which set > the string directly probably shouldn't; instead, they should call > PySSL_SetError to cons up the error name directly from the err code. > However, PySSL_SetError only works after the construction of an ssl > object, which means it can't be used there... I'll take a longer look > at it and see if there's a reasonable fix. Here's a patch which addresses this. It also fixes the indentation in PySSL_SetError, bringing it into line with PEP 7, fixes a compile warning about one of the OpenSSL macros, and makes the namespace a bit more consistent. I've tested it on FC 7 and OS X 10.4. % ./python ./Lib/test/regrtest.py -R :1: -u all test_ssl test_ssl beginning 6 repetitions 123456 ...... 1 test OK. [29244 refs] % [GvR: slightly edited to enforce 79-char line length, even if it required violating the style guide.]
* Fix a few more variables to try to get this to compile with Visual Studio.Neal Norwitz2007-08-251-2/+3
|
* Try to get this to build with Visual Studio by moving all the variableNeal Norwitz2007-08-251-17/+24
| | | | declarations to the beginning of a scope.
* Server-side SSL and certificate validation, by Bill Janssen.Guido van Rossum2007-08-251-91/+386
| | | | | While cleaning up Bill's C style, I may have cleaned up some code he didn't touch as well (in _ssl.c).
* Fix bug 1764407 - the -i switch now does the right thing when using the -m ↵Nick Coghlan2007-08-251-5/+4
| | | | switch
* Add cheot-ga-keut composed make-up sequence support in EUC-KR codec.Hye-Shik Chang2007-08-201-7/+104
|
* Backport r57105 and r57145 from the py3k branch: UTF-32 codecs.Walter Dörwald2007-08-171-0/+204
|
* Fix memory leak in os.readlinkNeal Norwitz2007-08-121-2/+6
|
* Backport r56875 from py3k; double LEAVE_PYTHON when AsString() failsGuido van Rossum2007-08-091-1/+3
| | | | in PythonCmd().
* Fix compilation warning.Georg Brandl2007-08-081-1/+1
|
* Revert the fix for #1548891, it broke backwards compatibility with arbitrary ↵Georg Brandl2007-08-081-2/+5
| | | | | | read buffers. Fixes #1730114.
* Fix gb18030 codec's bug that doesn't map two-byte characters onHye-Shik Chang2007-08-041-0/+1
| | | | GB18030 extension in encoding. (bug reported by Bjorn Stabell)
* Bug #1704793: Return UTF-16 pair if unicodedata.lookup cannotMartin v. Löwis2007-07-281-16/+11
| | | | represent the result in a single character.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-2159-548/+440
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Document that codecs.lookup() returns a CodecInfo object.Walter Dörwald2007-07-191-4/+5
| | | | (fixes SF bug #1754453).
* PyType_stgdict() returns a borrowed reference which must not beThomas Heller2007-07-131-2/+0
| | | | Py_DECREF'd.
* Fix for SF# 1649098: avoid zero-sized array declaration in structure.Thomas Heller2007-07-132-2/+2
|
* Repair COMError. Since exceptions are new style classes now, settingThomas Heller2007-07-131-7/+13
| | | | | the methods and docstring after the type creation does not work, they must be in the dictionary before creating the type.
* Many calls to tk.call involve an arglist containing a single tuple.Kurt B. Kaiser2007-07-051-0/+6
| | | | | | | | | | Calls using METH_OLDARGS unpack this tuple; calls using METH_VARARG don't. Tcl's concatenation of args was affected; IDLE doesn't start. Modify Tkapp_Call() to unpack single tuple arglists. Bug 1733943 Ref http://mail.python.org/pipermail/python-checkins/2007-May/060454.html
* Use "O&" in calls to PyArg_Parse when we need a 'void*' instead of "k"Thomas Heller2007-06-112-13/+17
| | | | or "K" codes.
* Patch #1733960: Allow T_LONGLONG to accept ints.Martin v. Löwis2007-06-091-3/+27
| | | | Will backport to 2.5.
* Fix warnings by using proper function prototype.Thomas Heller2007-06-082-8/+8
|
* Fix gcc warnings intruduced by passing Py_ssize_t to PyErr_Format calls.Thomas Heller2007-06-083-11/+24
|
* [ 1715718 ] x64 clean compile patch for _ctypes, by Kristj?n ValurThomas Heller2007-06-086-142/+158
| | | | with small modifications.
* Fixing changes to getbuildinfo.c that broke linux buildsKristján Valur Jónsson2007-06-071-2/+9
|
* Patch by Tim Delany (missing DECREF). SF #1731330.Guido van Rossum2007-06-051-0/+1
|
* Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when itHye-Shik Chang2007-06-051-1/+5
| | | | | reads a file that ends with incomplete sequence and sizehint argument for .read() is specified.
* Fix build on FreeBSD. Bluetooth HCI API in FreeBSD is quite differentHye-Shik Chang2007-06-051-2/+5
| | | | | from Linux's. Just fix the build for now but the code doesn't support the complete capability of HCI on FreeBSD yet.
* Backout the original 'fix' to 1721309 which had no effect.Neal Norwitz2007-06-031-5/+9
| | | | | | | | | | | Different versions of Berkeley DB handle this differently. The comments and bug report should have the details. Memory is allocated in 4.4 (and presumably earlier), but not in 4.5. Thus 4.5 has the free error, but not earlier versions. Mostly update comments, plus make the free conditional. This fix was already applied to the 2.5 branch.
* Fix compiler warnings.Thomas Heller2007-05-301-2/+2
|
* Add -3 option to the interpreter to warn about features that areNeal Norwitz2007-05-231-1/+6
| | | | | | | deprecated and will be changed/removed in Python 3.0. This patch is mostly from Anthony. I tweaked some format and added a little doc.
* Stop using METH_OLDARGS implicitlyNeal Norwitz2007-05-223-12/+12
|
* Stop using METH_OLDARGSNeal Norwitz2007-05-221-3/+3
|
* Remove the rgbimg module. It has been deprecated since Python 2.5.Brett Cannon2007-05-202-781/+0
|
* Whoops, need to pay attention to those test failures.Neal Norwitz2007-05-191-1/+1
| | | | Move the clear to *before* the first use, not after.
* Clear data so random memory does not get freed. Will backport.Neal Norwitz2007-05-191-0/+1
|