Commit Graph

3340 Commits

Author SHA1 Message Date
Andrew MacIntyre d12dfbbcd9 OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation that
the socket name must start with /socket32/.  Unlike Unix systems, this
file never exists in the file system.
2004-04-04 07:13:49 +00:00
Andrew MacIntyre 69e18c9344 OS/2 has support for spawnvp() and spawnvpe() in the C libraries supplied
with major C compilers (VACPP, EMX+gcc and [Open]Watcom).

Also tidy up the export of spawn*() symbols in the os module to match what
is found/implemented.
2004-04-04 07:11:43 +00:00
Andrew MacIntyre da4d6cb573 OS/2 VACPP build updates/fixes 2004-03-29 11:53:38 +00:00
Nicholas Bastin 2786d90617 A few more PyThreadState_Get to PyThreadState_GET conversions 2004-03-25 02:16:23 +00:00
Nicholas Bastin e5662aedef Changed random calls to PyThreadState_Get() to use the macro 2004-03-24 22:22:12 +00:00
Brett Cannon 06c34798df Make socket.sslerror a subclass of socket.error .
Added socket.error to the socket module's C API.
2004-03-23 23:16:54 +00:00
Hye-Shik Chang 77d9a3effa Patch #871657: Set EDOM for `nan' return values on FreeBSD and OpenBSD.
This fixes a problem that math.sqrt(-1) doesn't raise math.error.
2004-03-22 08:43:55 +00:00
Nicholas Bastin e62c5c88f1 Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Fixes SF Bug #850981
2004-03-21 23:45:42 +00:00
Tim Peters 3f60629242 SF bug 847019 datetime.datetime initialization needs more strict checking
It's possible to create insane datetime objects by using the constructor
"backdoor" inserted for fast unpickling.  Doing extensive range checking
would eliminate the backdoor's purpose (speed), but at least a little
checking can stop honest mistakes.

Bugfix candidate.
2004-03-21 23:38:41 +00:00
Hye-Shik Chang c3a87b8dbb Bug #920575: Add a workaround for GNU libc nl_langinfo()'s returning NULL.
(Reported by Matthias Klose)
2004-03-21 19:34:30 +00:00
Raymond Hettinger 1e5809ff02 Improve deque iteration.
* The default __reversed__ performed badly, so reintroduced a custom
  reverse iterator.
* Added length transparency to improve speed with map(), list(), etc.
2004-03-18 11:04:57 +00:00
Raymond Hettinger 0faa1ca51d Speedup the inner loops for dropwhile(), islice(), ifilter(), and
ifilterfalse().
2004-03-17 04:27:44 +00:00
Gregory P. Smith 0c65771f92 fixes SF bug 914019 - DB.has_key was not honoring its txn argument 2004-03-16 06:56:58 +00:00
Raymond Hettinger 49f9bd15ff SF feature request #686323: Minor array module enhancements
array.extend() now accepts iterable arguments implements as a series
of appends.  Besides being a user convenience and matching the behavior
for lists, this the saves memory and cycles that would be used to
create a temporary array object.
2004-03-14 05:43:59 +00:00
Raymond Hettinger 6e2ee866fa Update the array overallocation scheme to match the approach used for
lists.  Speeds append() operations and reduces memory requirements
(because of more conservative overallocation).

Paves the way for the feature request for array.extend() to support
arbitrary iterable arguments.
2004-03-14 04:37:50 +00:00
Raymond Hettinger 3aa82c07f7 SF bug #910986: copy.copy fails for array.array
Added support for the copy module.
2004-03-13 18:18:51 +00:00
Raymond Hettinger 6ec099658a SF patch #907403: Improvements to cStringIO.writelines()
The writelines() method now accepts any iterable argument and writes
the lines one at a time rather than using ''.join(lines) followed by
a single write.  Results in considerable memory savings and makes
the method suitable for use with generator expressions.
2004-03-08 18:17:31 +00:00
Raymond Hettinger 6c79a518e7 Special case endpoint access for speed. 2004-03-04 08:00:54 +00:00
Brett Cannon d1080a3418 Have strftime() check its time tuple argument to make sure the tuple's values
are within proper boundaries as specified in the docs.

This can break possible code (datetime module needed changing, for instance)
that uses 0 for values that need to be greater 1 or greater (month, day, and
day of year).

Fixes bug #897625.
2004-03-02 04:38:10 +00:00
Raymond Hettinger 0a4977c2f3 Replace left(), right(), and __reversed__() with the more general purpose
__getitem__() and __setitem__().

Simplifies the API, reduces the code size, adds flexibility, and makes
deques work with bisect.bisect(), random.shuffle(), and random.sample().
2004-03-01 23:16:22 +00:00
Skip Montanaro 786ea6bc23 Add pystack definition to Misc/gdbinit with some explanation of its behavior
and add flag comments to ceval.c and main.c alerting people to the coupling
between pystack and the layout of those files.
2004-03-01 15:44:05 +00:00
Neal Norwitz 87f10137bf Make deque_type static so namespace is not polluted. 2004-02-29 15:40:53 +00:00
Raymond Hettinger 738ec90ca1 Improvements to collections.deque():
* Add doctests for the examples in the library reference.
* Add two methods, left() and right(), modeled after deques in C++ STL.
* Apply the new method to asynchat.py.
* Add comparison operators to make deques more substitutable for lists.
* Replace the LookupErrors with IndexErrors to more closely match lists.
2004-02-29 02:15:56 +00:00
Neal Norwitz a9208f1f99 Get rid of unused variable 2004-02-28 15:56:27 +00:00
Raymond Hettinger bc72c5ae8b Speed-up the joiner call by avoiding Py_BuildValue(). 2004-02-27 10:30:49 +00:00
Christian Tismer 2460c62152 made cPickle fall back to the copy_reg/reduce protocol,
if a function cannot be stored as global.
This is for compatibility with pickle.py .
2004-02-26 16:21:45 +00:00
Gregory P. Smith a7befda8d8 Fixes SF bug # 778421
* Fixed a bug in the compatibility interface set_location() method
   where it would not properly search to the next nearest key when
   used on BTree databases.  [SF bug id 788421]
 * Fixed a bug in the compatibility interface set_location() method
   where it could crash when looking up keys in a hash or recno
   format database due to an incorrect free().
2004-02-26 10:07:14 +00:00
Neal Norwitz 44dbae8cca Remove gcc warning from using "main". Use METH_NOARGS instead of METH_VARARGS 2004-02-19 02:44:22 +00:00
David Ascher e2b4b32025 Implementation of patch 869468
Allow the user to create Tkinter.Tcl objects which are
just like Tkinter.Tk objects except that they do not
initialize Tk. This is useful in circumstances where the
script is being run on machines that do not have an X
server running -- in those cases, Tk initialization fails,
even if no window is ever created.

Includes documentation change and tests.

Tested on Linux, Solaris and Windows.

Reviewed by Martin von Loewis.
2004-02-18 05:59:53 +00:00
Anthony Baxter 5d7c06720d Make socketmodule compile again on a modern Linux (that supports Bluetooth).
The Bluetooth code was obviously never tested on Linux.
2004-02-16 05:35:28 +00:00
Neal Norwitz 94f1d71d70 Fix docstrings to mention the correct function 2004-02-16 01:26:34 +00:00
Gustavo Niemeyer 601b963be0 - Fixing annoying warnings. 2004-02-14 00:31:13 +00:00
Gustavo Niemeyer a6e436e4b4 - Fixed #853061: allow BZ2Compressor.compress() to receive an empty string
as parameter.
2004-02-14 00:02:45 +00:00
Walter Dörwald 70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Skip Montanaro f3938fd029 need to initialize ob_type slot at run-time, at least on cygwin 2004-02-10 20:27:40 +00:00
Skip Montanaro 7befb9966e remove support for missing ANSI C header files (limits.h, stddef.h, etc). 2004-02-10 16:50:21 +00:00
Raymond Hettinger 5cab2e3a88 Give itertools.repeat() a length method. 2004-02-10 09:25:40 +00:00
Raymond Hettinger ee33b27ef0 Make deque.rotate() smarter. Beef-up related tests. 2004-02-08 04:05:26 +00:00
Raymond Hettinger 5c5eb86347 * Incorporate Skip's suggestions for documentation (explain the word deque
comes from and show the differences from lists).
* Add a rotate() method.
2004-02-07 21:13:00 +00:00
Skip Montanaro db6080507d Remove support for --without-universal-newlines (see PEP 11). 2004-02-07 13:53:46 +00:00
Raymond Hettinger c058fd14a9 * Fix ref counting in extend() and extendleft().
* Let deques support reversed().
2004-02-07 02:45:22 +00:00
Raymond Hettinger 3ba85c2e8a Have deques support high volume loads. 2004-02-06 19:04:56 +00:00
Hye-Shik Chang 96c44658b9 Add FreeBSD support for bluetooth sockets. (SF Patch #888148) 2004-02-02 08:48:45 +00:00
Hye-Shik Chang 81268608bf Add FreeBSD support for bluetooth sockets.
(SF Patch #888148, reviewed by loewis)
2004-02-02 06:05:24 +00:00
Martin v. Löwis 12af0485f8 Patch #874083: Bluetooth support for socket module. 2004-01-31 12:34:17 +00:00
Raymond Hettinger d0814eb7fe Fix spelling. 2004-01-29 07:29:32 +00:00
Raymond Hettinger 756b3f3c15 * Move collections.deque() in from the sandbox
* Add unittests, newsitem, and whatsnew
* Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py
* Docs are forthcoming
2004-01-29 06:37:52 +00:00
Hye-Shik Chang 141d4e5643 Add missed entry for cjkcodecs._iso_2022_kr. 2004-01-28 09:03:28 +00:00
Hye-Shik Chang d210a5bed2 Fix MSVC6 warnings. (spotted by Tim Peters) 2004-01-23 14:36:17 +00:00
Barry Warsaw e1b1c87636 pwd_getpwuid(), pwd_getpwnam(): Patch # 868499, improvement to the error
messages.
2004-01-20 21:07:23 +00:00