]> granicus.if.org Git - python/log
python
23 years agoIMPORTANT FIX: This should definitely go into the 2.1.1 release!!!
Guido van Rossum [Tue, 10 Jul 2001 11:50:09 +0000 (11:50 +0000)]
IMPORTANT FIX: This should definitely go into the 2.1.1 release!!!

Fix various serious problems:

- The ThreadingTCPServer class and its derived classes were completely
  broken because the main thread would close the request before the
  handler thread had time to look at it.  This was introduced by
  Ping's close_request() patch.  The fix moves the close_request()
  calls to after the handler has run to completion in the BaseServer
  class and the ForkingMixIn class; when using the ThreadingMixIn,
  closing the request is the handler's responsibility.

- The ForkingUDPServer class has always been been broken because the
  socket was closed in the child before calling the handler.  I fixed
  this by simply not calling server_close() in the child at all.

- I cannot get the UnixDatagramServer class to work at all.  The
  recvfrom() call doesn't return a meaningful client address.  I added
  a comment to this effect.  Maybe it works on other Unix versions.

- The __all__ variable was missing ThreadingMixIn and ForkingMixIn.

- Bumped __version__ to "0.4".

- Added a note about the test suite (to be checked in shortly).

23 years agoinitregex(): this function is declared void, so the recent change to
Tim Peters [Mon, 9 Jul 2001 18:15:38 +0000 (18:15 +0000)]
initregex():  this function is declared void, so the recent change to
return NULL in an error case was itself an error.

23 years agoAdd a little bit more about the XML migration plan. This still needs a lot
Fred Drake [Mon, 9 Jul 2001 16:04:03 +0000 (16:04 +0000)]
Add a little bit more about the XML migration plan.  This still needs a lot
of work, but mostly it needs time spent doing the work to make the
generated XML useful.

23 years agoAdd conversion information for the grammar production support (preliminary).
Fred Drake [Mon, 9 Jul 2001 15:00:42 +0000 (15:00 +0000)]
Add conversion information for the grammar production support (preliminary).

23 years agoFix for SF bug #436525, reported by Greg Kochanski:
Thomas Wouters [Mon, 9 Jul 2001 14:35:01 +0000 (14:35 +0000)]
Fix for SF bug #436525, reported by Greg Kochanski:
The block/unblock thread macros are called 'Py_BLOCK_THREADS' and
'Py_UNBLOCK_THREADS', not 'Py_BEGIN_BLOCK_THREADS' and
'Py_BEGIN_UNBLOCK_THREADS'.

23 years agoRe-add 'advanced' xrange features, adding DeprecationWarnings as discussed
Thomas Wouters [Mon, 9 Jul 2001 12:30:54 +0000 (12:30 +0000)]
Re-add 'advanced' xrange features, adding DeprecationWarnings as discussed
on python-dev. The features will still vanish, however, just one release
later.

23 years agoinitregex(): Check return value of PyErr_Warn() and propagate the exception
Thomas Wouters [Mon, 9 Jul 2001 10:45:31 +0000 (10:45 +0000)]
initregex(): Check return value of PyErr_Warn() and propagate the exception
(if any.)

23 years agoImplemented minimal FSRef support, plus conversion between FSRefs, FSSpecs and pathna...
Jack Jansen [Sun, 8 Jul 2001 22:07:23 +0000 (22:07 +0000)]
Implemented minimal FSRef support, plus conversion between FSRefs, FSSpecs and pathnames where applicable.

PyMac_GetFSSpec and PyMac_BuildFSSpec have moved to macfsmodule from macglue.

These mods are untested on OSX.

23 years agomap re.sub() to string.replace(), when possible
Fredrik Lundh [Sun, 8 Jul 2001 13:26:57 +0000 (13:26 +0000)]
map re.sub() to string.replace(), when possible

23 years agoMove & update a comment.
Fred Drake [Sat, 7 Jul 2001 06:00:36 +0000 (06:00 +0000)]
Move & update a comment.

Add support for the \ulink macro.

23 years agoChange the way notification mails are sent so people who respond to the
Fred Drake [Fri, 6 Jul 2001 23:45:16 +0000 (23:45 +0000)]
Change the way notification mails are sent so people who respond to the
update announcements do not get bounces from trying to send mail to my
laptop, which has an identity crisis due to constant relocation.

23 years agoMore reference count information.
Fred Drake [Fri, 6 Jul 2001 23:31:49 +0000 (23:31 +0000)]
More reference count information.

23 years agoChange the grammar productions to use the new productionlist environment;
Fred Drake [Fri, 6 Jul 2001 22:49:53 +0000 (22:49 +0000)]
Change the grammar productions to use the new productionlist environment;
this supports a hyperlinked version of the grammar that can make tracking
down details and definitions a little easier.

23 years agoUpdate the description of how to start an interpreter and determine the
Fred Drake [Fri, 6 Jul 2001 22:46:52 +0000 (22:46 +0000)]
Update the description of how to start an interpreter and determine the
installation prefix and exec_prefix for Windows.

23 years agoAdd \ulink, grammar production markup.
Fred Drake [Fri, 6 Jul 2001 22:44:48 +0000 (22:44 +0000)]
Add \ulink, grammar production markup.

23 years agoAdd support for \ulink and hyperlink grammars.
Fred Drake [Fri, 6 Jul 2001 22:43:02 +0000 (22:43 +0000)]
Add support for \ulink and hyperlink grammars.

do_cmd_verbatiminput():  Write out a text file containing the content of the
    input file with a .txt extension, and add a link to it at the bottom of
    the presentation.  This easier retrieval of example source code for
    copy & paste use.

23 years agoRevise a comment about styles I don't think LaTeX2HTML can generate,
Fred Drake [Fri, 6 Jul 2001 22:37:36 +0000 (22:37 +0000)]
Revise a comment about styles I don't think LaTeX2HTML can generate,
but which came from their default stylesheet.

Add styles for the new hyperlinked grammar productions.

23 years agoAdd new material on some markup that will be checked in shortly. This
Fred Drake [Fri, 6 Jul 2001 22:34:33 +0000 (22:34 +0000)]
Add new material on some markup that will be checked in shortly.  This
includes some minor new inline markup and markup to generate hyperlinked
grammar productions.

Adopt a "style guide" document -- this beats writing our own and means
we'll have a chance at consistency, without having to make it all up
ourselves.

23 years agoPackaged versions of the HTML format need to include any .txt files that
Fred Drake [Fri, 6 Jul 2001 22:28:47 +0000 (22:28 +0000)]
Packaged versions of the HTML format need to include any .txt files that
were generated by the use of the productionlist environment or the
\verbatiminput macro.

23 years agoMore names, yay!
Fred Drake [Fri, 6 Jul 2001 22:27:04 +0000 (22:27 +0000)]
More names, yay!

23 years agoAdd entries for recently defined markup.
Fred Drake [Fri, 6 Jul 2001 21:13:51 +0000 (21:13 +0000)]
Add entries for recently defined markup.

23 years agoSimplification to mirror a better conversion specification and more
Fred Drake [Fri, 6 Jul 2001 21:03:30 +0000 (21:03 +0000)]
Simplification to mirror a better conversion specification and more
powerful latex2esis.py.

23 years agoAllow optional arguments to LaTeX macros to span lines. This is legal in
Fred Drake [Fri, 6 Jul 2001 21:01:19 +0000 (21:01 +0000)]
Allow optional arguments to LaTeX macros to span lines.  This is legal in
LaTeX and we have at least one occurance of that in the content, so this
script needs to support it as well.

23 years agobug #436596
Fredrik Lundh [Fri, 6 Jul 2001 20:56:10 +0000 (20:56 +0000)]
bug #436596

re.findall doesn't take a maxsplit argument

23 years agoOnce again, attempt to preserve $Revision$
Barry Warsaw [Fri, 6 Jul 2001 20:38:11 +0000 (20:38 +0000)]
Once again, attempt to preserve $Revision$

23 years agoFix up a few style nits -- avoid "e.g." and "i.e." -- these make
Fred Drake [Fri, 6 Jul 2001 20:30:11 +0000 (20:30 +0000)]
Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.

23 years ago(py-version): Hopefully fixed my XEmacs settings so this doesn't get
Barry Warsaw [Fri, 6 Jul 2001 20:27:29 +0000 (20:27 +0000)]
(py-version): Hopefully fixed my XEmacs settings so this doesn't get
clobbered on checkin.

23 years agoAmazing. A very subtle change in policy in descr-branch actually
Guido van Rossum [Fri, 6 Jul 2001 20:26:31 +0000 (20:26 +0000)]
Amazing.  A very subtle change in policy in descr-branch actually
found a bug here.  Here's the deal:

Class PyShell derives from class OutputWindow.  Method PyShell.close()
wants to invoke its parent method, but because PyShell long ago was
inherited from class PyShellEditorWindow, it invokes
PyShelEditorWindow.close(self).  Now, class PyShellEditorWindow itself
derives from class OutputWindow, and inherits the close() method from
there without overriding it.  Under the old rules,
PyShellEditorWindow.close would return an unbound method restricted to
the class that defined the implementation of close(), which was
OutputWindow.close.  Under the new rules, the unbound method is
restricted to the class whose method was requested, that is
PyShellEditorWindow, and this was correctly trapped as an error.

23 years agoFix up a few style nits -- avoid "e.g." and "i.e." -- these make
Fred Drake [Fri, 6 Jul 2001 20:23:02 +0000 (20:23 +0000)]
Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.

Add an index entry for the Telnet protocol.

Always refer to the protocol as Telnet instead of telnet.

23 years ago(py-continuation-offset): Update docstring to describe that this
Barry Warsaw [Fri, 6 Jul 2001 20:07:13 +0000 (20:07 +0000)]
(py-continuation-offset): Update docstring to describe that this
additional offset is only applied to continuation lines for block
opening statements.

(py-compute-indentation): Only add py-continuation-offset if
py-statement-opens-block-p is true.

23 years agoFix up a few style nits -- avoid "e.g." and "i.e." -- these make
Fred Drake [Fri, 6 Jul 2001 19:28:48 +0000 (19:28 +0000)]
Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.

23 years agoSF bug #439104: Tuple richcompares has code-typo.
Tim Peters [Fri, 6 Jul 2001 17:45:43 +0000 (17:45 +0000)]
SF bug #439104: Tuple richcompares has code-typo.
Symptom:  (1, 2, 3) <= (1, 2) returned 1.
This was already fixed in CVS for tuples, but an isomorphic error was in
the list richcompare code.

23 years agoFix up a few style nits -- avoid "e.g." and "i.e." -- these make
Fred Drake [Fri, 6 Jul 2001 17:28:39 +0000 (17:28 +0000)]
Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.

23 years agoWhen reading a continuation line, make sure we still use the transformed
Fred Drake [Fri, 6 Jul 2001 17:22:48 +0000 (17:22 +0000)]
When reading a continuation line, make sure we still use the transformed
name when filling in the internal data structures, otherwise we incorrectly
raise a KeyError.

This fixes SF bug #432369.

23 years agoExplain the exit code for the wait() method, including a reference to
Fred Drake [Fri, 6 Jul 2001 17:17:12 +0000 (17:17 +0000)]
Explain the exit code for the wait() method, including a reference to
the os.W*() functions used to interpret the return value.

This fixes SF bug #429361.

23 years agoFix up a few style nits -- avoid "e.g." and "i.e." -- these make
Fred Drake [Fri, 6 Jul 2001 06:49:32 +0000 (06:49 +0000)]
Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.

23 years agoRemoved fpectlmodule.c and fpetestmodule.c from the Windows build. They
Tim Peters [Thu, 5 Jul 2001 21:19:02 +0000 (21:19 +0000)]
Removed fpectlmodule.c and fpetestmodule.c from the Windows build.  They
weren't functional under Windows even if enabled.

23 years agoThe fpectl module does not work on Windows, so remove Windows from the
Fred Drake [Thu, 5 Jul 2001 21:17:08 +0000 (21:17 +0000)]
The fpectl module does not work on Windows, so remove Windows from the
\platform statement.

Also fix a minor style consistency nit in an example.

23 years agoFix a markup error: do not omit a method's parameter list if it is
Fred Drake [Thu, 5 Jul 2001 21:14:03 +0000 (21:14 +0000)]
Fix a markup error:  do not omit a method's parameter list if it is
empty.

23 years agoAllow underscores in tag names and quote characters in unquoted attribute
Fred Drake [Thu, 5 Jul 2001 18:21:57 +0000 (18:21 +0000)]
Allow underscores in tag names and quote characters in unquoted attribute
values.  The change for attribute values matches the way Mozilla and
Navigator view the world, at least.

This closes SF bug #436621.

23 years agoAdded more information on the differences between the htmllib and HTMLParser
Fred Drake [Thu, 5 Jul 2001 16:34:36 +0000 (16:34 +0000)]
Added more information on the differences between the htmllib and HTMLParser
modules.

23 years agoList constraints on xrange() objects.
Guido van Rossum [Thu, 5 Jul 2001 15:27:19 +0000 (15:27 +0000)]
List constraints on xrange() objects.

23 years agoRip out tests for xrange() features no longer supported.
Guido van Rossum [Thu, 5 Jul 2001 14:49:21 +0000 (14:49 +0000)]
Rip out tests for xrange() features no longer supported.

23 years agoNews about xrange().
Guido van Rossum [Thu, 5 Jul 2001 14:46:25 +0000 (14:46 +0000)]
News about xrange().

23 years agoComplete the xrange-simplification checkins: call PyRange_New() with
Guido van Rossum [Thu, 5 Jul 2001 14:44:41 +0000 (14:44 +0000)]
Complete the xrange-simplification checkins: call PyRange_New() with
fewer arguments.

23 years agoRip out the fancy behaviors of xrange that nobody uses: repeat, slice,
Guido van Rossum [Thu, 5 Jul 2001 13:27:48 +0000 (13:27 +0000)]
Rip out the fancy behaviors of xrange that nobody uses: repeat, slice,
contains, tolist(), and the start/stop/step attributes.  This includes
removing the 4th ('repeat') argument to PyRange_New().

23 years ago- minor cleanup, removed bogus comments
Just van Rossum [Thu, 5 Jul 2001 07:06:26 +0000 (07:06 +0000)]
- minor cleanup, removed bogus comments
- make method reload handle __private attrs correctly
- fixed whole word search

23 years agodon't crash when encountering bad marshal data
Just van Rossum [Thu, 5 Jul 2001 07:03:16 +0000 (07:03 +0000)]
don't crash when encountering bad marshal data

23 years agoSF bug #438295: [Windows] __init__.py cause strange behavior
Tim Peters [Thu, 5 Jul 2001 03:47:53 +0000 (03:47 +0000)]
SF bug #438295: [Windows] __init__.py cause strange behavior
Probable fix (the bug report doesn't have enough info to say for sure).
find_init_module():  Insist on a case-sensitive match for __init__ files.
Given __INIT__.PY instead, find_init_module() thought that was fine, but
the later attempt to do find_module("__INIT__.PY") didn't and its caller
silently suppressed the resulting ImportError.  Now find_init_module()
refuses to accept __INIT__.PY to begin with.
Bugfix candidate; specific to platforms with case-insensitive filesystems.

23 years agoDo conversion of CFStrings to/from unicode.
unknown [Wed, 4 Jul 2001 22:38:52 +0000 (22:38 +0000)]
Do conversion of CFStrings to/from unicode.

23 years agoSet the default 8-bit encoding based on the system script and language.
unknown [Wed, 4 Jul 2001 22:37:19 +0000 (22:37 +0000)]
Set the default 8-bit encoding based on the system script and language.

23 years agoDon't promise mac-japanese encoding as we don't have a codec for it.
unknown [Wed, 4 Jul 2001 22:36:27 +0000 (22:36 +0000)]
Don't promise mac-japanese encoding as we don't have a codec for it.
Return a reasonable name for the general macos exception (MacOS.Error).

23 years agoAdded a non-recursive implementation of conjoin(), and a Knight's Tour
unknown [Wed, 4 Jul 2001 22:11:22 +0000 (22:11 +0000)]
Added a non-recursive implementation of conjoin(), and a Knight's Tour
solver.  In conjunction, they easily found a tour of a 200x200 board:
that's 200**2 == 40,000 levels of backtracking.  Explicitly resumable
generators allow that to be coded as easily as a recursive solver (easier,
actually, because different levels can use level-customized algorithms
without pain), but without blowing the stack.  Indeed, I've never written
an exhaustive Tour solver in any language before that can handle boards so
large ("exhaustive" == guaranteed to find a solution if one exists, as
opposed to probabilistic heuristic approaches; of course, the age of the
universe may be a blip in the time needed!).

23 years agodummy checkin for testing, please ignore
unknown [Wed, 4 Jul 2001 16:52:02 +0000 (16:52 +0000)]
dummy checkin for testing, please ignore

23 years agoFix for SF bug #425868.
unknown [Wed, 4 Jul 2001 10:15:58 +0000 (10:15 +0000)]
Fix for SF bug #425868.
We should not depend on two spaces between words, so use the white
space after the to-be-encoded word only as lookahead and don't
actually consume it in the regular expression.

23 years agoClean up a bare except: clause.
unknown [Wed, 4 Jul 2001 07:07:33 +0000 (07:07 +0000)]
Clean up a bare except: clause.

23 years agoClean up a bare except: clause.
unknown [Wed, 4 Jul 2001 07:01:29 +0000 (07:01 +0000)]
Clean up a bare except: clause.

23 years agoMake the implementations of getElementsByTagName() and
Fred Drake [Wed, 4 Jul 2001 06:25:53 +0000 (06:25 +0000)]
Make the implementations of getElementsByTagName() and
getElementsByTagNameNS() consistent in form as well as functionality
(cosmetic).

23 years agoOnly write out one blank line before the request data.
Fred Drake [Wed, 4 Jul 2001 05:18:29 +0000 (05:18 +0000)]
Only write out one blank line before the request data.
This closes SF patch #419459.

23 years agoNull commit with -f option to force an uprev and put HEADs firmly on the trunk.
Kurt B. Kaiser [Wed, 4 Jul 2001 03:43:58 +0000 (03:43 +0000)]
Null commit with -f option to force an uprev and put HEADs firmly on the trunk.

23 years agoNull commit with -f option to force an uprev and put HEADs firmly on the trunk.
Kurt B. Kaiser [Wed, 4 Jul 2001 03:15:10 +0000 (03:15 +0000)]
Null commit with -f option to force an uprev and put HEADs firmly on the trunk.

23 years agoThis change adjusts the profiling/tracing support so that the common
Fred Drake [Tue, 3 Jul 2001 23:39:52 +0000 (23:39 +0000)]
This change adjusts the profiling/tracing support so that the common
path (with no profile/trace function) through eval_code2() and
eval_frame() avoids several checks.

In the common cases of calls, returns, and exception propogation,
eval_code2() and eval_frame() used to test two values in the
thread-state: the profiling function and the tracing function.  With
this change, a flag is set in the thread-state if either of these is
active, allowing a single check to suffice when both are NULL.  This
also simplifies the code needed when either function is in use but is
already active (to avoid profiling/tracing the profiler/tracer); the
flag is set to 0 when the profile/trace code is entered, allowing the
same check to suffice for "already in the tracer" for call/return/
exception events.

23 years agobug #416670
Fredrik Lundh [Tue, 3 Jul 2001 20:32:36 +0000 (20:32 +0000)]
bug #416670

added copy/deepcopy support to SRE (still not enabled, since it's not
covered by the test suite)

23 years agobug #232815
Fredrik Lundh [Tue, 3 Jul 2001 19:27:05 +0000 (19:27 +0000)]
bug #232815

ch is unsigned, so testing for negative values doesn't make
sense (as noticed by the OpenVMS compiler)

23 years agoMarked the parameters to Stats.print_*() as optional.
Fred Drake [Mon, 2 Jul 2001 21:22:39 +0000 (21:22 +0000)]
Marked the parameters to Stats.print_*() as optional.

This closes SF bug #438032.

23 years agoreapplied darryl gallion's minimizing repeat fix. I'm still not 100%
Fredrik Lundh [Mon, 2 Jul 2001 19:54:28 +0000 (19:54 +0000)]
reapplied darryl gallion's minimizing repeat fix.  I'm still not 100%
sure about this one, but test #133283 now works even with the fix in
place, and so does the test suite.  we'll see what comes up...

23 years agoAdd another name.
Fred Drake [Mon, 2 Jul 2001 17:16:07 +0000 (17:16 +0000)]
Add another name.

23 years agopythonware repository roundtrip (untabification)
Fredrik Lundh [Mon, 2 Jul 2001 17:04:48 +0000 (17:04 +0000)]
pythonware repository roundtrip (untabification)

23 years agoadded martin's BIGCHARSET patch to SRE 2.1.1. martin reports 2x
Fredrik Lundh [Mon, 2 Jul 2001 16:58:38 +0000 (16:58 +0000)]
added martin's BIGCHARSET patch to SRE 2.1.1.  martin reports 2x
speedups for certain unicode character ranges.

23 years agoAvoid using os.path.normcase() on sys.path elements; doing so causes paths
Fred Drake [Mon, 2 Jul 2001 16:55:42 +0000 (16:55 +0000)]
Avoid using os.path.normcase() on sys.path elements; doing so causes paths
to be presented in an unfamiliar case on case-preserving filesystems.

This closes SF patch #436173.

23 years agomerged with pythonware's SRE 2.1.1 codebase
Fredrik Lundh [Mon, 2 Jul 2001 16:42:49 +0000 (16:42 +0000)]
merged with pythonware's SRE 2.1.1 codebase

23 years agoAdded the new unicode defines. Not really tested yet, but Python compiles again at...
Jack Jansen [Mon, 2 Jul 2001 15:34:57 +0000 (15:34 +0000)]
Added the new unicode defines. Not really tested yet, but Python compiles again at least.

23 years agoNuke hard tabs.
Tim Peters [Mon, 2 Jul 2001 04:59:35 +0000 (04:59 +0000)]
Nuke hard tabs.

23 years agoWhitespace normalization; the plat-riscos file didn't even get by
Tim Peters [Mon, 2 Jul 2001 04:57:30 +0000 (04:57 +0000)]
Whitespace normalization; the plat-riscos file didn't even get by
tabnanny.py.

23 years agoAdd tentative 2.1.1 Windows build numbers.
Tim Peters [Mon, 2 Jul 2001 04:08:39 +0000 (04:08 +0000)]
Add tentative 2.1.1 Windows build numbers.

23 years agoA clever union-find implementation from c.l.py, due to David Eppstein.
Tim Peters [Mon, 2 Jul 2001 01:38:33 +0000 (01:38 +0000)]
A clever union-find implementation from c.l.py, due to David Eppstein.
This is another one that leaks memory without an explict clear!  Time to
bite this bullet.

23 years agoAdded WeakLink...Generator classes (should have done that ages ago). These check...
Jack Jansen [Sun, 1 Jul 2001 22:09:29 +0000 (22:09 +0000)]
Added WeakLink...Generator classes (should have done that ages ago). These check the c-function pointer for being NULL before calling it and raise UnimplementedError if it is.

This allows system libs to be weak-linked, thereby allowing us to generate functions that are only available on some OS versions without getting a NULL dereference if the function isn't available.

23 years ago- Use weaklink generators so we can support OSX-only calls without crashing on OS9.
Jack Jansen [Sun, 1 Jul 2001 22:04:02 +0000 (22:04 +0000)]
- Use weaklink generators so we can support OSX-only calls without crashing on OS9.
- Convert CFString to/from Python strings. Currently always MacRoman, to be fixed later (as is unicode support). Python->CFString conversion is automatic.

23 years agoDerive an industrial-strength conjoin() via cross-recursion loop unrolling,
Tim Peters [Sat, 30 Jun 2001 07:29:44 +0000 (07:29 +0000)]
Derive an industrial-strength conjoin() via cross-recursion loop unrolling,
and fiddle the conjoin tests to exercise all the new possible paths.

23 years agoTurns out Neil didn't intend for *all* of his gen-branch work to get
Tim Peters [Fri, 29 Jun 2001 23:51:08 +0000 (23:51 +0000)]
Turns out Neil didn't intend for *all* of his gen-branch work to get
committed.

tokenize.py:  I like these changes, and have tested them extensively
without even realizing it, so I just updated the docstring and the docs.

tabnanny.py:  Also liked this, but did a little code fiddling.  I should
really rewrite this to *exploit* generators, but that's near the bottom
of my effort/benefit scale so doubt I'll get to it anytime soon (it
would be most useful as a non-trivial example of ideal use of generators;
but test_generators.py has already grown plenty of food-for-thought
examples).

inspect.py:  I'm sure Ping intended for this to continue running even
under 1.5.2, so I reverted this to the last pre-gen-branch version.  The
"bugfix" I checked in in-between was actually repairing a bug *introduced*
by the conversion to generators, so it's OK that the reverted version
doesn't reflect that checkin.

23 years agoUse the more conventional "self" as the name of the self parameter in an
Fred Drake [Fri, 29 Jun 2001 17:50:57 +0000 (17:50 +0000)]
Use the more conventional "self" as the name of the self parameter in an
example.  It actually confused a reader.

23 years agoCorrect a markup error for an accented character.
Fred Drake [Fri, 29 Jun 2001 16:25:07 +0000 (16:25 +0000)]
Correct a markup error for an accented character.

Reported by Milan Zamazal <pdm@zamazal.org>.

23 years agoRemoved some stray periods, and fix up a number of visible markup
Fred Drake [Fri, 29 Jun 2001 16:21:47 +0000 (16:21 +0000)]
Removed some stray periods, and fix up a number of visible markup
consistency errors (mostly omitted "()" at the end of function and
method names).

Reported by Milan Zamazal <pdm@zamazal.org>.

23 years agoTwo more names.
Fred Drake [Fri, 29 Jun 2001 15:42:20 +0000 (15:42 +0000)]
Two more names.

23 years agoSourceForge bug #437041:
Fred Drake [Fri, 29 Jun 2001 15:39:53 +0000 (15:39 +0000)]
SourceForge bug #437041:
Use a portable format in the example that creates a timestamp suitable for
use in email, also updating it and the footnote from RFC 822 to RFC 2822.

23 years agoSimplify an example based on comment from Thomas Holenstein <thomas@hex.ch>:
Fred Drake [Fri, 29 Jun 2001 14:59:01 +0000 (14:59 +0000)]
Simplify an example based on comment from Thomas Holenstein <thomas@hex.ch>:
Do not use an extra flag variable to test only once in one subsequent if
statement.

23 years agoSolve SF bug #231249: cgi.py opens too many (temporary) files.
Guido van Rossum [Fri, 29 Jun 2001 13:06:06 +0000 (13:06 +0000)]
Solve SF bug #231249: cgi.py opens too many (temporary) files.

class FieldStorage: this patch changes read_lines() and co. to use a
StringIO() instead of a real file.  The write() calls are redirected
to a private method that replaces it with a real, external file only
when it gets too big (> 1000 bytes).

This avoids problems in forms using the multipart/form-data encoding
with many fields.  The original code created a temporary file for
*every* field (not just for file upload fields), thereby sometimes
exceeding the open file limit of some systems.

Note that the simpler solution "use a real file only for file uploads"
can't be used because the form field parser has no way to tell which
fields correspond to file uploads.

It's *possible* but extremely unlikely that this would break someone's
code; they would have to be stepping way outside the documented
interface for FieldStorage and use f.file.fileno(), or depend on
overriding make_file() to return a file-like object with additional
known properties.

23 years agoAdded a simple but general backtracking generator (conjoin), and a couple
Tim Peters [Fri, 29 Jun 2001 02:41:16 +0000 (02:41 +0000)]
Added a simple but general backtracking generator (conjoin), and a couple
examples of use.  These poke stuff not specifically targeted before, incl.
recursive local generators relying on nested scopes, ditto but also
inside class methods and rebinding instance vars, and anonymous
partially-evaluated generators (the N-Queens solver creates a different
column-generator for each row -- AFAIK this is my invention, and it's
really pretty <wink>).  No problems, not even a new leak.

23 years agoAdded CFURL support, and got base chaining to really work.
Jack Jansen [Thu, 28 Jun 2001 22:08:26 +0000 (22:08 +0000)]
Added CFURL support, and got base chaining to really work.

23 years agoMake basechain a class variable in stead of initializing it in __init__. That way...
Jack Jansen [Thu, 28 Jun 2001 22:07:30 +0000 (22:07 +0000)]
Make basechain a class variable in stead of initializing it in __init__. That way it's more easily overridden.

23 years agoAnother "if 0:" hack, this time to complain about otherwise invisible
Tim Peters [Thu, 28 Jun 2001 01:52:22 +0000 (01:52 +0000)]
Another "if 0:" hack, this time to complain about otherwise invisible
"return expr" instances in generators (which latter may be generators
due to otherwise invisible "yield" stmts hiding in "if 0" blocks).
This was fun the first time, but this has gotten truly ugly now.

23 years agoremoved "register const" from scalar arguments to the unicode
Fredrik Lundh [Wed, 27 Jun 2001 22:08:26 +0000 (22:08 +0000)]
removed "register const" from scalar arguments to the unicode
predicates

23 years agoCFArray, CFData and CFDictonary are now covered, but mainly opaque.
Jack Jansen [Wed, 27 Jun 2001 22:00:55 +0000 (22:00 +0000)]
CFArray, CFData and CFDictonary are now covered, but mainly opaque.
CFStrings are in better shape, but Unicode support and automatic conversion to/from Python strings remains to be done.

23 years agoAdded a couple more types that Apple has taken a fancy to.
Jack Jansen [Wed, 27 Jun 2001 21:58:40 +0000 (21:58 +0000)]
Added a couple more types that Apple has taken a fancy to.

23 years agoAdd more items that need to be written about
Andrew M. Kuchling [Wed, 27 Jun 2001 20:32:12 +0000 (20:32 +0000)]
Add more items that need to be written about

23 years agoDefault to ucs2 when no argument to --enable-unicode is specified.
Martin v. Löwis [Wed, 27 Jun 2001 20:22:04 +0000 (20:22 +0000)]
Default to ucs2 when no argument to --enable-unicode is specified.

23 years agomake wchar_t usable again on Windows (this enables the MBCS codecs)
Fredrik Lundh [Wed, 27 Jun 2001 19:49:17 +0000 (19:49 +0000)]
make wchar_t usable again on Windows (this enables the MBCS codecs)

23 years agoRevise the interface to the profiling and tracing support for the
Fred Drake [Wed, 27 Jun 2001 19:19:46 +0000 (19:19 +0000)]
Revise the interface to the profiling and tracing support for the
Python interpreter.

This change adds two new C-level APIs:  PyEval_SetProfile() and
PyEval_SetTrace().  These can be used to install profile and trace
functions implemented in C, which can operate at much higher speeds
than Python-based functions.  The overhead for calling a C-based
profile function is a very small fraction of a percent of the overhead
involved in calling a Python-based function.

The machinery required to call a Python-based profile or trace
function been moved to sysmodule.c, where sys.setprofile() and
sys.setprofile() simply become users of the new interface.

As a side effect, SF bug #436058 is fixed; there is no longer a
_PyTrace_Init() function to declare.

23 years agoRevise the interface to the profiling and tracing support for the
Fred Drake [Wed, 27 Jun 2001 19:18:03 +0000 (19:18 +0000)]
Revise the interface to the profiling and tracing support for the
Python interpreter.

This change adds two new C-level APIs:  PyEval_SetProfile() and
PyEval_SetTrace().  These can be used to install profile and trace
functions implemented in C, which can operate at much higher speeds
than Python-based functions.  The overhead for calling a C-based
profile function is a very small fraction of a percent of the overhead
involved in calling a Python-based function.

The machinery required to call a Python-based profile or trace
function been moved to sysmodule.c, where sys.setprofile() and
sys.setprofile() simply become users of the new interface.

23 years agouse Py_UNICODE_WIDE instead of USE_UCS4_STORAGE and Py_UNICODE_SIZE
Fredrik Lundh [Wed, 27 Jun 2001 18:59:43 +0000 (18:59 +0000)]
use Py_UNICODE_WIDE instead of USE_UCS4_STORAGE and Py_UNICODE_SIZE
tests.