Commit Graph

3912 Commits

Author SHA1 Message Date
Georg Brandl 05e89b86d6 Clear errno before calling opendir() and readdir(). 2006-04-11 07:04:06 +00:00
Georg Brandl bbfe4fad36 Bug #1467952: os.listdir() now correctly raises an error if readdir()
fails with an error condition.
2006-04-11 06:47:43 +00:00
Phillip J. Eby 2ba96610bf SF Patch #1463867: Improved generator finalization to allow generators
that are suspended outside of any try/except/finally blocks to be
garbage collected even if they are part of a cycle.  Generators that
suspend inside of an active try/except or try/finally block (including
those created by a ``with`` statement) are still not GC-able if they
are part of a cycle, however.
2006-04-10 17:51:05 +00:00
Neal Norwitz 84a98e07f5 Fix warning about ptsname not being a prototype on Solaris. Is this prototype even necessary anymore? 2006-04-10 07:44:23 +00:00
Neal Norwitz 65c05b20e9 Get rid of warnings about using chars as subscripts
on Alpha (and possibly other platforms) by using Py_CHARMASK().
2006-04-10 02:17:47 +00:00
Neal Norwitz b183a25c29 Fix some warnings on HP-UX when using cc/aCC 2006-04-10 01:03:32 +00:00
Neal Norwitz 4c842a4db0 Fix problem (not checking return result) reported by Coverity 2006-04-09 04:07:39 +00:00
Gregory P. Smith 7f5b6f4b33 Fix bsddb.db.DBError derived exceptions so they can be unpickled.
Also adds some backwards compatibility when compiling _bsddb.c on earlier
python versions (needed for pybsddb).
2006-04-08 07:10:51 +00:00
Martin v. Löwis 5fe60e7a4c Patch #1462080: Conditionalize some NETLINK defines. 2006-04-06 22:29:33 +00:00
Thomas Heller fff61ea025 Expose RTLD_LOCAL and RTLD_GLOBAL always from the _ctypes extension module.
If RTLD_LOCAL is not #defined in any header file (Windows), set it to 0.
If RTLD_GLOBAL is not #defined, set it equal to RTLD_LOCAL.

This should fix ctypes on cygwin.
2006-04-06 15:23:16 +00:00
Thomas Heller 430947ac66 Replace a few more 'char' types with 'signed char', to fix test failures
on platforms (ppc debian) where 'char' is unsigned.
2006-04-06 09:02:58 +00:00
Neal Norwitz b43199822b This change shouldn't have any functional effect. Coverity was
complaining because it seemed like parameters_iter could be NULL.
2006-04-06 08:43:16 +00:00
Neal Norwitz d126200aeb Fix unchecked return result from Coverity. 2006-04-06 08:41:59 +00:00
Neal Norwitz ffb0d90a6e Handle ssize_t 2006-04-06 08:07:25 +00:00
Neal Norwitz 915ae41b3a Handle error conditions from PyString_ConcatAndDel(). 2006-04-06 08:06:52 +00:00
Neal Norwitz b038333d4b Handle ssize_t
No need to INCREF then let PyString_ConcatAndDel() DECREF.  Just
use PyString_Concat().
Handle error condition if we can't concat.
2006-04-06 08:05:53 +00:00
Thomas Heller 3c423a04ba Explicitely use 'signed char', to avoid problems on platforms with unsigned char type. 2006-04-05 20:34:18 +00:00
Thomas Heller 0890de3be0 Explicitely use 'signed char', to avoid problems on platforms with unsigned char type. 2006-04-05 19:51:19 +00:00
Anthony Baxter 8e7b490890 upgrade to final version of pysqlite 2.2.0 2006-04-05 18:25:33 +00:00
Fredrik Lundh 4aaaa49bac docstring tweak 2006-04-04 16:51:13 +00:00
Anthony Baxter 3b8ff31055 SF Bug #1448488 - make collectionsmodule build on Cygwin, using the same
techniques as in Modules/xxsubtype.c
2006-04-04 15:05:23 +00:00
Neal Norwitz c410d6ce28 Fix a couple of memory issues 2006-04-04 07:25:25 +00:00
Anthony Baxter 72289a616c Update to pysqlite 2.2.0 2006-04-04 06:29:05 +00:00
Martin v. Löwis 5fe715f049 Properly support empty woperation in win32_startfile;
correct arguments to ShellExecuteW.
2006-04-03 23:01:24 +00:00
Thomas Heller cdab455f9a Try to fix the build on Mac OS X 10.3. The 'live_support' segment
attribute is not supported in this version.
2006-04-03 20:12:41 +00:00
Matthias Klose 739281148d - add missing chunk for patch #1117961 2006-04-03 16:59:32 +00:00
Matthias Klose 8e39ec78bc - Patch #360466: Replace the MD5 implementation from RSA Data Security Inc
with the implementation from http://sourceforge.net/projects/libmd5-rfc/.
2006-04-03 16:27:50 +00:00
Thomas Heller db5483be64 Try to fix the tests on OpenBSD. Apparently OpenBSD passes
structure parameters differently than other posix-like systems.
2006-04-03 16:19:45 +00:00
Georg Brandl ad89dc8794 Bug #1451503: allow unicode filenames in os.startfile(). 2006-04-03 12:26:26 +00:00
Neal Norwitz 92a6be4318 Whitespace: break long line 2006-04-03 04:46:28 +00:00
Neal Norwitz 95f0e4c401 Make ssize_t clean 2006-04-01 09:08:06 +00:00
Anthony Baxter 07f5b35e19 backport r243 from the pysqlite2 svn repository - lowers the required version
of SQLite3 from 3.2.2 to 3.0.8, by providing an alternative to
sqlite3_transfer_bindings. setup.py also handles the common (in debian
and ubuntu, at least) case of a buggy sqlite3.h SQLITE_VERSION_NUMBER.
2006-04-01 08:36:27 +00:00
Georg Brandl 22a9dc889d Patch #1459631: documnent zlib.Decompress.flush() length parameter. 2006-04-01 07:39:41 +00:00
Georg Brandl dcfdae7d72 Bug #1460564: document that socket.fromfd() duplicates the given
file descriptor.
2006-04-01 07:33:08 +00:00
Anthony Baxter c51ee69b27 merged the sqlite-integration branch.
This is based on pysqlite2.1.3, and provides a DB-API interface in
the standard library. You'll need sqlite 3.2.2 or later to build
this - if you have an earlier version, the C extension module will
not be built.
2006-04-01 00:57:31 +00:00
Thomas Wouters 2a9a6b0e86 In the fdopen(fd, 'a') case on UNIX, don't try to set fd's flags to -1 if
fcntl() and fdopen() both fail. Will backport.
2006-03-31 22:38:19 +00:00
Georg Brandl 644b1e7aac Add guards against fcntl() not being available on Windows. 2006-03-31 20:27:22 +00:00
Georg Brandl 54a188aed8 bug #1461855: make os.fdopen() add the O_APPEND flag if using "a" mode.
glibc, for example, does this already on its own, but it seems that
the solaris libc doesn't. This leads to Python code being able to over-
write file contents even though having specified "a" mode.
2006-03-31 20:00:11 +00:00
Georg Brandl 43f08a85e4 Patch #1380952: fix SSL objects timing out on consecutive read()s 2006-03-31 18:01:16 +00:00
Georg Brandl d37ac69ee5 Remove unnecessary casts from type object initializers. 2006-03-30 11:58:57 +00:00
Thomas Heller 3987df5adf Try to build _ctypes on x86 openbsd. 2006-03-30 11:51:58 +00:00
Tim Peters 62e97f023b In format strings slinging Py_ssize_t, unconditionally
interpolate PY_FORMAT_SIZE_T instead of #if'ing on
MS_WIN64.
2006-03-28 21:44:32 +00:00
Neal Norwitz 7491d2a23a Try to get rid of a Coverity warning by consistently using origpending. 2006-03-28 06:19:28 +00:00
Thomas Wouters 19bf33bc7a Make itertools.tee and its internal teedataobject participate in GC. This
alone does not solve the leak in test_generators, unfortunately, but it is
part of test_generators' problem and it does solve other cycles.
2006-03-27 21:02:13 +00:00
Hye-Shik Chang b9c03e999f Fix reference leaks introduced by the recent incremental codec
changes.
2006-03-27 08:24:54 +00:00
Tim Peters c9d78aa470 Years in the making.
objimpl.h, pymem.h:  Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE}
to PyObject_{Free, FREE} in a release build.  They're aliases for the
system free() now.

_subprocess.c/sp_handle_dealloc():  Since the memory was originally
obtained via PyObject_NEW, it must be released via PyObject_FREE (or
_DEL).

pythonrun.c, tokenizer.c, parsermodule.c:  I lost count of the number of
PyObject vs PyMem mismatches in these -- it's like the specific
function called at each site was picked at random, sometimes even with
memory obtained via PyMem getting released via PyObject.  Changed most
to use PyObject uniformly, since the blobs allocated are predictably
small in most cases, and obmalloc is generally faster than system
mallocs then.

If extension modules in real life prove as sloppy as Python's front
end, we'll have to revert the objimpl.h + pymem.h part of this patch.
Note that no problems will show up in a debug build (all calls still go
thru obmalloc then). Problems will show up only in a release build, most
likely segfaults.
2006-03-26 23:27:58 +00:00
Hye-Shik Chang 04904faac5 Utilize %zd for Py_ssize_t formatting instead of casting to long. 2006-03-26 06:53:37 +00:00
Hye-Shik Chang 9f4b632212 Allow long objects as a position value of error callbacks returned. 2006-03-26 06:21:34 +00:00
Hye-Shik Chang e2ac4abd01 Patch #1443155: Add the incremental codecs support for CJK codecs.
(reviewed by Walter Dörwald)
2006-03-26 02:34:59 +00:00
Neal Norwitz 1818ed705b Try to fix broken compile on openbsd. 2006-03-26 00:29:48 +00:00