Commit Graph

1174 Commits

Author SHA1 Message Date
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
Guido van Rossum 2805428d92 SF patch 590294: os._execvpe security fix (Zack Weinberg). 2002-08-05 16:14:46 +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
Guido van Rossum de392d3f3f Add a small description of PEP 263. 2002-08-05 14:17:20 +00:00
Martin v. Löwis 00f1e3f5a5 Patch #534304: Implement phase 1 of PEP 263. 2002-08-04 17:29:52 +00:00
Andrew MacIntyre 161ad0e16b OS/2 EMX now supported 2002-08-04 07:25:58 +00:00
Guido van Rossum 4a57c33dff Adding the heap queue algorithm, per discussion in python-dev last
week.
2002-08-02 18:05:20 +00:00
Guido van Rossum 37c3b2788b Add Kevin O'Connor, author of the heapq code. 2002-08-02 16:50:58 +00:00
Guido van Rossum 0dbab4c560 SF patch 588728 (Nathan Srebro).
The __delete__ method wrapper for descriptors was not supported

(I added a test, too.)

2.2 bugfix candidate.
2002-08-01 14:39:25 +00:00
Tim Peters f47630ff54 A blurb about the sort implementation. 2002-08-01 02:34:51 +00:00
Michael W. Hudson 202a4b6fdd Repair fill-paragraph damage.
Clarify LLTRACE description.  It was introduced in 1992, revision 2.20 of
ceval.c, well before Python 1.0!
2002-07-30 15:25:57 +00:00
Michael W. Hudson a6255238b2 add description of LLTRACE. 2002-07-30 09:49:29 +00:00
Thomas Heller 085358a3e2 New functions for extension writers on Windows:
PyErr_SetExcFromWindowsErr(), PyErr_SetExcFromWindowsErrWithFilename().

Similar to PyErr_SetFromWindowsErrWithFilename() and
PyErr_SetFromWindowsErr(), but they allow to specify
the exception type to raise. Available on Windows.

See SF patch #576458.
2002-07-29 14:27:41 +00:00
Martin v. Löwis 0cec0ffc78 Patch #573770: Implement lchown. 2002-07-28 16:33:45 +00:00
Martin v. Löwis 611a7101ca Patch #552812: Better description in "python -h" for -u. 2002-07-28 10:34:08 +00:00
Guido van Rossum 2d5389c08f News about StopIteration as a "sink state". 2002-07-23 03:44:35 +00:00
Guido van Rossum 79f0a106e6 Add news about strptime and socket.setdefaulttimeout(). 2002-07-23 03:32:08 +00:00
Neal Norwitz 1389f3e059 Move DL_IMPORT/DL_EXPORT to Build section, I think this is the correct place 2002-07-22 13:21:10 +00:00
Mark Hammond a5083ec3b3 Add note about DL_IMPORT deprecation.
[ 583894 ] doc DL_IMPORT/DL_EXPORT changes
2002-07-22 12:53:16 +00:00
Neal Norwitz 36eb4b2d7e Pure Python strptime implementation by Brett Cannon. See SF patch 474274. 2002-07-19 18:38:25 +00:00
Barry Warsaw f31ff27c57 (py-pychecker-run): Use the last pychecker invocation as the default
contents of the next command.
2002-07-17 21:25:43 +00:00
Barry Warsaw 1f4fed68e9 We need to (require 'compile) to guarantee that compile-internal is
defined.  /Really/ closes SF # 580631.
2002-07-17 13:45:00 +00:00
Barry Warsaw 32a03967b7 (py-imenu-create-index-function): Skip over stuff that looks like code
but which is in a comment or string.  Closes SF bug # 572341 reported
by Adrian van den Dries.
2002-07-16 16:04:13 +00:00
Barry Warsaw daa192104d (py-pychecker-run): Thomas Heller points out that this function messes
up the compile command's history.  Fix that by using compile-internal.

Fixes SF bug # 580631
2002-07-16 15:56:28 +00:00
Mark Hammond c0e35158fb Add a blurb on the 3 Windows bugs I worked on over the last couple of days. 2002-07-16 01:32:30 +00:00
Tim Peters a65523a151 Added Andrew MacIntyre -- overdue! 2002-07-15 16:13:06 +00:00
Tim Peters 58cf361e35 docompare(): Another reasonable optimization from Jonathan Hogg for the
explicit comparison function case:  use PyObject_Call instead of
PyEval_CallObject.  Same thing in context, but gives a 2.4% overall
speedup when sorting a list of ints via list.sort(__builtin__.cmp).
2002-07-15 05:16:13 +00:00
Marc-André Lemburg 58e2ff2e81 Mention new encoding. 2002-07-12 14:40:04 +00:00
Guido van Rossum dd523eef95 Fernando Pérez of SF bug 579701 fame. 2002-07-12 13:13:28 +00:00
Guido van Rossum 0c08864fbb Replace rare tabs with 4 spaces, assuming that's what was intended. 2002-07-11 01:04:32 +00:00
Guido van Rossum 715a0c67b8 Note the existence of SpecialBuilds.txt. 2002-07-11 01:01:49 +00:00
Tim Peters 8acdf7a935 Noted the releases in which COUNT_ALLOCS can blow up. 2002-07-11 00:38:05 +00:00
Tim Peters 62fc52e6a1 Recorded the introduction release for each gimmick, as best I was able to
reconstruct that info.
Filled out some sketchy explanations of pragmatics.
2002-07-11 00:23:58 +00:00
Tim Peters 20c8a04a08 Some clarifications. 2002-07-11 00:02:52 +00:00
Tim Peters 889f61dcfb Documented PYMALLOC_DEBUG. This completes primary coverage of all the
"special builds" I ever use.  If you use others, document them here, or
don't be surprised if I rip out the code for them <0.5 wink>.
2002-07-10 19:29:49 +00:00
Tim Peters a788f5ef02 Clarified sys.getobjects() pragmatics. 2002-07-10 18:47:03 +00:00
Tim Peters 44c1a7bc51 Typo repair. 2002-07-09 19:27:20 +00:00
Tim Peters 48ba649ae3 Moved COUNT_ALLOCS down and finished writing its description. 2002-07-09 19:24:54 +00:00
Tim Peters 3486f617a1 Checkin comment. 2002-07-09 18:48:32 +00:00
Tim Peters 6045d48e5c New file to try to document the "special build" preprocessor symbols.
Incomplete.  Add to it!  Once it settles down, it would make a nice
appendix in the real docs.
2002-07-09 18:35:34 +00:00
Tim Peters 7c321a80f9 The Py_REF_DEBUG/COUNT_ALLOCS/Py_TRACE_REFS macro minefield: added
more trivial lexical helper macros so that uses of these guys expand
to nothing at all when they're not enabled.  This should help sub-
standard compilers that can't do a good job of optimizing away the
previous "(void)0" expressions.

Py_DECREF:  There's only one definition of this now.  Yay!  That
was that last one in the family defined multiple times in an #ifdef
maze.

Py_FatalError():  Changed the char* signature to const char*.

_Py_NegativeRefcount():  New helper function for the Py_REF_DEBUG
expansion of Py_DECREF.  Calling an external function cuts down on
the volume of generated code.  The previous inline expansion of abort()
didn't work as intended on Windows (the program often kept going, and
the error msg scrolled off the screen unseen).  _Py_NegativeRefcount
calls Py_FatalError instead, which captures our best knowledge of
how to abort effectively across platforms.
2002-07-09 02:57:01 +00:00
Tim Peters c6a3ff634a SF bug 578752: COUNT_ALLOCS vs heap types
Repair segfaults and infinite loops in COUNT_ALLOCS builds in the
presence of new-style (heap-allocated) classes/types.

Bugfix candidate.  I'll backport this to 2.2.  It's irrelevant in 2.1.
2002-07-08 22:11:52 +00:00
Tim Peters 943382c8e5 Removed WITH_CYCLE_GC #ifdef-ery. Holes:
+ I'm not sure what to do about configure.in.  Left it alone.

+ Ditto pyexpat.c.  Fred or Martin will know what to do.
2002-07-07 03:59:34 +00:00
Tim Peters 1de41bfbc0 Stop trying to cater to platforms with a broken HUGE_VAL definition. It
breaks other platforms (in this case, the hack for broken Cray systems in
turn caused failure on a Mac system broken in a different way).
2002-07-03 03:31:20 +00:00
Martin v. Löwis 7d650ca83b Implement the encoding argument for toxml and toprettyxml.
Document toprettyxml.
2002-06-30 15:05:00 +00:00
Jeremy Hylton 3e76d7f3b3 Add Bob Kline of HTTP 100 fame. 2002-06-28 22:39:56 +00:00
Raymond Hettinger 5a04aec384 Fix SF bug 546434 -- buffer slice type inconsistent. 2002-06-25 00:25:30 +00:00
Raymond Hettinger ab5dae35ca Fix SF bug 572567: Memory leak in object comparison. 2002-06-24 13:08:16 +00:00
Guido van Rossum c7c36503eb Mention private vars in __slots__. 2002-06-21 01:29:25 +00:00
Guido van Rossum fe0ca4a0f5 Mention pymemcompat.h. 2002-06-18 21:20:13 +00:00
Guido van Rossum f925782dae Minor tweaks to existing items (radian/degree, and UTF-16 readers.. 2002-06-18 20:43:18 +00:00
Guido van Rossum 63517577fd Patch from SF bug 570483 (Tim Northover).
In a fresh interpreter, type.mro(tuple) would segfault, because
PyType_Ready() isn't called for tuple yet.  To fix, call
PyType_Ready(type) if type->tp_dict is NULL.
2002-06-18 16:44:57 +00:00
Walter Dörwald 3430d70e03 Apply diff2.txt from SF patch http://www.python.org/sf/566999
This patch enhances Python/import.c/find_module() so
that unicode objects found in sys.path will be treated
as legal directory names (The current code ignores
anything that is not a str). The unicode name is
converted to str using Py_FileSystemDefaultEncoding.
2002-06-17 10:43:59 +00:00
Guido van Rossum 9562bcf3bc Add Oren Tirosh and news about his patch. 2002-06-14 21:31:18 +00:00
Guido van Rossum bea18ccde6 SF patch 568629 by Oren Tirosh: types made callable.
These built-in functions are replaced by their (now callable) type:

    slice()
    buffer()

and these types can also be called (but have no built-in named
function named after them)

    classobj (type name used to be "class")
    code
    function
    instance
    instancemethod (type name used to be "instance method")

The module "new" has been replaced with a small backward compatibility
placeholder in Python.

A large portion of the patch simply removes the new module from
various platform-specific build recipes.  The following binary Mac
project files still have references to it:

    Mac/Build/PythonCore.mcp
    Mac/Build/PythonStandSmall.mcp
    Mac/Build/PythonStandalone.mcp

[I've tweaked the code layout and the doc strings here and there, and
added a comment to types.py about StringTypes vs. basestring.  --Guido]
2002-06-14 20:41:17 +00:00
Skip Montanaro 57454e57f8 This introduces stricter library/header file checking for the Berkeley DB
library.  Since multiple versions can be installed simultaneously, it's
crucial that you only select libraries and header files which are compatible
with each other.  Version checking is done from highest version to lowest.
Building using version 1 of Berkeley DB is disabled by default because of
the hash file bugs people keep rediscovering.  It can be enabled by
uncommenting a few lines in setup.py.  Closes patch 553108.
2002-06-14 20:30:31 +00:00
Neal Norwitz 1f68fc7fa5 SF bug # 493951 string.{starts,ends}with vs slices
Handle negative indices similar to slices.
2002-06-14 00:50:42 +00:00
Martin v. Löwis 606edc1d97 Patch #568235: Add posix.setpgid. 2002-06-13 21:09:11 +00:00
Guido van Rossum 2e82e717e6 Changed the extended slice example to show that you can reverse a
string with a [::-1] slice.
2002-06-13 11:41:07 +00:00
Guido van Rossum c5fe5eb8d2 SF bug 567538: Generator can crash the interpreter (Finn Bock).
This was a simple typo.  Strange that the compiler didn't catch it!
Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a
why_code at all, but an opcode; but even though 'why' is declared as
an enum, comparing it to an int is apparently not even worth a
warning -- not in gcc, and not in VC++. :-(

Will fix in 2.2 too.
2002-06-12 03:45:21 +00:00
Michael W. Hudson 5efaf7eac8 This is my nearly two year old patch
[ 400998 ] experimental support for extended slicing on lists

somewhat spruced up and better tested than it was when I wrote it.

Includes docs & tests.  The whatsnew section needs expanding, and arrays
should support extended slices -- later.
2002-06-11 10:55:12 +00:00
Martin v. Löwis f90ae20354 Patch #488073: AtheOS port. 2002-06-11 06:22:31 +00:00
Guido van Rossum 9f7549bfc7 Record the latest fixes. 2002-06-10 21:39:42 +00:00
Guido van Rossum 009afb7c90 SF patch 564549 (Erik Andersén).
The WeakKeyDictionary constructor didn't work when a dict arg was
given.  Fixed by moving a line.  Also adding a unit test.

Bugfix candidate.
2002-06-10 20:00:52 +00:00
Martin v. Löwis a3fb4f7816 Patch #505375: Make doc strings optional. 2002-06-09 13:33:54 +00:00
Guido van Rossum 2a664a2a75 Added Bernard Yue who wrote test_timeout.py and participated in the
timeout socket patch design.
2002-06-07 15:58:53 +00:00
Guido van Rossum 5033c8e309 Add timeout mode. Clarify gnu_getopt. 2002-06-07 12:40:52 +00:00
Guido van Rossum 15699055e9 Michael Gilfix of SF patch 555085 fame. 2002-06-06 21:08:46 +00:00
Martin v. Löwis 446a25fa3c Patch 473512: add GNU style scanning as gnu_getopt. 2002-06-06 10:58:36 +00:00
Guido van Rossum 9923ffe2c0 Address SF bug 519621: slots weren't traversed by GC.
While I was at it, I added a tp_clear handler and changed the
tp_dealloc handler to use the clear_slots helper for the tp_clear
handler.

Also tightened the rules for slot names: they must now be proper
identifiers (ignoring the dirty little fact that <ctype.h> is locale
sensitive).

Also set mp->flags = READONLY for the __weakref__ pseudo-slot.

Most of this is a 2.2 bugfix candidate; I'll apply it there myself.
2002-06-04 19:52:53 +00:00
Michael W. Hudson b0dc1a38a1 Fiddle wording. 2002-06-04 18:27:35 +00:00
Neal Norwitz b5b5a260ea Fix SF bug #557436, TclError is a str should be an Exception
Make Tkinter.TclError derive from Exception, it was a string.
2002-06-04 17:14:07 +00:00
Walter Dörwald 474458da48 Add constants BOM_UTF8, BOM_UTF16, BOM_UTF16_LE, BOM_UTF16_BE,
BOM_UTF32, BOM_UTF32_LE and BOM_UTF32_BE that represent the Byte
Order Mark in UTF-8, UTF-16 and UTF-32 encodings for little and
big endian systems.

The old names BOM32_* and BOM64_* were off by a factor of 2.

This closes SF bug http://www.python.org/sf/555360
2002-06-04 15:16:29 +00:00
Guido van Rossum 2e4e02620b Surprising fix for SF bug 563060: module can be used as base class.
Change the module constructor (module_init) to have the signature
__init__(name:str, doc=None); this prevents the call from type_new()
to succeed.  While we're at it, prevent repeated calling of
module_init for the same module from leaking the dict, changing the
semantics so that __dict__ is only initialized if NULL.

Also adding a unittest, test_module.py.

This is an incompatibility with 2.2, if anybody was instantiating the
module class before, their argument list was probably empty; so this
can't be backported to 2.2.x.
2002-06-04 05:58:34 +00:00
Neal Norwitz 32a7e7f6b6 Change name from string to basestring 2002-05-31 19:58:02 +00:00
Fred Drake 1e9abf0efd Typo fixes. 2002-05-30 16:41:14 +00:00
Michael W. Hudson e4df27f084 Add the pymemcompat.h header as discussed on python-dev.
Now we just need to make sure people know about it...
2002-05-30 16:22:29 +00:00
Guido van Rossum 5c16468ada Holger Krekel. 2002-05-30 15:42:58 +00:00
Neal Norwitz d68f5171eb As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.
2002-05-29 15:54:55 +00:00
Michael W. Hudson 34f20eac98 This is patch
[ 559250 ] more POSIX signal stuff

Adds support (and docs and tests and autoconfery) for posix signal
mask handling -- sigpending, sigprocmask and sigsuspend.
2002-05-27 15:08:24 +00:00
Guido van Rossum cacfc07d08 - A new type object, 'string', is added. This is a common base type
for 'str' and 'unicode', and can be used instead of
  types.StringTypes, e.g. to test whether something is "a string":
  isinstance(x, string) is True for Unicode and 8-bit strings.  This
  is an abstract base class and cannot be instantiated directly.
2002-05-24 19:01:59 +00:00
Tim Peters 84ee323cb9 John Aycock correctly pointed out that the grammar for
"power" was formally ambiguous.  Here's his fix.
2002-05-23 20:05:40 +00:00
Barry Warsaw f070cce6af (py-goto-statement-below): Watch out for landing in a triple quoted
string with text in column zero.  Skip that stuff when looking for the
"first statement following the statement containing point".
2002-05-23 19:42:16 +00:00
Guido van Rossum fecdb494da Another one. 2002-05-21 12:38:46 +00:00
Barry Warsaw 47f3e2cb6c Add a bit of news about the email package fixes. 2002-05-20 00:14:24 +00:00
Raymond Hettinger f077f790c4 Added (with GvR's endorsement) Matthew Dixon Cowles
for his service on the Python-Help maillist.
2002-05-16 13:42:48 +00:00
Raymond Hettinger 87f59eeb0a Noted SF patch 552452 adding degree/radian conversions to mathmodule.c. 2002-05-13 04:17:32 +00:00
Barry Warsaw 69c9266f45 (py-execute-region): Do the blank line skipping inside the
save-excursion so that when the function is complete, point is
preserved.
2002-05-12 17:37:46 +00:00
Raymond Hettinger 9b1df1db68 Noted change in ftplib 1.68 closing SF patch 553277. 2002-05-12 06:07:21 +00:00
Andrew M. Kuchling b2cb37f298 Fix typo 2002-05-09 14:33:18 +00:00
Neil Schemenauer c9abc1de6b Remove news about PyMalloc_*. Do we need to say anything about
pymalloc?
2002-05-08 14:14:41 +00:00
Martin v. Löwis a8dd0941b8 Patch #553277: Accept callbacks that are callable, not callbacks that are true. 2002-05-08 08:56:33 +00:00
Martin v. Löwis 01f94bda38 Patch #552433: Special-case tuples. Avoid sub-type checking for lists.
Avoid checks for negative indices and duplicate checks for support of
the sequence protocol.
2002-05-08 08:44:21 +00:00
Andrew M. Kuchling 21b23b09a2 Fix typos 2002-05-07 20:58:03 +00:00
Tim Peters 46c04e140c random.gauss() uses a piece of hidden state used by nothing else,
and the .seed() and .whseed() methods failed to reset it.  In other
words, setting the seed didn't completely determine the sequence of
results produced by random.gauss().  It does now.  Programs repeatedly
mixing calls to a seed method with calls to gauss() may see different
results now.

Bugfix candidate (random.gauss() has always been broken in this way),
despite that it may change results.
2002-05-05 20:40:00 +00:00
Fred Drake d0ba636541 Added notes related to the removal of deprecated features of the xrange type. 2002-05-02 21:28:26 +00:00
Fred Drake 7d28b73ec1 Added note about using the documentation build tools under Cygwin. 2002-05-02 21:17:00 +00:00
Fred Drake 7f781c9aab Add Pickler.clear_memo() so the pickle and cPickle modules are more similar. 2002-05-01 20:33:53 +00:00
Barry Warsaw 5dfc7afff9 Watch out for older XEmacsen for which requiring info-look doesn't
define info-lookup-maybe-add-help.
2002-04-30 18:58:52 +00:00