Wrote section on nested scopes, and moved it to the front
Began a section on weak references
Various rewrites and paragraph refills
Added: non-recursive makefiles, repr() of strings now uses \n, raw socket I/O
Bumped version number
Jeremy Hylton [Fri, 2 Feb 2001 20:06:28 +0000 (20:06 +0000)]
Fix spelling errors.
Add note about _symtable.
Add note that 'from ... import *' restriction may go away -- and move
the whole entry closer to the top, because it might bite people.
Barry Warsaw [Fri, 2 Feb 2001 19:12:16 +0000 (19:12 +0000)]
Steve Majewski's patch #103495, MatchFilename() and find_module()
patch for case-preserving HFS+ suport. Untested except to verify that
it builds and doesn't break anything on Linux RH6.1.
Jeremy Hylton [Fri, 2 Feb 2001 18:19:15 +0000 (18:19 +0000)]
Move a bunch of definitions that were internal to compile.c to
symtable.h, so that they can be used by external module.
Improve error handling in symtable_enter_scope(), which return an
error code that went unchecked by most callers. XXX The error handling
in symtable code is sloppy in general.
Modify symtable to record the line number that begins each scope.
This can help to identify which code block is being referred to when
multiple blocks are bound to the same name.
Add st_scopes dict that is used to preserve scope info when
PyNode_CompileSymtable() is called. Otherwise, this information is
tossed as soon as it is no longer needed.
Add Py_SymtableString() to pythonrun; analogous to Py_CompileString().
Fred Drake [Fri, 2 Feb 2001 18:17:30 +0000 (18:17 +0000)]
Use a type flag to determine the applicability of the tp_weaklistoffset
field. This should avoid binary incompatibility problems with older modules
that have not been recompiled.
Jeremy Hylton [Fri, 2 Feb 2001 18:12:16 +0000 (18:12 +0000)]
Undo recent exclusion of test_fork1 and test_zlib. These tests don't
trigger my arbitrary exlusion rule, which is: takes more than 10
seconds of wall clock time on my machine. If these tests are going to
be skipped, then a boatload of slower tests should be skipped, too.
Fred Drake [Fri, 2 Feb 2001 03:51:05 +0000 (03:51 +0000)]
Adjustments to the text of the UnixMailbox description. Added
PortableUnixMailbox as a separate class as well (this also generates
the right index entry).
Jeremy Hylton [Fri, 2 Feb 2001 03:23:09 +0000 (03:23 +0000)]
SF patch 101137 from Grant Edwards
Adds support for raw packets (AF_PACKET) under Linux. I haven't
tested this code thoroughly; it compiles and the basic calls all work
without crashing. Not sure what to actually do with raw sockets though.
Not sure what other platforms this might be useful for.
Fred Drake [Fri, 2 Feb 2001 02:51:21 +0000 (02:51 +0000)]
The socket constants have been moved to the socket module for a long time;
the standard library does not use the SOCKET module any more, and it is
not defined for all platforms (Windows, in particular).
Barry Warsaw [Thu, 1 Feb 2001 21:31:58 +0000 (21:31 +0000)]
Special case around some of the nastier annoyances with the type-in
fields. You can now backspace out the 0 in 0x0, and you can clear the
field when in decimal mode. There are still some oddities about
typing into these fields, but it should be much less annoying. The
real solution is to ditch the update-while-typing "feature".
Barry Warsaw [Thu, 1 Feb 2001 20:52:08 +0000 (20:52 +0000)]
Move the "from Tkinter import *" out of the method and into the module
scope (still inside the __name__=='__main__' guard). Necessitated by
recent addition of nested scopes.
Jeremy Hylton [Thu, 1 Feb 2001 20:20:45 +0000 (20:20 +0000)]
Undo recent change that banned using import to bind a global, as per
discussion on python-dev. 'from mod import *' is still banned except
at the module level.
Fix value for special NOOPT entry in symtable. Initialze to 0 instead
of None, so that later uses of PyInt_AS_LONG() are valid. (Bug
reported by Donn Cave.)
replace local REPR macros with PyObject_REPR in object.h
Tim Peters [Thu, 1 Feb 2001 04:59:18 +0000 (04:59 +0000)]
Change random.seed() so that it can get at the full range of possible
internal states. Put the old .seed() (which could only get at about
the square root of the # of possibilities) under the new name .whseed(),
for bit-level compatibility with older versions. This occurred to me
while reviewing effbot's book (he found himself stumbling over .seed()
more than once there ...).
Barry Warsaw [Wed, 31 Jan 2001 22:51:35 +0000 (22:51 +0000)]
Long ago, Guido suggested that I add this to the standard library.
I'm now checking it in. I need to write some documentation for it,
but I don't have time right now. Still, I wanted to get this into
2.1a2.
# Overview:
#
# This file implements the minimal SMTP protocol as defined in RFC 821. It
# has a hierarchy of classes which implement the backend functionality for the
# smtpd. A number of classes are provided:
#
# SMTPServer - the base class for the backend. Raises an UnimplementedError
# if you try to use it.
#
# DebuggingServer - simply prints each message it receives on stdout.
#
# PureProxy - Proxies all messages to a real smtpd which does final
# delivery. One known problem with this class is that it doesn't handle
# SMTP errors from the backend server at all. This should be fixed
# (contributions are welcome!).
#
# MailmanProxy - An experimental hack to work with GNU Mailman
# <www.list.org>. Using this server as your real incoming smtpd, your
# mailhost will automatically recognize and accept mail destined to Mailman
# lists when those lists are created. Every message not destined for a list
# gets forwarded to a real backend smtpd, as with PureProxy. Again, errors
# are not handled correctly yet.
Barry Warsaw [Wed, 31 Jan 2001 22:14:01 +0000 (22:14 +0000)]
Document the two changes to the mailbox.py module:
- All constructors grow an optional argument `factory' which is a
callable used when new message instances are created by the next()
methods. Defaults to the rfc822.Message class.
- A new subclass of UnixMailbox is added, called PortableUnixMailbox.
It's identical to UnixMailbox, but uses a more portable test for
From_ delimiter lines. With PortableUnixMailbox, any line that
starts with "From " is considered a delimiter (this should really
check for two newlines before the F, but it doesn't.
Barry Warsaw [Wed, 31 Jan 2001 22:13:15 +0000 (22:13 +0000)]
Two changes:
- All constructors grow an optional argument `factory' which is a
callable used when new message instances are created by the next()
methods. Defaults to the rfc822.Message class.
- A new subclass of UnixMailbox is added, called PortableUnixMailbox.
It's identical to UnixMailbox, but uses a more portable test for
From_ delimiter lines. With PortableUnixMailbox, any line that
starts with "From " is considered a delimiter (this should really
check for two newlines before the F, but it doesn't.
Mark Hammond [Wed, 31 Jan 2001 10:28:03 +0000 (10:28 +0000)]
Fix [ Bug #129293 ] zlib library used for binary win32 distribution can crash
This involves changing the zlib build process to build zlib itself from sources, then use that library. Also updated are the comments to reflect the new official home of zlib, and add Windows specific notes regarding the build process.
Mark Hammond [Wed, 31 Jan 2001 07:30:29 +0000 (07:30 +0000)]
Partial fix to [ Bug #128685 ] popen on Win9x isnt smart enough about finding w9xpopen.exe.
"Partial" as the code uses sys.prefix in an attempt to locate 'w9xpopen.exe', but sys.prefix is not set if Python can't find it itself. So this _still_ fails in Pythonwin, but I am committing the patch for 2 reasons:
* Embedded apps that set sys.prefix or use PYTHONHOME will work
* The exception raised on failure to find the executable is far more obvious
Tim Peters [Wed, 31 Jan 2001 01:16:47 +0000 (01:16 +0000)]
SF bug #130532: newest CVS won't build on AIX.
Removed illegal redefinition of REPR macro; kept the one with the
argument name that isn't too easy to confuse with zero <wink>.
Jeremy Hylton [Tue, 30 Jan 2001 01:24:43 +0000 (01:24 +0000)]
Enforce two illegal import statements that were outlawed in the
reference manual but not checked: Names bound by import statemants may
not occur in global statements in the same scope. The from ... import *
form may only occur in a module scope.
I guess these changes could break code, but the reference manual
warned about them.
Several other small changes
If a variable is declared global in the nearest enclosing scope of a
free variable, then treat it is a global in the nested scope too.
Get rid of com_mangle and symtable_mangle functions and call mangle
directly.
If errors occur during symtable table creation, return -1 from
symtable_build().
Do not increment st_errors in assignment to lambda, because exception
is not set.
Add extra argument to symtable_assign(); the argument, flag, is ORed
with DEF_LOCAL for each symtable_add_def() call.