summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Backport of the PCbuild9 directory from the py3k branch.Christian Heimes2007-11-221-0/+4
| | | | | I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k. Have fun! :)
* Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompressChristian Heimes2007-11-211-2/+3
|
* The incremental decoder for utf-7 must preserve its state between calls.Amaury Forgeot d'Arc2007-11-201-6/+13
| | | | | | | Solves issue1460. Might not be a backport candidate: a new API function was added, and some code may rely on details in utf-7.py.
* Backport some main.c cleanup from the py3k branchNick Coghlan2007-11-201-12/+13
|
* Patch #1739468: Directories and zipfiles containing __main__.py are now ↵Nick Coghlan2007-11-181-40/+80
| | | | executable
* A patch from issue 1378 by roudkerk:Guido van Rossum2007-11-161-81/+5
| | | | | | | | Currently on Windows set_error() make use of a large array which maps socket error numbers to error messages. This patch removes that array and just lets PyErr_SetExcFromWindowsErr() generate the message by using the Win32 function FormatMessage().
* readline module cleanupChristian Heimes2007-11-121-99/+90
| | | | | | | | fixed indention to tabs use Py_RETURN_NONE macro added more error checks to on_completion_display_matches_hook open question: Does PyList_SetItem(l, i, o) steal a reference to o in the case of an error?
* Only set rl_completion_display_matches_hook if thereMartin v. Löwis2007-11-121-31/+38
| | | | is a Python hook function. Fixes #1425.
* Use a freelist to speed-up block allocation and deallocation in ↵Raymond Hettinger2007-11-101-7/+27
| | | | collections.deque().
* * db->get_types is only available in BerkeleyDB >= 4.2Gregory P. Smith2007-11-051-0/+7
| | | | * get compiling with older versions of python again for a stand alone release.
* Add the bsddb.db.DBEnv.lock_id_free method.Gregory P. Smith2007-11-051-0/+21
| | | | Improve test_lock's tempdir creation and cleanup.
* Fixes bug 477182 on pybsddb.sf.net. DB objects now load the flags andGregory P. Smith2007-11-051-15/+2
| | | | | | | | | | pay attention to them when opening an existing database. This means that d[] behaves properly even on databases previously created with DB_DUP or DB_DUPSORT flags to allow duplicate keys. http://sourceforge.net/tracker/index.php?func=detail&aid=477182&group_id=13900&atid=113900 Do not backport, this bugfix could be considered an API change.
* Fix bug introduced in revision 58385. Database keys could no longerGregory P. Smith2007-11-011-1/+7
| | | | | have NULL bytes in them. Replace the errant strdup with a malloc+memcpy. Adds a unit test for the correct behavior.
* Fix some compiler warnings for signed comparisons on Unix and Windows.Neal Norwitz2007-10-311-2/+2
|
* ffi_type_longdouble may be already #defined.Thomas Heller2007-10-251-2/+4
| | | | See issue 1324.
* Add phuang patch from Issue 708374 which adds offset parameter to mmap module.Travis E. Oliphant2007-10-231-34/+75
|
* Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.Thomas Heller2007-10-191-6/+10
| | | | | | See also https://bugs.launchpad.net/bugs/72505. Ported from release25-maint branch.
* Get this module to compile with bsddb versions prior to 4.3Neal Norwitz2007-10-121-0/+2
|
* Fix Coverity 168: Close the file before returning (exiting).Neal Norwitz2007-10-121-0/+1
|
* Get rid of compiler warning about retval being used (returned) withoutNeal Norwitz2007-10-121-1/+1
| | | | being initialized. (gcc warning and Coverity 202)
* Get rid of warnings on a bunch of platforms by using a proper prototype.Neal Norwitz2007-10-127-18/+18
|
* Accept Jim Jewett's api suggestion to use None instead of -1 to indicate ↵Raymond Hettinger2007-10-101-10/+26
| | | | unbounded deques.
* Fix a double free when positioning a database cursor to a non-existantGregory P. Smith2007-10-091-1/+13
| | | | | | string key (and probably a few other situations with string keys). This was reported with a patch as pybsddb sourceforge bug 1708868 by jjjhhhlll at gmail.
* Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C APIGregory P. Smith2007-10-092-188/+263
| | | | | | | | | | | object available as bsddb.db.api. This is based on the patch submitted by Duncan Grisby here: http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900 See this thread for additional info: http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users It also cleans up the code a little by removing some ifdef/endifs for python prior to 2.1 and for unsupported Berkeley DB <= 3.2.
* Stab in the dark attempt to fix the test_bsddb3 failure on sparc and S-390Gregory P. Smith2007-10-061-1/+7
| | | | ubuntu buildbots.
* Restore BEGIN/END THREADS macros which were squashed in the previous checkinRaymond Hettinger2007-10-051-5/+21
|
* Fix Coverity #159.Neal Norwitz2007-10-051-1/+1
| | | | | | | This code was broken if save() returned a negative number since i contained a boolean value and then we compared i < 0 which should never be true. Will backport (assuming it's necessary)
* dict could be NULL, so we need to XDECREF.Neal Norwitz2007-10-051-2/+2
| | | | Fix a compiler warning about passing a PyTypeObject* instead of PyObject*.
* Add __asdict__() to NamedTuple and refine the docs.Raymond Hettinger2007-10-051-85/+101
| | | | | | Add maxlen support to deque() and fixup docs. Partially fix __reduce__(). The None as a third arg was no longer supported. Still needs work on __reduce__() to handle recursive inputs.
* itertools.count() no longer limited to sys.maxint.Raymond Hettinger2007-10-041-9/+70
|
* issue1597011: Fix for bz2 module corner-case error due to error checking bug.Sean Reifscheider2007-09-171-23/+17
|
* Add a bunch of GIL release/acquire points in tp_print implementations and forBrett Cannon2007-09-171-1/+18
| | | | | | PyObject_Print(). Closes issue #1164.
* Add support for asyncore server-side SSL support. This requiresBill Janssen2007-09-161-49/+4
| | | | | | | | | | | | | | | adding the 'makefile' method to ssl.SSLSocket, and importing the requisite fakefile class from socket.py, and making the appropriate changes to it to make it use the SSL connection. Added sample HTTPS server to test_ssl.py, and test that uses it. Change SSL tests to use https://svn.python.org/, instead of www.sf.net and pop.gmail.com. Added utility function to ssl module, get_server_certificate, to wrap up the several things to be done to pull a certificate from a remote server.
* 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.