Commit Graph

26693 Commits

Author SHA1 Message Date
Neal Norwitz 0135b65c01 Add new CSV module to doc dependancies 2003-03-21 00:28:30 +00:00
Skip Montanaro a0b3e6d191 add several people involved with PEP 305 and the csv package 2003-03-20 23:41:03 +00:00
Skip Montanaro 2497982bbb add _csv build line 2003-03-20 23:37:24 +00:00
Skip Montanaro 64a839eb71 announce csv package 2003-03-20 23:36:55 +00:00
Skip Montanaro 0ed2ae46d5 include the csv package during installation 2003-03-20 23:35:38 +00:00
Skip Montanaro 5fbf8362a3 include csv doc section - Fred, you may want to change the location 2003-03-20 23:35:00 +00:00
Skip Montanaro ba9e978180 build _csv extension module 2003-03-20 23:34:22 +00:00
Skip Montanaro f823f11c36 forgot Cliff's sniffer 2003-03-20 23:31:24 +00:00
Skip Montanaro b4a0417e91 new CSV file processing module - see PEP 305 2003-03-20 23:29:12 +00:00
Fred Drake 4cee220ff3 - added example of using a comparison function with list.sort(), and
explained the construction of a [(key, value), ...] list as an
  alternative
- note that support for cmpfunc=None was added in 2.3
2003-03-20 22:17:59 +00:00
Just van Rossum a87e44792c set $PYTHONHOME in the bootstrap script, for no good reason really,
except to avoid getpath.c giving unsollicited advice on stderr.
2003-03-20 21:37:05 +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
Fred Drake 62364ffb80 - apply SF patch #700798: fixes and cleanups for descriptor info
- use a TeX "tie" to prevent word-wrapping in "section x.y"-like text
2003-03-20 18:17:16 +00:00
Skip Montanaro 2a403e8a7e add descriptions of {get,set}defaulttimeout. 2003-03-20 17:58:12 +00:00
Fred Drake 5c7b2487cd - explain what a UNC path is in the makedirs() description, since
they're actually mentioned there
- remove some extraneous paragraph separations
- \versionadded --> \versionchanged in one place
2003-03-20 17:39:38 +00:00
Neal Norwitz 26f42f6821 Skip the ioctl test if we can't open /dev/tty. This happens on
Solaris (and probably other Unixes) when run without a terminal
(eg, from cron or at).
2003-03-20 04:33:16 +00:00
Jack Jansen fe94e97e48 GetCreatorAndType and SetCreatorAndType have been undeprecated. Spotted by
Just.
2003-03-19 22:51:42 +00:00
Gustavo Niemeyer 5ddd4c3f77 Fixed SF bug #663074. The codec system was using global static
variables to store internal data. As a result, any atempts to use the
unicode system with multiple active interpreters, or successive
interpreter executions, would fail.

Now that information is stored into members of the PyInterpreterState
structure.
2003-03-19 00:35:36 +00:00
Just van Rossum 821a0fc140 replace obsolete 'exceptions' implicit by 'warnings' 2003-03-18 18:48:17 +00:00
Neal Norwitz 6e54f579a6 Fix SF bug #697556, test_posix fails: getlogin
getlogin() can fail for too many reasons, so remove the test
2003-03-18 13:30:14 +00:00
Barry Warsaw 6613fb8412 _encode_chunks(): Throw out empty chunks. 2003-03-17 20:36:20 +00:00
Barry Warsaw 240754933e test_long_lines_with_different_header(): Another test from Jason. 2003-03-17 20:35:14 +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
Barry Warsaw ab75840cd0 test_getaddresses_nasty(): A test for mimelib SF bug # 697641. 2003-03-17 18:36:37 +00:00
Barry Warsaw fa348c876f getaddrlist(): Make sure this consumes all the data, and if there is
no address there (perhaps because of invalid characters, it appends
('', '') to the result set.

Closes mimelib SF bug # 697641.
2003-03-17 18:35:42 +00:00
Martin v. Löwis c2ca32d9ae Test for UnicodeError instead of ImportError to determine whether
the test file name can be encoded.
2003-03-17 18:30:15 +00:00
Jack Jansen 54e7d2c029 Get rid of Mac.pth: plat-mac is now added through the normal mechanism. 2003-03-17 15:45:38 +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 dcf6d2c97d Add Hye-Shik Chang for SF patch/bugreport #703471. 2003-03-17 11:34:01 +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
Jack Jansen 450bd873ac Capturing the exit status for the build process didn't work. Using
popen2.Popen4() makes it work. Fixes #702180.
2003-03-17 10:54:41 +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
Jack Jansen 08801db123 The MacPython introductory help is now called MacPython Help, and the
optional full documentation Python Documentation.
2003-03-16 22:09:22 +00:00
Jack Jansen f3ef038808 - Don't ask for bring-to-front when quitting through an appleevent.
- Changed checkbox labels as suggested by Kevin Ollivier.
2003-03-16 21:04:50 +00:00
Jack Jansen 3fd401321d Lots of textual changes suggested by Matthew Moelter. 2003-03-16 20:41:58 +00:00
Raymond Hettinger 7dc52212aa Eliminate data dependency in predict macro.
Added two predictions:
  GET_ITER --> FOR_ITER
  FOR_ITER --> STORE_FAST or UNPACK_SEQUENCE

Improves timings on pybench and timeit.py. Pystone results are neutral.
2003-03-16 20:14:44 +00:00
Raymond Hettinger ac2072920d Fix comment and whitespace. 2003-03-16 15:41:11 +00:00
Raymond Hettinger f606f87b31 Introduced macros for a simple opcode prediction protocol.
Applied to common cases:
    COMPARE_OP is often followed by a JUMP_IF.
    JUMP_IF is usually followed by POP_TOP.

Shows improved timings on PyStone, PyBench, and specific tests
using timeit.py:
    python timeit.py -s "x=1" "if x==1: pass"
    python timeit.py -s "x=1" "if x==2: pass"
    python timeit.py -s "x=1" "if x: pass"
    python timeit.py -s "x=100" "while x!=1: x-=1"

Potential future candidates:
    GET_ITER predicts FOR_ITER
    FOR_ITER predicts STORE_FAST or UNPACK_SEQUENCE

Also, applied missing goto fast_next_opcode to DUP_TOPX.
2003-03-16 03:11:04 +00:00
Guido van Rossum 0070f007f4 Change the default number of repetitions to 3, both in the Timer class
(from 10) and in main() (from 1).

Add a -v option that shows the raw times.  Repeating it cranks up the
display precision.

Always use the "best of N" form of output.
2003-03-15 12:25:00 +00:00
Guido van Rossum d2b738ee7d If time.tzset doesn't exist, don't test it. 2003-03-15 12:01:52 +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
Guido van Rossum 538f1d842c Implement some recommendations from Raymond H:
- Make all local variables in the template start with an underscore,
  to prevent name conflicts with the timed code.

- Added a method to print a traceback that shows source lines from the
  expanded template.

- Use that method in main().
2003-03-14 17:21:00 +00:00
Fred Drake 0834d77bc4 Accept commas in unquoted attribute values.
This closes SF patch #669683.
2003-03-14 16:21:57 +00:00
Raymond Hettinger 080cb3268f SF patch #701907: More use of fast_next_opcode
My previous patches should have used fast_next_opcode
in a few places instead of continue.

Also, applied one PyInt_AS_LONG macro in a place where
the type had already been checked.
2003-03-14 01:37:42 +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
Kurt B. Kaiser 94afd3095e Move setting of ioready 'wait' earlier in call chain, to
rpc.SocketIO.main() and asyncreturn().  Improve comment.
2003-03-12 20:52:00 +00:00
Jack Jansen b1fbf855a3 Filter out the depracation warning for macfs. 2003-03-12 13:47:39 +00:00
Raymond Hettinger 60de2e837f SF bug #699237: Tutorial uses omitted slice indices before explaining them
Moved up the explanation of slice default arguments.
2003-03-12 04:46:52 +00:00