]> granicus.if.org Git - python/log
python
22 years agoAdded missing name (textwrap.dedent() docs).
Fred Drake [Mon, 30 Jun 2003 12:18:52 +0000 (12:18 +0000)]
Added missing name (textwrap.dedent() docs).

22 years agoDon't require that a RuntimeError is raised when playing a second
Walter Dörwald [Mon, 30 Jun 2003 11:57:52 +0000 (11:57 +0000)]
Don't require that a RuntimeError is raised when playing a second
sound while the first one is still running, as the first one
one might already have finished.

Fixes part of SF bug #763052.

22 years agoSF bug #762990: Awful Grammar in Python Tutorial
Raymond Hettinger [Mon, 30 Jun 2003 04:27:31 +0000 (04:27 +0000)]
SF bug #762990: Awful Grammar in Python Tutorial

Fixed a nit.

22 years agoFix SF 762891: "del p[key]" on proxy object raises SystemError()
Raymond Hettinger [Mon, 30 Jun 2003 04:18:48 +0000 (04:18 +0000)]
Fix SF 762891:  "del p[key]" on proxy object raises SystemError()

22 years agoMerge branch updates back into the main trunk
Raymond Hettinger [Mon, 30 Jun 2003 03:35:06 +0000 (03:35 +0000)]
Merge branch updates back into the main trunk

22 years agoFix SF #754870, SSL crash interpreter when remote side closes during connect
Neal Norwitz [Mon, 30 Jun 2003 03:25:20 +0000 (03:25 +0000)]
Fix SF #754870, SSL crash interpreter when remote side closes during connect

Also fix a memory leak.

22 years agoBump version string to "2.3b2+".
Tim Peters [Mon, 30 Jun 2003 02:14:28 +0000 (02:14 +0000)]
Bump version string to "2.3b2+".

22 years agoFix typo, refer to proper argument name
Neal Norwitz [Mon, 30 Jun 2003 01:54:04 +0000 (01:54 +0000)]
Fix typo, refer to proper argument name

22 years agorestore 2.2 compatibility:
Just van Rossum [Sun, 29 Jun 2003 22:20:26 +0000 (22:20 +0000)]
restore 2.2 compatibility:
- don't use "abc" in aString
- don't reorganize extension modules when not using zipimport

22 years ago- added --semi-standalone option that builds apps that depend on an
Just van Rossum [Sun, 29 Jun 2003 21:54:12 +0000 (21:54 +0000)]
- added --semi-standalone option that builds apps that depend on an
  installed Python, yet include any modules not in the std lib
- reworked extension module inclusion code: put all .so files in
  a subdirectory of Contents/Resources/, but more importantly,
  correctly support extensions that are submodules.

22 years agoMore tests
Raymond Hettinger [Sun, 29 Jun 2003 20:36:23 +0000 (20:36 +0000)]
More tests

* Test with infinite inputs (using take() on the output)
* Test whether GC can find and eliminate cycles.

22 years agoFix broken markup, & tweak a couple of things for consistency.
Fred Drake [Sun, 29 Jun 2003 18:12:23 +0000 (18:12 +0000)]
Fix broken markup, & tweak a couple of things for consistency.

22 years agoFix sf bug 666219: assertion error in httplib.
Jeremy Hylton [Sun, 29 Jun 2003 17:55:05 +0000 (17:55 +0000)]
Fix sf bug 666219: assertion error in httplib.

The obvious way for this assertion to fail is if the LineAndFileWrapper constructor is called when an empty line.  Raise a BadStatusError before the call.

22 years agoAdd several news items for changes I made since b1.
Jeremy Hylton [Sun, 29 Jun 2003 17:25:39 +0000 (17:25 +0000)]
Add several news items for changes I made since b1.

22 years agoWhitespace normalization.
Tim Peters [Sun, 29 Jun 2003 17:24:17 +0000 (17:24 +0000)]
Whitespace normalization.

22 years agoRemoved XXX comments about missing threading.py functions.
Tim Peters [Sun, 29 Jun 2003 17:12:30 +0000 (17:12 +0000)]
Removed XXX comments about missing threading.py functions.

22 years agoAdded news about os.environ['PYTHONINSPECT'] = 'yes'
Barry Warsaw [Sun, 29 Jun 2003 17:10:11 +0000 (17:10 +0000)]
Added news about os.environ['PYTHONINSPECT'] = 'yes'

22 years agoRemove stub settrace() and setprofile() calls.
Jeremy Hylton [Sun, 29 Jun 2003 17:07:46 +0000 (17:07 +0000)]
Remove stub settrace() and setprofile() calls.

22 years agoPy_Main(): Add a check for the PYTHONINSPECT environment variable
Barry Warsaw [Sun, 29 Jun 2003 17:07:06 +0000 (17:07 +0000)]
Py_Main(): Add a check for the PYTHONINSPECT environment variable
after running the script so that a program could do something like:

os.environ['PYTHONINSPECT'] = 1

to programmatically enter a prompt at the end.

(After a patch by Skip Montanaro w/ proposal by Troy Melhase

22 years agoFix grammar in comment.
Jeremy Hylton [Sun, 29 Jun 2003 16:59:59 +0000 (16:59 +0000)]
Fix grammar in comment.

22 years agoWhitespace normalization.
Jeremy Hylton [Sun, 29 Jun 2003 16:59:43 +0000 (16:59 +0000)]
Whitespace normalization.

22 years agoAdd settrace() and setprofile() functions to the threading library.
Jeremy Hylton [Sun, 29 Jun 2003 16:58:41 +0000 (16:58 +0000)]
Add settrace() and setprofile() functions to the threading library.

22 years agoTypo repair.
Tim Peters [Sun, 29 Jun 2003 16:56:38 +0000 (16:56 +0000)]
Typo repair.

22 years agoUpdate copyright years.
Fred Drake [Sun, 29 Jun 2003 16:55:47 +0000 (16:55 +0000)]
Update copyright years.

22 years agoProvide dummy (do-nothing) settrace() and setprofile() functions until
Tim Peters [Sun, 29 Jun 2003 16:50:06 +0000 (16:50 +0000)]
Provide dummy (do-nothing) settrace() and setprofile() functions until
Jeremy can check in the real things.

22 years agoFilled in release date; repaired grammar in a news item.
Tim Peters [Sun, 29 Jun 2003 16:18:08 +0000 (16:18 +0000)]
Filled in release date; repaired grammar in a news item.

22 years agominor wordsmithing
Skip Montanaro [Sun, 29 Jun 2003 16:01:51 +0000 (16:01 +0000)]
minor wordsmithing

22 years agoRemoved invalid test.
Raymond Hettinger [Sun, 29 Jun 2003 15:57:50 +0000 (15:57 +0000)]
Removed invalid test.
Analysis by Bob Halley:

  The test seems to expect that if time.daylight is true, then the
  is_dst field of the tm structure will be 1 too.  But this isn't
  the case, since daylight is true if the timezone does DST, *not*
  if DST is in effect.

22 years agoFreeBSD 5.x uses different wchar_t/win_t guards than earlier versions
Andrew MacIntyre [Sun, 29 Jun 2003 15:46:21 +0000 (15:46 +0000)]
FreeBSD 5.x uses different wchar_t/win_t guards than earlier versions

22 years agoSF bug #762455: Python segfaults when sys.stdout is changed in getattr
Raymond Hettinger [Sun, 29 Jun 2003 15:44:07 +0000 (15:44 +0000)]
SF bug #762455: Python segfaults when sys.stdout is changed in getattr

* Added unittest that fails before, but not after Neil's fix to ceval.c.

22 years agoFix SF #762455, segfault when sys.stdout is changed in getattr
Neal Norwitz [Sun, 29 Jun 2003 14:48:32 +0000 (14:48 +0000)]
Fix SF #762455, segfault when sys.stdout is changed in getattr
Will backport.

22 years agoWhitespace normalization.
Tim Peters [Sun, 29 Jun 2003 05:46:54 +0000 (05:46 +0000)]
Whitespace normalization.

22 years agoSome nifty doctest extensions from Jim Fulton, currently used in Zope3.
Tim Peters [Sun, 29 Jun 2003 05:30:48 +0000 (05:30 +0000)]
Some nifty doctest extensions from Jim Fulton, currently used in Zope3.
I won't have time to write real docs, but spent a lot of time adding
comments to his code and fleshing out the exported functions' docstrings.
There's probably opportunity to consolidate how docstrings get extracted
too, and the new code for that is probably better than the old code for
that (which strained mightily to recover from 2.2's new class/type
gimmicks).

22 years agoSF bug #430160: CGIHTTPServer.py POST bug using IE
Raymond Hettinger [Sun, 29 Jun 2003 05:06:56 +0000 (05:06 +0000)]
SF bug #430160:  CGIHTTPServer.py POST bug using IE

Minor improvement to previous bugfix.
Eating the remaining characters would lead to an endless loop
without a termination test.

22 years agoSF patch #760257: add socket.timeout exception
Raymond Hettinger [Sun, 29 Jun 2003 04:55:59 +0000 (04:55 +0000)]
SF patch #760257:  add socket.timeout exception
(Contributed by Bob Halley)

Add documentation for the new socket.timeout exception.

22 years agoMinor fixes to punctuation and grammar.
Raymond Hettinger [Sun, 29 Jun 2003 04:53:23 +0000 (04:53 +0000)]
Minor fixes to punctuation and grammar.

22 years agoAdd missing self. before curNode. This may need to be committed
Neal Norwitz [Sun, 29 Jun 2003 04:50:34 +0000 (04:50 +0000)]
Add missing self. before curNode.  This may need to be committed
to PyXML, I'm not sure of the procedure.

22 years agoSF patch #760257: add socket.timeout exception
Raymond Hettinger [Sun, 29 Jun 2003 04:40:22 +0000 (04:40 +0000)]
SF patch #760257:  add socket.timeout exception
(Contributed by Bob Halley)

Add unittests for the new socket.timeout exception.

22 years agoFix arguments for instantiating InterpolationSyntaxError
Neal Norwitz [Sun, 29 Jun 2003 04:23:35 +0000 (04:23 +0000)]
Fix arguments for instantiating InterpolationSyntaxError

22 years agoComment out cap, it was unused.
Neal Norwitz [Sun, 29 Jun 2003 04:21:43 +0000 (04:21 +0000)]
Comment out cap, it was unused.
Should all the commented out code be removed?

22 years agowhitespace normalization
Neal Norwitz [Sun, 29 Jun 2003 04:19:37 +0000 (04:19 +0000)]
whitespace normalization

22 years agoremove unused import math
Neal Norwitz [Sun, 29 Jun 2003 04:18:15 +0000 (04:18 +0000)]
remove unused import math

22 years agoremove extra parameter from _java_getprop, remove duplicate imports
Neal Norwitz [Sun, 29 Jun 2003 04:17:45 +0000 (04:17 +0000)]
remove extra parameter from _java_getprop, remove duplicate imports

22 years agouse == like all the other conditionals
Neal Norwitz [Sun, 29 Jun 2003 04:16:49 +0000 (04:16 +0000)]
use == like all the other conditionals

22 years agofix problems found by pychecker
Neal Norwitz [Sun, 29 Jun 2003 04:16:28 +0000 (04:16 +0000)]
fix problems found by pychecker

22 years agoSF patch #760257: add socket.timeout exception
Raymond Hettinger [Sun, 29 Jun 2003 03:29:42 +0000 (03:29 +0000)]
SF patch #760257: add socket.timeout exception

22 years agoAdded Bob Halley for work on socket.timeout
Raymond Hettinger [Sun, 29 Jun 2003 03:27:45 +0000 (03:27 +0000)]
Added Bob Halley for work on socket.timeout

22 years agoMissed a spot where the new optional optionflags argument needed to get
Tim Peters [Sun, 29 Jun 2003 03:11:20 +0000 (03:11 +0000)]
Missed a spot where the new optional optionflags argument needed to get
passed on.

22 years agoSF patch #760257: add socket.timeout exception
Raymond Hettinger [Sun, 29 Jun 2003 03:08:05 +0000 (03:08 +0000)]
SF patch #760257: add socket.timeout exception
(Contributed by Bob Halley)

Added a new exception, socket.timeout so that timeouts can be differentiated
from other socket exceptions.

Docs, more tests, and newsitem to follow.

22 years agoBump version information for Python 2.3 beta 2.
Fred Drake [Sun, 29 Jun 2003 02:17:28 +0000 (02:17 +0000)]
Bump version information for Python 2.3 beta 2.

22 years agoDocument PyThreadState_SetAsyncExc().
Fred Drake [Sun, 29 Jun 2003 02:14:31 +0000 (02:14 +0000)]
Document PyThreadState_SetAsyncExc().

22 years agoBump release level to 2.3b2.
Tim Peters [Sun, 29 Jun 2003 00:57:17 +0000 (00:57 +0000)]
Bump release level to 2.3b2.

22 years agoSlight clarification on running the examples from the Finder.
Jack Jansen [Sun, 29 Jun 2003 00:24:12 +0000 (00:24 +0000)]
Slight clarification on running the examples from the Finder.

22 years agoSuggest people visit www.python.org/packman if the default database
Jack Jansen [Sun, 29 Jun 2003 00:17:23 +0000 (00:17 +0000)]
Suggest people visit www.python.org/packman if the default database
cannot be found.

22 years agoUse http://www.python.org/packman as the base URL. Also upped the version
Jack Jansen [Sun, 29 Jun 2003 00:09:18 +0000 (00:09 +0000)]
Use http://www.python.org/packman as the base URL. Also upped the version
number because of this.

22 years agoBy default build docs, don't download them.
Jack Jansen [Sat, 28 Jun 2003 23:38:04 +0000 (23:38 +0000)]
By default build docs, don't download them.

22 years agoAdd PyThreadState_SetAsyncExc(long, PyObject *).
Guido van Rossum [Sat, 28 Jun 2003 21:53:52 +0000 (21:53 +0000)]
Add PyThreadState_SetAsyncExc(long, PyObject *).

A new API (only accessible from C) to interrupt a thread by sending it
an exception.  This is not always effective, but might help some people.
Requested by Just van Rossum and Alex Martelli.  It is intentional
that you have to write your own C extension to call it from Python.

Docs will have to wait.

22 years agoAdded Steven Taschuk for efforts fixing zipfile.py
Raymond Hettinger [Sat, 28 Jun 2003 20:10:26 +0000 (20:10 +0000)]
Added Steven Taschuk for efforts fixing zipfile.py

22 years agoSF patch 703666: Several objects don't decref tmp on failure in subtype_new
Raymond Hettinger [Sat, 28 Jun 2003 20:04:25 +0000 (20:04 +0000)]
SF patch 703666: Several objects don't decref tmp on failure in subtype_new
Submitted By: Christopher A. Craig

Fillin some missing decrefs.

22 years agoA few minor improvements
Barry Warsaw [Sat, 28 Jun 2003 15:22:16 +0000 (15:22 +0000)]
A few minor improvements

22 years agoRewrote the docs for supporting cyclic garbage collection to reflect
Jim Fulton [Sat, 28 Jun 2003 13:29:16 +0000 (13:29 +0000)]
Rewrote the docs for supporting cyclic garbage collection to reflect
the new way that once writes types.

Deleted the old section and sample code and added a new section
building on the Noddy example.

22 years agoUpdated the depenencies to reflect changes in the sample code for
Jim Fulton [Sat, 28 Jun 2003 13:27:57 +0000 (13:27 +0000)]
Updated the depenencies to reflect changes in the sample code for
building new types.

22 years agoAdded tests for sample modules.
Jim Fulton [Sat, 28 Jun 2003 11:54:40 +0000 (11:54 +0000)]
Added tests for sample modules.

22 years agoAdded s setup module to make it easier to test the sample modules.
Jim Fulton [Sat, 28 Jun 2003 11:54:20 +0000 (11:54 +0000)]
Added s setup module to make it easier to test the sample modules.

22 years agoFixed bug in implementation of tp_init function. It should be an int
Jim Fulton [Sat, 28 Jun 2003 11:54:03 +0000 (11:54 +0000)]
Fixed bug in implementation of tp_init function. It should be an int
function, not a PyObject *.

22 years agoChanged the assignment of PyType_GenericNew to tp_new slot. Now do
Jim Fulton [Sat, 28 Jun 2003 11:53:29 +0000 (11:53 +0000)]
Changed the assignment of PyType_GenericNew to tp_new slot. Now do
this in module initialization before calling PyType_Ready.  (Sorry
Tim.) This is necessary to compile on cygwin.  AFAIK, we support
cygwin. If so, then we need to write extentions this way.

22 years agoChanged the assignment of PyType_GenericNew to tp_new slot. Now do
Jim Fulton [Sat, 28 Jun 2003 11:53:12 +0000 (11:53 +0000)]
Changed the assignment of PyType_GenericNew to tp_new slot. Now do
this in module initialization before calling PyType_Ready.  (Sorry
Tim.) This is necessary to compile on cygwin.  AFAIK, we support
cygwin. If so, then we need to write extentions this way.

Fixed bug in implementation of tp_init function. It should be an int
function, not a PyObject *.

22 years agoCorrect markup errors that prevented formatting.
Fred Drake [Sat, 28 Jun 2003 11:50:34 +0000 (11:50 +0000)]
Correct markup errors that prevented formatting.

22 years agoExplain source encodings. Fixes #683486.
Martin v. Löwis [Sat, 28 Jun 2003 08:11:55 +0000 (08:11 +0000)]
Explain source encodings. Fixes #683486.

22 years agoPatch #758910: Add pthread flag to CXX if possible.
Martin v. Löwis [Sat, 28 Jun 2003 07:46:38 +0000 (07:46 +0000)]
Patch #758910: Add pthread flag to CXX if possible.

22 years agoPatch #751916: Check for signals, fix some refcounting errors.
Martin v. Löwis [Sat, 28 Jun 2003 07:40:23 +0000 (07:40 +0000)]
Patch #751916: Check for signals, fix some refcounting errors.

22 years agoSF 662923: iterator for dbm keys
Raymond Hettinger [Sat, 28 Jun 2003 07:08:39 +0000 (07:08 +0000)]
SF 662923: iterator for dbm keys

When shelve and the bsdbm where expanded to a full mapping interface,
this module was missed.

22 years agoAdd take() to examples. Tighten the islice() example
Raymond Hettinger [Sat, 28 Jun 2003 05:44:36 +0000 (05:44 +0000)]
Add take() to examples.  Tighten the islice() example

22 years agofix markup nits
Fred Drake [Sat, 28 Jun 2003 03:09:06 +0000 (03:09 +0000)]
fix markup nits

22 years agoSF patch #756996: Bare except in ZipFile.testzip()
Raymond Hettinger [Fri, 27 Jun 2003 22:25:03 +0000 (22:25 +0000)]
SF patch #756996: Bare except in ZipFile.testzip()
(Contributed by Steven Taschuk)

Replaces a bare except that caused all errors to be mis-reported as
archive errors.

Added a related NEWS item.

22 years agoSF patch #761519: Fixes for bugs 760703 and 757821
Raymond Hettinger [Fri, 27 Jun 2003 21:43:39 +0000 (21:43 +0000)]
SF patch #761519: Fixes for bugs 760703 and 757821
SF bug #760703: SocketHandler and LogRecord don't work well together
SF bug #757821: logging module docs

Applied Vinay Sajip's patch with a few minor fixups and a NEWS item.

Patched __init__.py - added new function
makeLogRecord (for bug report 760703).

Patched handlers.py - updated some docstrings and
deleted some old commented-out code.

Patched test_logging.py to make use of makeLogRecord.

Patched liblogging.tex to fill documentation gaps (both
760703 and bug 757821).

22 years agoA hack to ease compatibility with pre-2.3 Pythons: by default, doctest
Tim Peters [Fri, 27 Jun 2003 20:48:05 +0000 (20:48 +0000)]
A hack to ease compatibility with pre-2.3 Pythons:  by default, doctest
now accepts "True" when a test expects "1", and similarly for "False"
versus "0".  This is un-doctest-like, but on balance makes it much
more pleasant to write doctests that pass under 2.2 and 2.3.  I expect
it to go away again, when 2.2 is forgotten.  In the meantime, there's
a new doctest module constant that can be passed to a new optional
argument, if you want to turn this behavior off.

Note that this substitution is very simple-minded:  the expected and
actual outputs have to consist of single tokens.  No attempt is made,
e.g., to accept [True, False] when a test expects [1, 0].  This is a
simple hack for simple tests, and I intend to keep it that way.

22 years agoDo not add extra "\n" after bang line.
Gustavo Niemeyer [Fri, 27 Jun 2003 19:33:38 +0000 (19:33 +0000)]
Do not add extra "\n" after bang line.

22 years agofix typo
Fred Drake [Fri, 27 Jun 2003 19:22:11 +0000 (19:22 +0000)]
fix typo

22 years agoadd mention of -l, --listfuncs to usage() small part of 542562
Skip Montanaro [Fri, 27 Jun 2003 19:09:33 +0000 (19:09 +0000)]
add mention of -l, --listfuncs to usage()  small part of 542562

22 years agoAdd a trivial test of getargspec() with a method.
Jeremy Hylton [Fri, 27 Jun 2003 18:43:12 +0000 (18:43 +0000)]
Add a trivial test of getargspec() with a method.

22 years agoA bit o' reformatting and removal of non-_getframe currentframe().
Jeremy Hylton [Fri, 27 Jun 2003 18:41:20 +0000 (18:41 +0000)]
A bit o' reformatting and removal of non-_getframe currentframe().

22 years agoDon't assume the name of the table of contents will be contents.html;
Fred Drake [Fri, 27 Jun 2003 18:26:01 +0000 (18:26 +0000)]
Don't assume the name of the table of contents will be contents.html;
that won't be right when mkhowto is called with --numeric (as it is
for the Python Tutorial).  Save the actual name we use when we build
the table of contents, then use that in the page head metadata.  The
node2label.pl script will munge this properly when --numeric isn't
given, so this works in both cases.
Closes SF bug #761830.

22 years agoFix for SF bug 620190: getargspec() doesn't work with methods.
Jeremy Hylton [Fri, 27 Jun 2003 18:14:39 +0000 (18:14 +0000)]
Fix for SF bug 620190: getargspec() doesn't work with methods.

22 years agoAdd tests for __nonzero__() problems.
Jeremy Hylton [Fri, 27 Jun 2003 17:40:16 +0000 (17:40 +0000)]
Add tests for __nonzero__() problems.

22 years agoRequire that __nonzero__() return a bool or exactly an int.
Jeremy Hylton [Fri, 27 Jun 2003 17:38:27 +0000 (17:38 +0000)]
Require that __nonzero__() return a bool or exactly an int.

22 years agoAdd definitions of the test and testlist symbols in the grammar so
Fred Drake [Fri, 27 Jun 2003 17:12:43 +0000 (17:12 +0000)]
Add definitions of the test and testlist symbols in the grammar so
there are no gaps in the definitions.
Closes SF bug #726150.

22 years agoRevert previous checkin and just add a comment about constructor_ob.
Jeremy Hylton [Fri, 27 Jun 2003 16:58:43 +0000 (16:58 +0000)]
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.

22 years agoCheck return type of __nonzero__() method.
Jeremy Hylton [Fri, 27 Jun 2003 16:46:45 +0000 (16:46 +0000)]
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.

22 years agofix link-hovering so <a name='...'> (no href attribute) doesn't get
Fred Drake [Fri, 27 Jun 2003 16:32:27 +0000 (16:32 +0000)]
fix link-hovering so <a name='...'> (no href attribute) doesn't get
the hovering background

22 years agoFix several bugs in handling of exceptions with trace function enabled.
Jeremy Hylton [Fri, 27 Jun 2003 16:13:17 +0000 (16:13 +0000)]
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.

22 years agoSome Windows changes preparing for 2.3b2.
Tim Peters [Fri, 27 Jun 2003 15:49:35 +0000 (15:49 +0000)]
Some Windows changes preparing for 2.3b2.

22 years ago(HTML|Text)Repr.repr1: Guard against objects whos types have no __name__
Skip Montanaro [Fri, 27 Jun 2003 15:45:41 +0000 (15:45 +0000)]
(HTML|Text)Repr.repr1: Guard against objects whos types have no __name__
attribute. Patch and bug report from Geoff Talvola. Closes patch #672855.

22 years agoJacob Hallen cornered me here at EuroPython and got me to look at
Michael W. Hudson [Fri, 27 Jun 2003 12:32:39 +0000 (12:32 +0000)]
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.

22 years agoSF bug #761337: datetime.strftime fails on trivial format string
Raymond Hettinger [Fri, 27 Jun 2003 08:14:17 +0000 (08:14 +0000)]
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.

22 years ago* Markup nits for the Invoking Descriptors section
Raymond Hettinger [Fri, 27 Jun 2003 06:57:56 +0000 (06:57 +0000)]
* Markup nits for the Invoking Descriptors section
* Documented __slots__
* Documented __metaclass__

Shamelessly plagarized from Guido's tutorial.

22 years agoDon't call constructor() from pickle().
Jeremy Hylton [Thu, 26 Jun 2003 23:20:20 +0000 (23:20 +0000)]
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.

22 years agoSF patch #760792: "wo" in "word" now valid but not documented as such
Raymond Hettinger [Thu, 26 Jun 2003 19:32:10 +0000 (19:32 +0000)]
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__

22 years agoPortion of SF patch #761104. Fixes a minor docstring error.
Raymond Hettinger [Thu, 26 Jun 2003 18:49:28 +0000 (18:49 +0000)]
Portion of SF patch #761104.   Fixes a minor docstring error.
_TemporarilyImmutableSet is in fact a subclass of BaseSet

22 years ago* Fixed an unmatched parenthesis early in the text.
Raymond Hettinger [Thu, 26 Jun 2003 17:41:40 +0000 (17:41 +0000)]
* 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