summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* backport of 1.196: socket.recv(-1) fixup.Anthony Baxter2001-12-231-0/+5
|
* one more for the night.Anthony Baxter2001-11-011-8/+16
| | | | | | backport of 2.26: Make the gc.collect() function respect the collection lock. This fixes SF bug 476129: "gc.collect sometimes hangs".
* backport of (merged) 1.43 and 1.44Anthony Baxter2001-11-011-2/+4
| | | | | | | initregex(): this function is declared void, so the recent change to return NULL in an error case was itself an error. initregex(): Check return value of PyErr_Warn() and propagate the exception (if any.)
* backport of 2.58:Anthony Baxter2001-11-011-3/+13
| | | | | | | Fix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck) Replace some tortuous code that was trying to be clever but forgot to DECREF the key and value, by more longwinded but obviously correct code.
* backport 2.56 from uncle tim:Anthony Baxter2001-11-011-15/+11
| | | | | | Stop adding 3 to FD_SETSIZE -- it makes no sense. If it turns out it actually does <wink>, perhaps an Insure run will catch it. Also removed senseless Windows comment.
* backport barry's 2.54:Anthony Baxter2001-11-011-8/+21
| | | | | | | | | | select_select(): Closing bug #448351 the easy way, i.e. by changing the "#ifdef MS_WINDOWS" to "#ifdef SELECT_USES_HEAP" and by setting SELECT_USES_HEAP when FD_SETSIZE > 1024. The indirection seems useful since this subtly changes the path that "normal" Windows programs take (where Timmie sez FD_SETSIZE = 512). If that's a problem for Windows, he has only one place to change.
* wrap SSL_read and SSL_write in Py_{BEGIN,END}_ALLOW_THREADS.Anthony Baxter2001-11-011-0/+4
| | | | other half of backport of guido's 1.188
* partial backport of guido's 1.188.Anthony Baxter2001-11-011-2/+40
| | | | | | | | | | | | | | | Add sendall() method, which loops until all data is written or an error occurs, and doesn't return a count. (This is my second patch from SF patch #474307, with small change to the docstring for send().) the 'partial' is because 1.188 also added a couple of Py_*_ALLOW_THREADS wrappers around SSL_read and SSL_write, and I want to check those separately. This is adding a new method to the socket object, which would normally be a bad thing to do in a bugfix release - however, in this case, it allows fixes for a nasty problem that would otherwise have a filthy filthy fix to Get It Right. Still to-do is to patch the std library modules to use sendall() where appropriate, rather than send().
* backport of MvL's 1.180Anthony Baxter2001-11-011-1/+1
| | | | | | Test for __sun instead of __sun__, since SUNWspro only defines the latter; gcc defines both. ...must get sparc box at home out of cupboard for testing this stuff...
* backport tim's 1.191:Anthony Baxter2001-11-011-1/+6
| | | | | PySocketSock_connect_ex(): On Windows, return the correct Windows exit code. The patch is from Jeremy, and allows test_asynchat to run again.
* backport (partially) jeremy's 1.178Anthony Baxter2001-11-011-1/+1
| | | | | | | | | | | | Use PySocket_Err() instead of PyErr_SetFromErrno(). The former does the right thing on Windows, the latter does not. The 'partial' is because the code's changed quite a lot and it's not clear that the two that are still there of the form return PyErr_SetFromErrno(SSLErrorObject); can be replaced with PySocket_Err() - it looks like they need the new PySSL_SetError, which is a tad large to be comfortable with just checking in without reading it further.
* backport tim's 2.44Anthony Baxter2001-11-011-6/+6
| | | | | | | | Make clear in the docstring that "std" applies to both size and alignment, not just to alignment. Spotted by Guido. not normally bothering with docstring cleanups, but in this case Tim _did_ note it as a bugfix candidate, so I'll be nice :)
* backport of 2.114:Anthony Baxter2001-11-011-3/+3
| | | | | | SF patch #459385 (Norman Vine): time.timezone fix for Cygwin. (skipped whitespace normalisation section of patch - this is a bugfix, not a beauty contest :)
* backport 2.26Anthony Baxter2001-11-011-1/+2
| | | | | [Bug #433047, reported by Armin Rigo] Remove extra 'i' character in PyArg_ParseTuple() call.
* backport 2.61.Anthony Baxter2001-11-011-1/+1
| | | | Properly use &&. Closes bug #434989.
* backport of fix from 2.7Anthony Baxter2001-11-011-2/+2
| | | | Fix for bug [ #433047 ] missing args to PyArg_ParseTuple
* backport fixes from 2.32 and 2.29:Anthony Baxter2001-11-011-1/+7
| | | | | | | | Change the limit on the input size for b2a_base64 to what will fit in memory, rather than the standard's 57. This fixes SF bug #473009. This closes bug #430849 (internal error produced by binascii.a2b_base64)
* Fix leak in SSLread in nonblocking mode -- from SF bug #472798.Guido van Rossum2001-10-191-0/+1
| | | | | (Not a merge from the code on the trunk -- the trunk has evolved perhaps too much.)
* Backport of Jack's checkin 1.117:Thomas Wouters2001-07-191-1/+2
| | | | File handlers don't work on the mac, so don't pretend they do.
* Backport of AMK's checkin 2.52:Thomas Wouters2001-07-161-1/+3
| | | | | | | [Bug #438050] Include sys/poll.h if it was found by the configure script. The OpenGroup spec says poll.h is the correct header file to use, so that file is preferred.
* Fix SF #441664: Python crash on del of a slice of a mmapThomas Wouters2001-07-161-0/+10
| | | | | | Check for slice/item deletion, which calls slice/item assignment with a NULL value, and raise a TypeError instead of coredumping. Bugreport and suggested fix by Alex Martelli.
* Net result of Tim's checkins 2.28 through 2.31:Thomas Wouters2001-07-121-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | - SF but #417587: compiler warnings compiling 2.1. Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported. - Minor fiddling related to SF patch 416251 2.1c1 mmapmodule: unused vrbl cleanup - Fix the .find() method for memory maps. 1) it didn't obey the "start" parameter (and when it does, we must validate the value) 2) the return value needs to be an absolute index, rather than relative to some arbitrary point in the file (checking CVS, it appears this method never worked; these changes bring it into line with typical .find() behavior) - Fix new compiler warnings. Also boost "start" from (C) int to long and return a (C) long: PyArg_ParseTuple and Py_BuildValue may not let us get at the size_t we really want, but C int is clearly too small for a 64-bit box, and both the start parameter and the return value should work for large mapped files even on 32-bit boxes. The code really needs to be rethought from scratch (not by me, though ...).
* Re-do the broken-nice() patch to break less platforms. Hopefully none :PThomas Wouters2001-07-111-3/+9
| | | | | | | Also note that it isn't just Linux nice() that is broken: at least FreeBSD and BSDI also have this problem. os.nice() should probably just be emulated using getpriority()/setpriority(), if they are available, but that isn't worth putting in 2.1.1.
* Patch #439995 (slightly modified from the uploaded version):Thomas Wouters2001-07-111-1/+18
| | | | | | | Work around Linux's nonstandard nice() systemcall, which does not return the new priority. This closes SF bug #439990.
* Backport of Guido's checkins of acconfig.h (1.50), configure.in (1.224) andThomas Wouters2001-07-111-0/+4
| | | | | | | | | | | readline.c (2.36), and re-generated config.h.in and configure: SF Patch #432457 by Jason Tishler: support for readline 4.2. This patch allows the readline module to build cleanly with GNU readline 4.2 without breaking the build for earlier GNU readline versions. The configure script checks for the presence of rl_completion_matches in libreadline.
* Set PYTHONHOMEHELP to 2.1Thomas Wouters2001-06-271-1/+1
|
* Backport Fred's checkin 2.51:Thomas Wouters2001-06-271-3/+3
| | | | Add :method info to the PyArg_ParseTuple() format strings for poll objects.
* Backport of Tim's checkin 2.111:Thomas Wouters2001-06-271-3/+5
| | | | SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.
* Backport of Tim's checkin 2.190:Thomas Wouters2001-06-271-10/+8
| | | | SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.
* Fix my own typo: protect the FLUSHO usage with "#ifdef FLUSHO", notFred Drake2001-06-181-1/+1
| | | | "#ifndef FLUSHO".
* Spell "#ifdef" as "#ifdef", not "#endif".Fred Drake2001-06-161-1/+1
|
* Protect several more uses of constants with #ifdefs; these are necessary onThomas Wouters2001-06-151-0/+10
| | | | | (at least) SCO OpenServer 5. Fixes a non-SF-submitted bugreport by Michael Kent.
* Incorporating MAL's bugfix into the 2.1.1 branch:Guido van Rossum2001-06-121-1/+1
| | | | | | | revision 1.53 date: 2001/06/12 16:13:51; author: lemburg; state: Exp; lines: +1 -1 Removed the Python version from the PYTHONHOMEHELP string. It was still set to python2.0 ...
* Protect the use of the VWERASE symbol by an #ifdef, it's apparently missingThomas Wouters2001-06-111-0/+2
| | | | on (some versions of ?) AIX.
* Net result of Tim's checkins to stropmodule.c (2.78, 2.79, 2.80, 2.81),Thomas Wouters2001-05-231-13/+28
| | | | | | | | stringobject.c (2.114, 2.115) and test_strop.py (1.11, 1.12). Fixes 'replace' behaviour on systems on which 'malloc(0)' returns NULL (together with previous checkins) and re-synchs the string-operation code in stringobject.c and stropmodule.c, with the exception of 'replace', which has the old semantics in stropmodule but the new semantics in stringobjects.
* *** empty log message ***Thomas Wouters2001-05-231-26/+33
|
* Backport Fred's checkin 2.29:Thomas Wouters2001-05-231-2/+2
| | | | | | Correct the sense of a couple of conditional compilations -- used #ifndef when #ifdef was needed. This closes (reallu!) SF bug #417418.
* Migrate the last few revisions from the head to the bugfix branch -- theseFred Drake2001-05-111-54/+68
| | | | | have all been portability fixes and improving the consistency of how file descriptors and file objects are handled.
* Three uses of makesockaddr() used sockaddr buffers that had not be cleared;Fred Drake2001-05-091-0/+3
| | | | | | | | | this could cause invalid paths to be returned for AF_UNIX sockets on some platforms (including FreeBSD 4.2-RELEASE), appearantly because there is no assurance that the address will be nul-terminated when filled in by the kernel. This closes SF bug #416573.
* Export three optimization (fast locals) flagsJeremy Hylton2001-04-161-0/+4
|
* Reverting Moshe's EGD patch *and* Martin's patch to make it work withGuido van Rossum2001-04-161-34/+0
| | | | | | | | | | OpenSSL versions beore 0.9.5. This just is too experimental to be worth it, especially since the user would have to do some severe hacking of the Modules/Setup file to even enable the EGD code, and without the EGD code it would always spit out a warning on some systems -- even when socket.ssl() is not used. Fixing that properly is not my job; the EGD patch is clearly not so important that it should hold up the 2.1 release.
* SRE: made "copyright" string static, to avoid potential linkingFredrik Lundh2001-04-151-1/+8
| | | | conflicts.
* Make some private symbols static.Guido van Rossum2001-04-141-1/+1
|
* Clean up the unsightly mess around the readline header files. We nowGuido van Rossum2001-04-131-24/+1
| | | | | | | | | | | | | | | | | | | | | | | always: - #undef HAVE_CONFIG_H (because otherwise chardefs.h tries to include strings.h) - #include readline.h and history.h and we never declare any readline function prototypes ourselves. This makes it compile with readline 4.2, albeit with a few warnings. Some of the remaining warnings are about completion_matches(), which is renamed to rl_completion_matches(). I've tested it with various other versions, from 2.0 up, and they all seem to work (some with warnings) -- but only on Red Hat Linux 6.2. Fixing the warnings for readline 4.2 would break compatibility with 3.0 (and maybe even earlier versions), and readline doesn't seem to have a way to test for its version at compile time, so I'd rather leave the warnings in than break compilation with older versions.
* I am TENTATIVELY checking in Martin von Loewis's patch for the SSLGuido van Rossum2001-04-131-0/+7
| | | | | | | | | | | | problem reported by Neil Schemenauer on python-dev on 4/12/01, wth subject "Problem with SSL and socketmodule on Debian Potato?". It's tentative because Moshe objected, but Martin rebutted, and Moshe seems unavailable for comments. (Note that with OpenSSL 0.9.6a, I get a lot of compilation warnings for socketmodule.c -- I'm assuming I can safely ignore these until 2.1 is released.)
* cleanup_helper(): Make sure we invalidate all reference objectsFred Drake2001-04-131-6/+41
| | | | | | | | | | | before calling any callbacks. This is important since the callback objects only look at themselves to determine that they are invalide. This change avoids a segfault when callbacks use a different reference to an object in the process of being deallocated. This fixes SF bug #415660.
* Slight adaptation of Michael Hudson's patch to test PyDict_Next()Guido van Rossum2001-04-131-0/+62
| | | | | | | | | | | | (with modification of existing dict elements!). This is part of SF patch #409864: lazy fix for Pings bizarre scoping crash. The adaptation I made to Michael's patch was to change the error handling to avoid masking other errors (moving the specific error message to inside test_dict_inner()), and to insert a test for dict==NULL at the start.
* Unixware 7 support by Billy G. Allie (SF patch 413011)Guido van Rossum2001-04-112-0/+34
|
* Updated version of RISCOS support. SF patch 411213 by Dietmar SchwertbergerGuido van Rossum2001-04-102-10/+22
|
* Include py_curses.h *after* defining _XOPEN_SOURCE_EXTENDED.Guido van Rossum2001-04-101-2/+3
| | | | | | Michael Hudson suggested this fox for the Tru64 problem (SF bug 232597). It looks reasonable, it works on Tru64, and it doesn't beak anything on Linux, so I say go for it.