Fred Drake [Thu, 19 Jul 2001 03:46:26 +0000 (03:46 +0000)]
Remove some false comments.
Reorganize so the initialization sequences does not bite us in the foot.
(There is no good reason to discard classes that clients may want to
subclass.)
Fred Drake [Wed, 18 Jul 2001 21:17:29 +0000 (21:17 +0000)]
Look to the future: bump the version number.
Do more to ensure we don't do any more formatting than we need to.
Use separate targets for the distribution packages for paper-based and
non-paper-based formats; this avoids some extra packaging when a complete
distribution is being built with both paper sizes.
Tim Peters [Wed, 18 Jul 2001 20:47:31 +0000 (20:47 +0000)]
SF bug #442520: test_struct fails on SPARC.
The ob_sval member of a string object isn't necessarily aligned to better
than a native long, so the new "q" and "Q" struct codes can't get away w/
casting tricks on platforms where LONG_LONG requires stricter-than-long
alignment. After I thought of a few elaborate workarounds, Guido bashed
me over the head with the obvious memcpy approach, herewith implemented.
If the user's environment has set the BROWSER environment variable (as Gnome
seems to do), the user may not be aware of its contents. Attempt to add any
to _browsers.
Fred Drake [Wed, 18 Jul 2001 18:32:38 +0000 (18:32 +0000)]
Change the command lines to use a similar "phrasing" to that used in the
other documentation makefiles. This is probably not sufficient to run
the conversion on Windows, but goes at least part way.
Fred Drake [Wed, 18 Jul 2001 17:52:58 +0000 (17:52 +0000)]
"Make small changes, but carry a big diff."
Minor local consistency adjustments.
A couple of small tweaks to the setdlopenflags() description.
For setprofile() and settrace(), convert some references to become
hyperlinks in the HTML version.
Fred Drake [Tue, 17 Jul 2001 20:52:51 +0000 (20:52 +0000)]
Start of a test suite for the "os" module -- this only tests the temporary
file management functions that have just been made available on more
platforms.
Jack Jansen [Tue, 17 Jul 2001 20:47:13 +0000 (20:47 +0000)]
Used an adapted MethodGenerator to generate methods too for functions that have the object as the second arg after a first CFAllocatorRef arg (which we pass as NULL always anyway).
Fred Drake [Tue, 17 Jul 2001 19:48:30 +0000 (19:48 +0000)]
Adding what's done of the documentation for the new profiling &
tracing interface. Incomplete, but better to check it in since I've
been including it in my updates.
Fred Drake [Tue, 17 Jul 2001 19:32:05 +0000 (19:32 +0000)]
The syntax trees handled by this module are not "abstract," so take the
"A" out of the internal abbreviations. For published functions with
"ast" in their names, make alternate offerings using just "st".
Add a really stupid warning about 'yield' used as an identifier.
This is really stupid because it cannot be suppressed or altered using
the warning framework; that's because the warning framework is built
on Python interpreter internals, and the parser generator doesn't have
access to any of those (you cannot use anything of type PyObject * in
the parser).
But it's better than nothing, and implementing a proper check for this
appears to require modifying compile.c in a dozen places, for which I
don't have the stamina today. I promise we'll do better in 2.2a2.
At least it tells you the filename and line number (unlike the first
hack I considered :-).
Fred Drake [Tue, 17 Jul 2001 16:48:55 +0000 (16:48 +0000)]
Make the syntax for compound command lines more portable (nmake, CygWin).
This is probably not sufficient by itself for the info generation, and is
being done mostly to keep the style consistent with additional patches
that will be applied to Doc/Makefile.
Fred Drake [Tue, 17 Jul 2001 16:46:14 +0000 (16:46 +0000)]
Script to re-write @FOO@-style marks with values, initializing the
replacement for @DATE@ from a TeX file containing a \date{...} mark
(such as texinputs/boilerplate.tex).
This will be used to re-write the html/index.html.in file instead of
a combination of grep, date, and sed -- this is more portable to non-Unix
platforms.
This solves part of the problem reported in SF patch #429611, but does
not use the suggested patch.
Fred Drake [Tue, 17 Jul 2001 14:46:09 +0000 (14:46 +0000)]
Job.__init__(): Only create the builddir directory if it will be used (by
building the HTML or text documentation). There is no need to create
it for other formats.
Job.build_html(): The builddir parameter is always passed in, so it need
not be optional.
Fred Drake [Tue, 17 Jul 2001 05:17:58 +0000 (05:17 +0000)]
Fix a couple of minor markup nits.
Footnotes should be added *after* punctuation, not before.
(Yes, this should be merged with the descr branch. Sorry, Tim!)
-c cmd run the command in a shell
-d enable the debugger
-i open an interactive shell
-i file(s) open a shell and also an editor window for each file
-r script run a file as a script in a shell
-s run $IDLESTARTUP or $PYTHONSTARTUP before anything else
-t title set title of shell window
Remaining arguments are applied to the command (-c) or script (-r).
******************
idles: Removed the idles script, not needed
******************
idle: Removed the IdleConf references, not required anymore
Barry Warsaw [Mon, 16 Jul 2001 20:44:16 +0000 (20:44 +0000)]
test_basic(): Add a test for "person@dom.ain (User J. Person)" which
was already correctly parsed (contrary to a comment in Mailman).
test_rfc2822_phrases(): RFC 2822 now requires that we allow `.' in
phrases, which means we must accept dots in unquoted realname parts.
Add a test to check the change in rfc822.py 1.58.
Barry Warsaw [Mon, 16 Jul 2001 20:40:35 +0000 (20:40 +0000)]
Fix address parsing to be RFC 2822 conformant. Specifically, dots are
now allowed in unquoted RealName areas (technically, they are defined
as "obsolete syntax" we MUST accept in phrases, as part of the
obs-phrase production). Thus, parsing
To: User J. Person <person@dom.ain>
correctly returns "User J. Person" as the RealName.
AddrlistClass.__init__(): Add definition of self.phraseends which is
just self.atomends with `.' removed.
getatom(): Add an optional argument `atomends' which, if None (the
default) means use self.atomends.
getphraselist(): Pass self.phraseends to getatom() and break out of
the loop only when the current character is in phraseends instead of
atomends. This allows dots to continue to serve as atom delimiters in
all contexts except phrases.
Also, loads of docstring updates to document RFC 2822 conformance
(sorry, this should have been two separate patches).
Thomas Wouters [Mon, 16 Jul 2001 15:47:36 +0000 (15:47 +0000)]
Fix SF #441664: Python crash on del of a slice of a mmap
Check for slice/item deletion, which calls slice/item assignment with a NULL
value, and raise a TypeError instead of coredumping. Bugreport and suggested
fix by Alex Martelli.
Kurt B. Kaiser [Mon, 16 Jul 2001 07:08:20 +0000 (07:08 +0000)]
Added installation instructions.
Added a patch which modifies idlefork so that it can co-exist with
"official" IDLE in the site-packages directory. This patch is not
necessary if only idlefork IDLE is installed. See INSTALLATION for further
details.
Kurt B. Kaiser [Mon, 16 Jul 2001 05:50:45 +0000 (05:50 +0000)]
Add a script "idles" which opens a Python Shell window.
The default behaviour of idlefork idle is to open an editor window instead
of a shell. Complex expressions may be run in a fresh environment by
selecting "run". There are times, however, when a shell is desired.
Though one can be started by "idle -t 'foo'", this script is more
convenient. In addition, a shell and an editor window can be started
in parallel by "idles -e foo.py".
Tim Peters [Mon, 16 Jul 2001 05:37:24 +0000 (05:37 +0000)]
Ugly. A pile of new xxxFlags() functions, to communicate to the parser
that 'yield' is a keyword. This doesn't help test_generators at all! I
don't know why not. These things do work now (and didn't before this
patch):
1. "from __future__ import generators" now works in a native shell.
2. Similarly "python -i xxx.py" now has generators enabled in the
shell if xxx.py had them enabled.
3. This program (which was my doctest proxy) works fine:
from __future__ import generators
source = """\
def f():
yield 1
"""
exec compile(source, "", "single") in globals()
print type(f())
Kurt B. Kaiser [Mon, 16 Jul 2001 04:00:10 +0000 (04:00 +0000)]
Add a script "idles" which opens a Python Shell window.
The default behaviour of idlefork idle is to open an editor window instead
of a shell. Complex expressions may be run in a fresh environment by
selecting "run". There are times, however, when a shell is desired.
Though one can be started by "idle -t 'foo'", this script is more
convenient. In addition, a shell and an editor window can be started
in parallel by "idles -e foo.py".
Tim Peters [Mon, 16 Jul 2001 02:29:45 +0000 (02:29 +0000)]
Part way to allowing "from __future__ import generators" to communicate
that info to code dynamically compiled *by* code compiled with generators
enabled. Doesn't yet work because there's still no way to tell the parser
that "yield" is OK (unlike nested_scopes, the parser has its fingers in
this too).
Replaced PyEval_GetNestedScopes by a more-general
PyEval_MergeCompilerFlags. Perhaps I should not have? I doubted it was
*intended* to be part of the public API, so just did.
Preliminary support for "from __future__ import generators" to enable
the yield statement. I figure we have to have this in before I can
release 2.2a1 on Wednesday.
Note: test_generators is currently broken, I'm counting on Tim to fix
this.