Fred Drake [Wed, 29 May 2002 19:40:36 +0000 (19:40 +0000)]
Minor cleanup:
- Add comment explaining the structure of the stack.
- Minor optimization: make stack tuple directly usable as part of return
value for enter/exit events.
Neil Schemenauer [Wed, 29 May 2002 18:19:14 +0000 (18:19 +0000)]
The logreader object did not always refill the input buffer correctly
and got confused by certain log files. Remove logreader_refill and the
associated logic and replace with fgetc.
Neal Norwitz [Wed, 29 May 2002 15:54:55 +0000 (15:54 +0000)]
As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.
Guido van Rossum [Tue, 28 May 2002 18:49:03 +0000 (18:49 +0000)]
Importing Charset should not fail when Unicode is disabled. (XXX
Using Unicode-aware methods may still die with a NameError on unicode.
Maybe there's a more elegant solution but I doubt anybody cares.)
Guido van Rossum [Tue, 28 May 2002 18:47:29 +0000 (18:47 +0000)]
Accept u"..." literals even when Unicode is disabled. But these
literals must not contain \u, \U or \N escapes. (XXX Should they also
not contain non-ASCII characters?)
Jack Jansen [Tue, 28 May 2002 10:58:19 +0000 (10:58 +0000)]
File modes in filedescr entries are also passed to Python, so we now put "U"
in there, and convert it to "rb" (or "r" for non-universal-newline builds)
before passing it to fopen().
Christian Tismer [Tue, 28 May 2002 08:04:00 +0000 (08:04 +0000)]
This is a Python 2.1 and 2.2 bugfix candidate:
(or how do I "mark" something to be a candidate?)
fixed an old buglet that caused bdb to be unable to
continue in the botframe, after a breakpoint was set.
the key idea is not to set botframe to the bottom level frame,
but its f_back, which actually might be None.
Additional changes: migrated old exception trick to use
sys._getframe(), which exists both in 2.1 and 2.2 .
Note: I believe Mark Hammond needs to look over his code now.
F5 correctly starts up in the debugger, but later on doesn't stop at a given
breakpoint any longer.
Guido van Rossum [Fri, 24 May 2002 21:40:08 +0000 (21:40 +0000)]
Fix for SF bug 551412. When _PyType_Lookup() is called on a type
whose tp_mro hasn't been initialized, it would dump core. Fix this by
checking for NULL and calling PyType_Ready(). Will fix this in 2.2.1
too.
Guido van Rossum [Fri, 24 May 2002 19:01:59 +0000 (19:01 +0000)]
- A new type object, 'string', is added. This is a common base type
for 'str' and 'unicode', and can be used instead of
types.StringTypes, e.g. to test whether something is "a string":
isinstance(x, string) is True for Unicode and 8-bit strings. This
is an abstract base class and cannot be instantiated directly.
Guido van Rossum [Fri, 24 May 2002 15:47:06 +0000 (15:47 +0000)]
Disambiguate the grammar for backtick.
The old syntax suggested that a trailing comma was OK inside backticks,
but in fact (due to ideosyncrasies of pgen) it was not. Fix the grammar
to avoid the ambiguity. Fred: you may want to update the refman.
Barry Warsaw [Thu, 23 May 2002 19:42:16 +0000 (19:42 +0000)]
(py-goto-statement-below): Watch out for landing in a triple quoted
string with text in column zero. Skip that stuff when looking for the
"first statement following the statement containing point".
Fred Drake [Thu, 23 May 2002 17:59:16 +0000 (17:59 +0000)]
Use Perl function prototypes to help avoid definition/usage mismatches
while modifying these files.
Minor style changes to make the use of "my" with arrays more consistent.
Neal Norwitz [Wed, 22 May 2002 23:19:17 +0000 (23:19 +0000)]
Closes: #556025 seg fault when doing list(xrange(1e9))
A MemoryError is now raised when the list cannot be created.
There is a test, but as the comment says, it really only
works for 32 bit systems. I don't know how to improve
the test for other systems (ie, 64 bit or systems
where the data size != addressable size,
e.g. 64 bit data, but 48 bit addressable memory)
mwh wrote:
> Jason, feel free to complain if you think this isn't
> the right thing to do.
I guess that I would like to complain and reopen this
issue. :,) I cannot build a Python 2.2.1 with threads
under Cygwin without this patch even though I'm using
Michael's static _socket workaround. This is due to the
Cygwin fork() problem with DLL base address conflicts
that are triggered by importing many modules during the
setup.py run. Similar problems can also be caused by
regrtest.py.
Even after my rebase patch is accepted into Cygwin's
setup.exe, I feel this patch will still be necessary.
This is because during the build process, the shared
extensions (i.e., DLLs) will not be rebased yet. Hence,
the potential for DLL base address conflicts will exist.
One way to obviate this patch is to push the rebase
functionality into Cygwin's ld. Unfortunately, I don't
think this is likely to happen. Another possible way,
is to use the yet to be defined and implemented unload
module functionality:
Jack Jansen [Wed, 22 May 2002 15:02:08 +0000 (15:02 +0000)]
Allow the script to have not only a TEXT filetype but also a null filetype (to enable files to be created from the Unix side of OSX to be droppable on the MacPython interpreter).
Guido van Rossum [Tue, 21 May 2002 20:56:15 +0000 (20:56 +0000)]
In both spilldata() functions, pretend that the docstring for
non-callable objects is always None. This makes for less confusing
output and fixes the problem reported in SF patch #550290.
Barry Warsaw [Tue, 21 May 2002 19:46:13 +0000 (19:46 +0000)]
Message.getaddrlist(): Use the AddressList.addresslist attribute
instead of calling the getaddrlist() method, since the latter doesn't
work with multiple calls (it will return the empty list for the second
and subsequent calls).
Fred Drake [Tue, 21 May 2002 03:49:00 +0000 (03:49 +0000)]
Munge the RCS keywords to avoid updates, so the version number matches that
of the PyUNIT version of the same file. This helps people understand that
this version is the same as the version from the independent PyUNIT
release (confusion was indicated on the PyUNIT mailing list).
Barry Warsaw [Sun, 19 May 2002 23:51:50 +0000 (23:51 +0000)]
I've thought about it some more, and I believe it is proper for the
email package's Parser to handle the three common line endings.
Certain protocols such as IMAP define CRLF line endings and it doesn't
make sense for the client app to have to normalize the line endings
before handing it message off to the Parser.
_parsebody(): Be more flexible in the matching of line endings for
finding the MIME separators. Accept any of \r, \n and \r\n. Note
that we do /not/ change the line endings in the payloads, we just
accept any of those three around MIME boundaries.
Barry Warsaw [Sun, 19 May 2002 23:47:53 +0000 (23:47 +0000)]
Fixed a bug in the splitting of lines, and improved the splitting for
single byte character sets. Also fixed a semantic problem with the
constructor's default arguments. Specifically,
__init__(): Change the maxlinelen argument default to None instead of
MAXLINELEN. The semantics should have been (and now are) that if
maxlinelen is given it is always honored. If it isn't given, but
header_name is given, then the maximum line length is calculated. If
neither are given then the default 76 characters is used.
_split(): If the character set is a single byte character set then we
can split the line at the maxlinelen because we know that encoding the
header won't increase its length. If the charset isn't a single byte
charset then we use the quicker divide-and-conquer line splitting
algorithm as before.
Barry Warsaw [Sun, 19 May 2002 23:44:19 +0000 (23:44 +0000)]
Complete a merge of the mimelib project and the Python cvs codebases
for the email package. The former is now just a shell project that
has some extra files for packaging for independent use (e.g. setup.py
and README).
Added a compatibility layer so that the same API can be used in Python
2.1 and 2.2/2.3 with the major differences shuffled off into helper
modules (_compat21.py and _compat22.py).
Also bumped the package version number to 2.0.3 for some fixes to be
checked in momentarily.
This patch removes a vestige part of the Cygwin make rules
that didn't quite make it over during the flattening of the
Makefiles. In its current form, it creates a def file but
incorrectly calls it libpython$(VERSION).dll.a which
immediately gets overwritten by the next command.
Obviously, this is useless. It appears, it was useless
in the old nested Makefile structure too. :,)