0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 11:15:56 +01:00
Commit Graph

23653 Commits

Author SHA1 Message Date
Fred Drake
2d3c03df9a Added references to the email package.
Closes SF bug #586937.
2002-08-06 21:26:01 +00:00
Barry Warsaw
e06741704e Added a test for PyUnicode_Contains() taking into account the width of
Py_UNICODE.
2002-08-06 19:03:56 +00:00
Barry Warsaw
6a043f3fe8 PyUnicode_Contains(): The memcmp() call didn't take into account the
width of Py_UNICODE.  Good catch, MAL.
2002-08-06 19:03:17 +00:00
Skip Montanaro
496e6581e1 get rid of GETNAMEV macro - use GETITEM directly
same idea as getting rid of GETCONST & GETNAME (see patch #506436)
2002-08-06 17:47:40 +00:00
Guido van Rossum
fce538c31e Add a coding cookie, because of the møøse quote. 2002-08-06 17:29:38 +00:00
Guido van Rossum
8cdc03dca5 Update the URL for getting zlib, and update the minimal required
version to 1.1.4 (because of the 1.1.3 security problem).  Also
replace a funny use of line.find() with line.startswith().
2002-08-06 17:28:30 +00:00
Guido van Rossum
0855dd8938 Bump the LOOPS count. 50,000 iterations takes about 5 seconds on my
machine -- that feels just right.
2002-08-06 17:21:20 +00:00
Guido van Rossum
43af5b5852 Add some fine points: METH_KEYWORDS implies METH_VARARGS, and ob_size
is no longer unused in type objects.
2002-08-06 17:18:56 +00:00
Guido van Rossum
8ee5243434 Mark xreadlines deprecated. Don't use f.xreadlines() in test_iter.py. 2002-08-06 17:14:04 +00:00
Guido van Rossum
97c5fccd77 Remove mention of deprecated xreadlines method. 2002-08-06 17:03:25 +00:00
Barry Warsaw
d79f683772 Describe new "str1 in str2" behavior. 2002-08-06 17:01:51 +00:00
Guido van Rossum
0fc01865f3 Document file.next(). Mark xreadlines obsolete (both method and
module).  (One thing remains to be done: the gzip class has an
xreadline method; this ought to be replaced by an iterator as well.)
2002-08-06 17:01:28 +00:00
Barry Warsaw
817918cc3c Committing patch #591250 which provides "str1 in str2" when str1 is a
string of longer than 1 character.
2002-08-06 16:58:21 +00:00
Guido van Rossum
b57089cdf8 Files are now their own iterator. The xreadlines method and module
are obsolete.
2002-08-06 16:20:26 +00:00
Steve Holden
545092b063 Add comment about os.path.walk()'s behavior with symbolic links. 2002-08-06 16:07:07 +00:00
Guido van Rossum
3c668c1256 Add next and __iter__ to the list of file methods that should raise
ValueError when called for a closed file.
2002-08-06 15:58:24 +00:00
Guido van Rossum
7a6e95948c SF patch 580331 by Oren Tirosh: make file objects their own iterator.
For a file f, iter(f) now returns f (unless f is closed), and f.next()
is similar to f.readline() when EOF is not reached; however, f.next()
uses a readahead buffer that messes up the file position, so mixing
f.next() and f.readline() (or other methods) doesn't work right.
Calling f.seek() drops the readahead buffer, but other operations
don't.

The real purpose of this change is to reduce the confusion between
objects and their iterators.  By making a file its own iterator, it's
made clearer that using the iterator modifies the file object's state
(in particular the current position).

A nice side effect is that this speeds up "for line in f:" by not
having to use the xreadlines module.  The f.xreadlines() method is
still supported for backwards compatibility, though it is the same as
iter(f) now.

(I made some cosmetic changes to Oren's code, and added a test for
"file closed" to file_iternext() and file_iter().)
2002-08-06 15:55:28 +00:00
Jack Jansen
3a451b1d19 In the altbininstall target, which is the first subtarget for "make install",
if we are running in an OSX framework enabled build directory, test that
the framework infrastructure exists. This catches the very common
error of doing "make install" in stead of "make frameworkinstall".
2002-08-06 13:40:31 +00:00
Jack Jansen
9c5b61b21b Patch #567296 by Pim Buurman, slightly modified by me so it can be disabled
at compile time: use PBGetCatInfoSync() to get FInfo data in stead of
GetFInfo. The latter doesn't work for folders. The former does, at
least on OSX, and insofar the info makes sense for a folder.
2002-08-06 12:59:44 +00:00
Jack Jansen
137d8c5667 Wrapper around _IBCarbon. 2002-08-06 09:32:57 +00:00
Andrew M. Kuchling
950725f755 Mention list.sort()
Document heapq module
Add PEP263 section (not sure I really understand the PEP's effect on 8-bit
   strings, though -- will have to experiment with it)
2002-08-06 01:40:48 +00:00
Neal Norwitz
e72a9a13a1 SF patch #591305 Documentation err in bytecode defs 2002-08-05 23:33:54 +00:00
Fred Drake
63c4220f61 We only need to check for StopIteration here. 2002-08-05 22:16:40 +00:00
Jack Jansen
94caa78ebf Patch by Ronald Oussoren: if there's a .lproj in the extras list also
check whether it contains a .nib, and do the Cocoa song and dance if
it does.
2002-08-05 22:06:29 +00:00
Jack Jansen
0a9d7559e8 In copy() don't try to obtain an FSSpec until we know the destination
exists. Partial fix for #585923.
2002-08-05 21:53:57 +00:00
Jack Jansen
11845e00b2 Be a lot less verbose by default. 2002-08-05 21:15:22 +00:00
Jack Jansen
20417bcd18 Better output for errors, and some progress reports.
Handle the two modules with non-standard scanner module names.
2002-08-05 21:14:16 +00:00
Jack Jansen
c4ff194bdd Fixed the last two bgen-based modules to be buildable on OSX. 2002-08-05 21:13:07 +00:00
Jeremy Hylton
53d527ad18 Initial prototype of framer: a tool to build the frame for extension modules. 2002-08-05 18:29:45 +00:00
Jeremy Hylton
f4d32df19d Remove function definition from cStringIO.h.
xxxPyCObject_Import() seems to be a copy of PyCObject_Import().
2002-08-05 18:20:01 +00:00
Fred Drake
5f8a23f32f Since the errno module is needed by os._execvpe(), and that is used by the
setup.py (indirectly) script to build the standard dynamically loaded
modules, the errno module is being made static so it will always be
available.
Closes SF bug #591205 (needed on trunk only).
2002-08-05 18:06:17 +00:00
Guido van Rossum
2805428d92 SF patch 590294: os._execvpe security fix (Zack Weinberg). 2002-08-05 16:14:46 +00:00
Guido van Rossum
aed51d8121 SF patch 590294: os._execvpe security fix (Zack Weinberg).
1) Do not attempt to exec a file which does not exist
just to find out what error the operating system
returns. This is an exploitable race on all platforms
that support symbolic links.

2) Immediately re-raise the exception if we get an
error other than errno.ENOENT or errno.ENOTDIR. This
may need to be adapted for other platforms.

(As a security issue, this should be considered for 2.1
and 2.2 as well as 2.3.)
2002-08-05 16:13:24 +00:00
Jack Jansen
aaebdd6a02 Enable building of Carbon toolbox modules with unix-Python. 2002-08-05 15:39:30 +00:00
Jack Jansen
ff8dec7427 Got rid of staticforward. 2002-08-05 15:36:57 +00:00
Jack Jansen
a4741ffe63 This can now run under unix-Python too. You have to pass the folder
to search on the command line in that case.
2002-08-05 15:33:44 +00:00
Jack Jansen
ac7cb05415 Fixed to run better in unix-Python, and to cater for bgenlocations
possibly being missing.
2002-08-05 15:32:30 +00:00
Fred Drake
40813b1dbc Typo: "now" --> "the new" 2002-08-05 15:24:19 +00:00
Martin v. Löwis
98ce7b7ef1 IDLE support for PEP 263. 2002-08-05 15:11:26 +00:00
Jack Jansen
6573f31874 Moved bgenlocations to the Mac/Lib directory. Not perfect, but better than
where it was: it is really a configuration file, not a normal module.

By moving it into Mac/Lib we can now also store the location of bgen
itself in there, which is needed because bgen isn't installed.
2002-08-05 14:56:04 +00:00
Martin v. Löwis
eade4a1580 Patch #590913: PEP 263 support. 2002-08-05 14:55:21 +00:00
Martin v. Löwis
5428fff111 Use ascii_letters to avoid UnicodeErrors. 2002-08-05 14:53:52 +00:00
Guido van Rossum
de392d3f3f Add a small description of PEP 263. 2002-08-05 14:17:20 +00:00
Jack Jansen
cf0a2cfdb2 Added a cast to shut up a compiler warning. 2002-08-05 14:14:05 +00:00
Jack Jansen
ace9d955b0 Renamed Py_Main to PyMac_Main as it has a different signature than the "normal" Py_Main, and that signature has appeared in a .h file. 2002-08-05 14:13:31 +00:00
Jack Jansen
3bd3fedeca Added _IBCarbon module. 2002-08-05 14:12:24 +00:00
Raymond Hettinger
bc552ce1b8 SF 582071 clarified the .split() method's docstring to note that sep=None
will trigger splitting on any whitespace.
2002-08-05 06:28:21 +00:00
Raymond Hettinger
acb45d72b4 Note that True and False are pickable objects 2002-08-05 03:55:36 +00:00
Kurt B. Kaiser
8dcdb77132 GvR provided solution to the socket rebinding timeout problem.
M PyShell.py
M rpc.py
M run.py
2002-08-05 03:52:10 +00:00
Martin v. Löwis
725bb233b9 Add 1 to lineno in deprecation warning. Fixes #590888. 2002-08-05 01:49:16 +00:00