2113 Commits

Author SHA1 Message Date
Martin v. Löwis
bde3873858 Backport 2.3 FreeBSD recursion_limit settings. Fixes #553736. 2003-06-14 15:05:13 +00:00
Fred Drake
1c7f511d4a The errno module needs to be statically linked, since it is now needed during
the extension building phase.
2002-08-08 19:56:28 +00:00
Jeremy Hylton
13aa64bfae Backport variety of SSL fixes accumulated on the trunk. 2002-07-02 19:05:33 +00:00
Guido van Rossum
62fbb233a2 Corect speling and add \n\ to line ends in new docstring for access(). 2002-06-18 16:26:43 +00:00
Fred Drake
9c6891b93d Clarified documentation for os.access().
Based on patch contributed by Sean Reifschneider.
Closes SF patch #570618.
2002-06-18 16:17:32 +00:00
Anthony Baxter
830fdc4b43 Backport of bug
457466: "popenx() argument mangling hangs python" [Win9x only]."

Can't test this myself, but MarkH sez it's ok.
2002-04-08 04:42:09 +00:00
Martin v. Löwis
a41b85d050 backport gvanrossum's checkin of
revision 2.40 of mpzmodule.c

SF patch 517245 by Marc Recht.

Support GMP version >= 2.
2002-04-01 16:45:51 +00:00
Guido van Rossum
c44d823daa Sort-of backport to 2.1.3 (if we ever release it) of the following.
(The fix looks different, but does the same thing to the 2.1 GC code
that Neil's patch does to the 2.2 GC code.)

This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction).

The fix makes it possible to call PyObject_GC_UnTrack() more than once
on the same object, and then move the PyObject_GC_UnTrack() call to
*before* the trashcan code is invoked.

BUGFIX CANDIDATE!
2002-03-28 20:41:02 +00:00
Guido van Rossum
dc2e5cebdf In case there ever will be a 2.1.3, this fixes SF bug #514928 (Bastian
Kleineidam): curses error in w.border().

For some reason, in 2.1.2 and before, PyCursesWindow_Border is
declared as METH_VARARGS but calls PyArg_Parse(), which is wrong.

(This is not relevant for 2.2, which does this completely different
and makes all functions METH_VARARGS.)
2002-02-08 21:32:41 +00:00
Anthony Baxter
e40ae1f762 backport of 1.196: socket.recv(-1) fixup. 2001-12-23 01:44:49 +00:00
Anthony Baxter
470742af30 one more for the night.
backport of 2.26:
  Make the gc.collect() function respect the collection lock.  This fixes
  SF bug 476129: "gc.collect sometimes hangs".
2001-11-01 15:34:20 +00:00
Anthony Baxter
0af83c053c backport of (merged) 1.43 and 1.44
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.)
2001-11-01 14:55:03 +00:00
Anthony Baxter
8f113e9150 backport of 2.58:
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.
2001-11-01 14:43:51 +00:00
Anthony Baxter
3688899d68 backport 2.56 from uncle tim:
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.
2001-11-01 14:39:41 +00:00
Anthony Baxter
57ff377a39 backport barry's 2.54:
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.
2001-11-01 14:37:48 +00:00
Anthony Baxter
df71fc0125 wrap SSL_read and SSL_write in Py_{BEGIN,END}_ALLOW_THREADS.
other half of backport of guido's 1.188
2001-11-01 14:25:38 +00:00
Anthony Baxter
aadae7dae9 partial backport of guido's 1.188.
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().
2001-11-01 14:14:26 +00:00
Anthony Baxter
7aff5e470a backport of MvL's 1.180
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...
2001-11-01 14:05:52 +00:00
Anthony Baxter
3357529c34 backport tim's 1.191:
PySocketSock_connect_ex():  On Windows, return the correct Windows exit
  code.  The patch is from Jeremy, and allows test_asynchat to run again.
2001-11-01 14:00:11 +00:00
Anthony Baxter
5d0fdbc690 backport (partially) jeremy's 1.178
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.
2001-11-01 13:58:16 +00:00
Anthony Baxter
22a2ce8d40 backport tim's 2.44
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 :)
2001-11-01 13:34:10 +00:00
Anthony Baxter
39103a210c backport of 2.114:
SF patch #459385 (Norman Vine): time.timezone fix for Cygwin.
(skipped whitespace normalisation section of patch - this is a bugfix,
not a beauty contest :)
2001-11-01 13:14:43 +00:00
Anthony Baxter
c00f9343c2 backport 2.26
[Bug #433047, reported by Armin Rigo] Remove extra 'i' character in
      PyArg_ParseTuple() call.
2001-11-01 12:52:27 +00:00
Anthony Baxter
449ff25782 backport 2.61.
Properly use &&. Closes bug #434989.
2001-11-01 12:48:28 +00:00
Anthony Baxter
2c0d76e641 backport of fix from 2.7
Fix for bug [ #433047 ] missing args to PyArg_ParseTuple
2001-11-01 11:38:44 +00:00