Commit Graph

28002 Commits

Author SHA1 Message Date
Fred Drake 25b5358cf2 Add definitions of the test and testlist symbols in the grammar so
there are no gaps in the definitions.
Closes SF bug #726150.
2003-06-27 17:12:43 +00:00
Jeremy Hylton f8ecde5de0 Revert previous checkin and just add a comment about constructor_ob.
There's no point to passing it anymore, but there's a test that
expects the call to fail if you pass a non-callable object.
2003-06-27 16:58:43 +00:00
Jeremy Hylton 090a3495b3 Check return type of __nonzero__() method.
The language reference says you must return an int or a bool.  This
fix limits the scope of SF bug 759227 (infinite recursion) to
subclasses of int.
2003-06-27 16:46:45 +00:00
Fred Drake 6ab8b40337 fix link-hovering so <a name='...'> (no href attribute) doesn't get
the hovering background
2003-06-27 16:32:27 +00:00
Jeremy Hylton 9263f5797c Fix several bugs in handling of exceptions with trace function enabled.
If the callback raised an exception but did not set curexc_traceback,
the trace function was called with PyTrace_RETURN.  That is, the trace
function was called with an exception set.  The main loop detected the
exception when the trace function returned; it complained and disabled
tracing.

Fix the logic error so that PyTrace_RETURN only occurs if the callback
returned normally.

The trace function must be called for exceptions, too.  So we had
to add new functionality to call with PyTrace_EXCEPTION.  (Leads to a
rather ugly ifdef / else block that contains only a '}'.)

Reverse the logic and name of NOFIX_TRACE to FIX_TRACE.

Joint work with Fred.
2003-06-27 16:13:17 +00:00
Tim Peters 8f6c7c5d5f Some Windows changes preparing for 2.3b2. 2003-06-27 15:49:35 +00:00
Skip Montanaro 0fe8fce7e3 (HTML|Text)Repr.repr1: Guard against objects whos types have no __name__
attribute. Patch and bug report from Geoff Talvola. Closes patch #672855.
2003-06-27 15:45:41 +00:00
Michael W. Hudson 896e5164bb Jacob Hallen cornered me here at EuroPython and got me to look at
patch:

[ 750008 ] 'compiler' module bug with 'import foo.bar as baz'

which I'm now checking in.

after import foo.bar as baz, baz would refer to foo.
2003-06-27 12:32:39 +00:00
Raymond Hettinger f69d9f6818 SF bug #761337: datetime.strftime fails on trivial format string
The interning of short strings violates the refcnt==1 assumption for
_PyString_Resize().

A simple fix is to boost the initial value of "totalnew" by 1.
Combined with an NULL argument to PyString_FromStringAndSize(),
this assures that resulting format string is not interned.
This will remain true even if the implementation of
PyString_FromStringAndSize() changes because only the uninitialized
strings that can be interned are those of zero length.

Added a test case.
2003-06-27 08:14:17 +00:00
Raymond Hettinger df9eff061e * Markup nits for the Invoking Descriptors section
* Documented __slots__
* Documented __metaclass__

Shamelessly plagarized from Guido's tutorial.
2003-06-27 06:57:56 +00:00
Jeremy Hylton 7567822838 Don't call constructor() from pickle().
The constructor() call only made sense when it registered the
constructor as safe for unpickling.  We should probably remove the
module-global function, but need to worry about backwards
compatibility.
2003-06-26 23:20:20 +00:00
Raymond Hettinger d0cda1dc9f SF patch #760792: "wo" in "word" now valid but not documented as such
Revised version of a contribution from Gerrit Holl.

Update the docs for the extended behavior of __contains__
2003-06-26 19:32:10 +00:00
Raymond Hettinger f6fe4eda6e Portion of SF patch #761104. Fixes a minor docstring error.
_TemporarilyImmutableSet is in fact a subclass of BaseSet
2003-06-26 18:49:28 +00:00
Raymond Hettinger daa340418b * Fixed an unmatched parenthesis early in the text.
* Clarified the meaning of lexicographic sequence ordering as discussed on
  comp.lang.python:  http://groups.google.com/groups?th=e163c9f9ba114493
2003-06-26 17:41:40 +00:00
Jeremy Hylton 546e34b654 Enable tracing of multi-threaded applications.
Fix bug in computation of coverage percentage: Only count a line if it
was executed or if we print the >>>>>> marker.
2003-06-26 14:56:17 +00:00
Gustavo Niemeyer 28b5bb33ea Fixing bug described in patch #756032, where SRE reads invalid data
due to a corrupted end pointer.
2003-06-26 14:41:08 +00:00
Fred Drake f91888bb46 markup consistency nits 2003-06-26 03:11:57 +00:00
Fred Drake 4db3661e24 remove _ from label: LaTeX rejects this due to all the magic we use to
get the _ character to format like a normal character
2003-06-26 03:11:20 +00:00
Raymond Hettinger 2b9bc08ee7 Removed useless intra-section references which jump to the top of the
section instead of the specific item being referenced.
2003-06-25 20:36:20 +00:00
Raymond Hettinger 2dd8c42638 SF bug #696777: How to make a class iterable using a member generator.
* Added a note that a container class can implement the iterator protocol
  by defining its __iter__() method as a generator.
2003-06-25 19:03:22 +00:00
Raymond Hettinger 03ec6d538a * Document how descriptors are invoked.
* Fix minor parenthesis matching errors in ref3.tex.
2003-06-25 18:29:36 +00:00
Raymond Hettinger 35fd926195 SF bug #757822: Additional index items, other minor details
* Minor grammatical fix.
2003-06-25 15:07:45 +00:00
Walter Dörwald 03f6c54359 Whitespace normalization. 2003-06-25 13:12:18 +00:00
Raymond Hettinger 5f078ff7f0 SF bug #759889: Pickling of Random is broken
* Implement __reduce__() to support pickling.
* Add a test case to prove a successful roundtrip through pickle.
2003-06-24 20:29:04 +00:00
Barry Warsaw 663219a8cc _make_boundary(): A minor optimization suggested by the Timbot. 2003-06-24 20:19:34 +00:00
Greg Stein 616a58d79a Deal with a couple XXX comments which asked questions.
In response to "shouldn't the client close the file?", the answer is
"no". The original design behind HTTPConnection is that the client did
not have to worry about it. The response would close itself when you
read the last of the data from it. This closing also dealt with
allowing the connection to perform another request/response (if it was
a persistent connection).

However... the auto-close behavior broke compatibility with the
classic httplib.HTTP class' behavior when a zero-length response body
was present. In that situation, the HTTPResponse object was
auto-closing it since there was no data present, and for an HTTP/1.0
connection-close socket (or an HTTP/0.9 request) connection, that also
ended up closing the socket. When an httplib.HTTP user went to read
the socket... boom. A patch to correct the auto-close (for compat with
old httplib users) was added in rev 1.22.

But for non-zero-length *chunked* bodies, we should keep the
auto-close behavior. The library user is not reading the socket (they
can't cuz of the chunked response we just got done handling), so they
should be immune to the response closing the socket. In fact, I would
like to see (one day) the auto-close restored, and the HTTP subclass
would simply have a flag to disable that behavior (for back-compat
purposes).
2003-06-24 06:35:19 +00:00
Raymond Hettinger 8a99b50239 SF patch #736962. Converted test_compile to unittest format. 2003-06-23 13:36:57 +00:00
Martin v. Löwis bcc651a1f9 Idlefork patch #682347: convert Unicode strings from readline to
IOBinding.encoding. Also set sys.std{in,out,err}.encoding, for both
the local and the subprocess case.
2003-06-22 07:52:56 +00:00
Tim Peters faa697a5c9 2.3b2 on Windows will ship with Tcl/Tk 8.4.3. Note: this still didn't
fix the hangs on Win98SE when starting IDLE via "python" from a DOS box,
but did appear to make them harder to provoke.  I closed that bug report
as being hopeless (and if someone wants to open it again, don't dare
assign it to me again <0.1 wink>).
2003-06-22 01:42:20 +00:00
Jack Jansen d2544e32f5 Give compileall a -d option so it works correctly in the face of
DESTDIR being non-null.
2003-06-21 22:07:16 +00:00
Jeremy Hylton c44dbc46fe Better error message 2003-06-21 21:35:25 +00:00
Just van Rossum ac8657bb0e some old changes to this unused module 2003-06-21 14:49:14 +00:00
Just van Rossum 35b50e2683 changed 8-space indentation to 4 2003-06-21 14:41:32 +00:00
Martin v. Löwis 9e9a7c3dd7 Patch #640236: Better eplain unused data. 2003-06-21 14:15:25 +00:00
Martin v. Löwis 5b8bfdf67c Patch #755087: Deal with emptied dumbdbm files correctly. 2003-06-21 13:54:55 +00:00
Martin v. Löwis 171be76bdd Patch #755683: Document that there might be a maximum indentation limit.
Fixes #700827
2003-06-21 13:40:02 +00:00
Martin v. Löwis 975302dbbe Set -d in compileall, to get proper path in case DESTDIR is not empty.
Also add force, to recompile string.pyc in DESTDIR (which would normally
compiled by running compileall.py).
2003-06-21 13:26:28 +00:00
Jack Jansen d7cccdd591 Added a field that allows the user to set sys.argv-style arguments
to the script. Fixes #757544.
2003-06-20 22:21:03 +00:00
Barry Warsaw 47db252786 Add some documentation which describes how to use the email package
instead of rfc822 as the Message factory.
2003-06-20 22:04:03 +00:00
Just van Rossum dc31dc02f7 - do the right thing with symlinks inside directories we're copying
- move the normpath stuff around a bit
- added dubious special case to addPythonFramework()
2003-06-20 21:43:36 +00:00
Jack Jansen b6b988bceb Cop out, and set things to be group-writeable recursively. The various
xxxMODE flags don't cut it. Also set the umask to 2 before doing the
compileall on the destination system.
2003-06-20 21:40:57 +00:00
Just van Rossum 6a55242685 make sure paths to dirs don't end in a / 2003-06-20 21:26:55 +00:00
Just van Rossum 00a0b97dc5 Reworked --strip option: it will now look at _any_ file that's marked
executable in the bundle. Therefore got rid of the "binaries" attribute.
2003-06-20 21:18:22 +00:00
Jack Jansen 4735b234d8 Set the executable bits when installing the shared library in a MacOSX
framework. Fixes #758112.
2003-06-20 20:36:53 +00:00
Just van Rossum 9e50023898 register the library inside Python.framework as eligable for stripping 2003-06-20 20:05:40 +00:00
Just van Rossum 3166f59d2a Add initial standalone support for Python.framework 2003-06-20 18:56:10 +00:00
Raymond Hettinger 4327521688 Added regression test for SF #757818 2003-06-20 18:41:26 +00:00
Neal Norwitz 3a03de4a27 SF #757229, fix libsocket.tex typo 2003-06-20 17:11:39 +00:00
Raymond Hettinger b9572c3456 Removed bytecode transformation for sequence packing/unpacking.
It depended on the previously removed basic block checker to
prevent a jump into the middle of the transformed block.

Clears SF 757818: tuple assignment -- SystemError: unknown opcode
2003-06-20 16:13:17 +00:00
Jack Jansen 7c0d7ba99d Updated. 2003-06-20 15:14:08 +00:00