Commit Graph

3063 Commits

Author SHA1 Message Date
Neal Norwitz ddb4f62650 SF patch #667548, Add some audio constants by Michael Pruett
Also remove a few unused variables.  Built on IRIX 6.5.
2003-03-30 21:49:18 +00:00
Neal Norwitz 1ac3e39913 Get build working with pre-C99 compilers 2003-03-30 20:51:29 +00:00
Martin v. Löwis f26d63b3e1 Patch #650412: Check whether the address of flock and getpagesize
can be taken, and use _SC_PAGE_SIZE if getpagesize is not available.
2003-03-30 17:23:49 +00:00
Martin v. Löwis 852ba7eb2a Patch #672053: Return a result from Py_Main, instead of exiting. 2003-03-30 17:09:58 +00:00
Martin v. Löwis e98922fb80 Patch #695250: Suppress COPYRIGHT if site.py is not read. Fixes #672614.
Will backport to 2.2.
2003-03-30 17:00:39 +00:00
Martin v. Löwis a965649386 Wrap thread stuff in WITH_THREAD. Fixes #704641. 2003-03-30 08:44:58 +00:00
Martin v. Löwis 52ae6f67d9 Fake bool API for Python 2.2. 2003-03-30 08:26:04 +00:00
Martin v. Löwis b9a0f91218 Rename LONG_LONG to PY_LONG_LONG. Fixes #710285. 2003-03-29 10:06:18 +00:00
Gregory P. Smith 6e5c1792d9 4.1.5 2003-03-27 17:25:10 +00:00
Gregory P. Smith fe11d3e0d4 Adds support for the DBEnv->set_timeout() method. 2003-03-27 17:23:29 +00:00
Skip Montanaro a16b21fb0a add comment about 2.2 compatibility
dump empty TODO comment
2003-03-23 14:32:54 +00:00
Neal Norwitz 29fd2baf82 Make private function and data static. 2003-03-23 13:21:03 +00:00
Neal Norwitz 2deaddb0d6 Get rid of warning on IRIX 2003-03-21 03:08:31 +00:00
Neal Norwitz b59798b157 Add support for os.openpty() on AIX which uses /dev/ptc instead of /dev/ptmx. 2003-03-21 01:43:31 +00:00
Tim Peters ef4b7ed42b Squash compiler wng about signed-vs-unsigned mismatch. 2003-03-21 01:35:28 +00:00
Skip Montanaro 2497982bbb add _csv build line 2003-03-20 23:37:24 +00:00
Skip Montanaro b4a0417e91 new CSV file processing module - see PEP 305 2003-03-20 23:29:12 +00:00
Tim Peters 9905b943f7 New private API functions _PyFloat_{Pack,Unpack}(4,8}. This is a
refactoring to get all the duplicates of this delicate code out of the
cPickle and struct modules.
2003-03-20 20:53:32 +00:00
Tim Peters d50ade68ec SF bug 705836: struct.pack of floats in non-native endian order
pack_float, pack_double, save_float:  All the routines for creating
IEEE-format packed representations of floats and doubles simply ignored
that rounding can (in rare cases) propagate out of a long string of
1 bits.  At worst, the end-off carry can (by mistake) interfere with
the exponent value, and then unpacking yields a result wrong by a factor
of 2.  In less severe cases, it can end up losing more low-order bits
than intended, or fail to catch overflow *caused* by rounding.

Bugfix candidate, but I already backported this to 2.2.

In 2.3, this code remains in severe need of refactoring.
2003-03-20 18:32:13 +00:00
Raymond Hettinger 1da1dbf458 Renamed PyObject_GenericGetIter to PyObject_SelfIter
to more accurately describe what the function does.

Suggested by Thomas Wouters.
2003-03-17 19:46:11 +00:00
Jack Jansen 7b59b42a38 Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
for specific platforms. Use this to add plat-mac and
plat-mac/lib-scriptpackages on MacOSX. Also tested for not having adverse
effects on Linux, and I think this code isn't used on Windows anyway.

Fixes #661521.
2003-03-17 15:44:10 +00:00
Thomas Wouters 9e1c192525 binascii_a2b_base64: Properly return an empty string if the input was all
invalid, rather than returning a string of random garbage of the
    estimated result length. Closes SF patch #703471 by Hye-Shik Chang.

Will backport to 2.2-maint (consider it done.)
2003-03-17 11:24:29 +00:00
Raymond Hettinger e0cce8f8f0 Created PyObject_GenericGetIter().
Factors out the common case of returning self.
2003-03-17 08:35:49 +00:00
Raymond Hettinger 0153826964 Created PyObject_GenericGetIter().
Factors out the common case of returning self.
2003-03-17 08:24:35 +00:00
Guido van Rossum d11b62edd0 - New function time.tzset() provides access to the C library tzet()
function, if supported.  (SF patch #675422, by Stuart Bishop.)
2003-03-14 21:51:36 +00:00
Michael W. Hudson 43ed43bfc1 Take out my (long since disabled) POSIX signal mask handling code.
I'm not going to have the time or energy to get this working x-platform
-- anyone who does is welcome to the code!
2003-03-13 13:56:53 +00:00
Greg Ward 5c49ef2116 Open with O_NONBLOCK to avoid hanging on open(). 2003-03-11 16:53:13 +00:00
Greg Ward 0b6dfb808c <sys/soundcard.h> seems to exist on both Linux and FreeBSD, so include
it instead of the OS-specific <linux/soundcard.h> or <machine/soundcard.h>.

Mixers devices have an ioctl-only interface, no read/write -- so the
flags passed to open() don't really matter.  Thus, drop the 'mode'
parameter to openmixer() (ie. second arg to newossmixerobject()) and
always open mixers with O_RDWR.
2003-03-10 03:17:06 +00:00
Jack Jansen fbd861bbd3 An #endif was missing in Just's patch. Added. 2003-03-05 16:00:15 +00:00
Just van Rossum 2ac79ef9e3 removing one Mac hack and add another:
- The applet logic has been replaced to bundlebuilder's bootstrap script
- Due to Apple being extremely string about argv[0], we need a way to
  specify the actual executable name for use with sys.executable. See
  the comment embedded in the code.
2003-03-05 15:46:54 +00:00
Martin v. Löwis 73d538b9c6 Always initialize Py_FileSystemDefaultEncoding on Unix in Py_Initialize,
and not as a side effect of setlocale. Expose it as sys.getfilesystemencoding.
Adjust test case.
2003-03-05 15:13:47 +00:00
Martin v. Löwis 7a924e6eb2 Patch #696645: Remove VMS code with uncertain authorship. 2003-03-05 14:15:21 +00:00
Just van Rossum 6a42183967 os.listdir(): Fall back to the original byte string if conversion to unicode
fails, as discussed in patch #683592.
2003-03-04 19:30:44 +00:00
Neal Norwitz 12e2217501 Fix SF #692416, don't crash interpreter for _tkinter.deletefilehandler
in addition to createfilehandler and creaetetimerhandler.
2003-03-03 21:16:39 +00:00
Just van Rossum 2fe07fda2d plugged leak noted by nnorwitz: the 'et' format returns allocated memory 2003-03-03 19:07:13 +00:00
Just van Rossum 96b1c903f5 Patch #683592 revisited, after discussions with MvL:
- Implement the behavior as specified in PEP 277, meaning os.listdir()
  will only return unicode strings if it is _called_ with a unicode
  argument.
- And then return only unicode, don't attempt to convert to ASCII.
- Don't switch on Py_FileSystemDefaultEncoding, but simply use the
  default encoding if Py_FileSystemDefaultEncoding is NULL. This means
  os.listdir() can now raise UnicodeDecodeError if the default encoding
  can't represent the directory entry. (This seems better than silcencing
  the error and fall back to a byte string.)
- Attempted to decribe the above in Doc/lib/libos.tex.
- Reworded the Misc/NEWS items to reflect the current situation.

This checkin also fixes bug #696261, which was due to os.listdir() not
using Py_FileSystemDefaultEncoding, like all file system calls are
supposed to.
2003-03-03 17:32:15 +00:00
Michael W. Hudson f008998668 Fix bug
[ 555817 ] Flawed fcntl.ioctl implementation.

with my patch that allows for an array to be mutated when passed
as the buffer argument to ioctl() (details complicated by
backwards compatibility considerations -- read the docs!).
2003-03-03 12:29:42 +00:00
Martin v. Löwis 7f13489bdf Don't crash on _tkinter.createfilehandler in non-threaded Tcl;
disable this function in threaded Tcl. Likewise for creaetetimerhandler.
Fixes #692416.
2003-03-03 10:40:01 +00:00
Neal Norwitz d9efdc5b5a get_completer() takes no args 2003-03-01 15:19:41 +00:00
Raymond Hettinger d1a283be26 Several of the tools can make direct calls the inner iterators. 2003-03-01 01:48:24 +00:00
Neal Norwitz 3f5fcc8acc Fix SF bug #690012 (among others), iconv_codec stops build
Change setup.py to catch all exceptions.
  - Rename module if the exception was an ImportError
  - Only warn if the exception was any other error

Revert _iconv_codec to raising a RuntimeError.
2003-02-28 17:21:39 +00:00
Just van Rossum f4ecc751b1 use proper constant instead of comment (noted by nnorwitz) 2003-02-28 08:54:01 +00:00
Neal Norwitz e9c571f968 Fix SF bug #694816, remove comparison of unsigned value < 0 2003-02-28 03:14:37 +00:00
Just van Rossum 46c9784f68 Patch #683592: unicode support for os.listdir()
os.listdir() may now return unicode strings on platforms that set
Py_FileSystemDefaultEncoding.
2003-02-25 21:42:15 +00:00
Walter Dörwald dd8766a65b Change the test encoding from "ISO8859-1" to "ISO-8859-1"
(see SF bug #690309) and raise ImportErrors instead of
RuntimeErrors, so building Python continues even
if importing iconv_codecs fails.

This is a temporary fix until we get proper configure
support for "broken" iconv implementations.
2003-02-24 20:17:32 +00:00
Neal Norwitz 937ca98e34 SF patch #687598, array.append is sloooow
This improves speed by about 5.6% for me.
2003-02-24 02:08:42 +00:00
Raymond Hettinger 61fe64d5de User requested changes to the itertools module.
Subsumed times() into repeat().
Added cycle() and chain().
2003-02-23 04:40:07 +00:00
Walter Dörwald e9b851a5e9 Use 'ISO8859-1' instead of 'ASCII' when testing whether byteswapping
is required for the chosen internal encoding in the init function,
as this seems to have a better chance of working under Irix and
Solaris.

Also change the test character from '\x01' to '0'.

This might fix SF bug #690309.
2003-02-21 18:18:49 +00:00
Neal Norwitz c355f0cae9 flex_complete looks like a private (but callback) function, so make it static 2003-02-21 00:30:18 +00:00
Guido van Rossum b76bdf8ef7 The connect timeout code wasn't working on Windows.
Rather than trying to second-guess the various error returns
of a second connect(), use select() to determine whether the
socket becomes writable (which means connected).
2003-02-19 17:50:16 +00:00