Patch #712317: In URLs such as http://www.example.com?query=spam, treat '?' as
a delimiter. Previously, the 'network location' (<authority> in RFC 2396) would
become 'www.example.com?query=spam', while RFC 2396 does not allow a '?' in
<authority>. See bug #548176 for further discussion.
* In the documentation for createDocument(), it is now stated that the Python
DOM API allows implementations to forego creation of the document element
child node, if no namespace and local name arguments are given. (This
possibility is left open and unaddressed in the W3C spec).
* Addition by me: use 'name' rather than 'attname', for consistency with the
DOM specification and the Python DOM API implementation.
Skip Montanaro [Sat, 8 Jan 2005 21:56:43 +0000 (21:56 +0000)]
Add definitions for "up" and "down" commands that print/display the current
Python file/line when the current C execution frame is inside
PyEval_EvalFrame. These are commented out by default because GDB sometimes
crashes as a result (seems like a GDB bug).
Add a pyframe command that displays the current Python stack frame. If the
marked lines are uncommented, it will also cause Emacs/XEmacs to display the
current file/line.
Patch #936774: unify the display of data descriptors, including slots,
properties, and custom descriptors.
* removed special handling of properties
* added special handling of data descriptors - All data descriptors are grouped
together in a section. For each item, the attribute name and doc string, if
present, is displayed.
* disabled display of __slots__ attribute - since slots are descriptors, they
are listed in the section described above
`glob.glob()` currently calls itself recursively to build a list of matches of
the dirname part of the pattern and then filters by the basename part. This is
effectively BFS. ``glob.glob('*/*/*/*/*/foo')`` will build a huge list of all
directories 5 levels deep even if only a handful of them contain a ``foo``
entry. A generator-based recusion would never have to store these list at once
by implementing DFS. This patch converts the `glob` function to an `iglob`
recursive generator . `glob()` now just returns ``list(iglob(pattern))``.
I also cleaned up the code a bit (reduced duplicate `has_magic()` checks and
created a second `glob0` helper func so that the main loop need not be
duplicated).
Tim Peters [Sat, 8 Jan 2005 07:30:42 +0000 (07:30 +0000)]
threading._DummyThread.__init__(): document obscure new code.
test_threading.test_foreign_thread(): new test does a basic check that
"foreign" threads can using the threading module, and that they create
a _DummyThread instance in at least one use case. This isn't a very
good test, since a thread created by thread.start_new_thread() isn't
particularly "foreign".
Brett Cannon [Sat, 8 Jan 2005 02:43:53 +0000 (02:43 +0000)]
In _DummyThread objects the lock stored in __block (allocated thanks to
_Thread.__init__) was never used. This is a waste since locks use OS
primitives that are in limited supply. So the lock is deleted in
_DummyThread.__init__ .
Armin Rigo [Fri, 7 Jan 2005 18:10:51 +0000 (18:10 +0000)]
Re-running python with/without the -Qnew flag uses incorrectly optimized
bytecodes from the previously saved .pyc files. Fixed by disabling the static
optimization of BINARY_DIVIDE between two constants.
Jack Jansen [Fri, 7 Jan 2005 13:08:22 +0000 (13:08 +0000)]
Patch #1097739 by Bob Ippolito:
MacOSX: if we cannot use -undefined dynamic_lookup (such as on 10.2 or earlier)
we link extension directly against the dynamic library in the framework in
stead of against the framework. This will fix building extensions for 2.3
after 2.4 has been installed too.
Andrew McNamara [Fri, 7 Jan 2005 04:42:45 +0000 (04:42 +0000)]
Improved the implementation of the internal "dialect" type. The new
implementation features better error reporting, and better compliance
with the PEP.
Jack Jansen [Mon, 3 Jan 2005 15:44:18 +0000 (15:44 +0000)]
- Added an "installer" flavor, which uses the "open" command to install
something (overridable through Install-command entry)
- Hidden status is now determined by flavor == hidden, not by
missing Download-URL. Hidden packages behave like installer packages.
- Made some error messages a bit more understandable.
Because there's new functionality the version has been upped to 0.5.
Brett Cannon [Sun, 2 Jan 2005 21:54:07 +0000 (21:54 +0000)]
Since it is a possibility that LDFLAGS or CPPFLAGS were set with options that
in no way affect library or include directories the code must take that into
account and not assume some options were found.
Brett Cannon [Fri, 31 Dec 2004 08:11:21 +0000 (08:11 +0000)]
Strip out double dashes and dashes for options not used during parsing of
LDFLAGS and CPPFLAGS for library and include directories, respectively. Solves
issue of either env var containing other options that do not pertain to the
directories being searched for.
Jack Jansen [Tue, 28 Dec 2004 21:33:27 +0000 (21:33 +0000)]
- getDefaultDatabase wasn't listed in __all__.
- using a different database for non-final releases should only be done
for X.Y.0. Non-final micro releases can use the default database just fine,
as they are required to be backward compatible.
Jack Jansen [Tue, 28 Dec 2004 21:30:35 +0000 (21:30 +0000)]
Just passing -undefined dynamic_lookup isn't enough: we also need to set
the MACOSX_DEPLOYMENT_TARGET environment variable to 10.3 when calling the
loader. And we do this with "env" because distutils apparently doesn't
understand environment variable assignments before command names.
Jack Jansen [Mon, 27 Dec 2004 15:51:03 +0000 (15:51 +0000)]
Fix for #1091468: DESTROOTed frameworkinstalls fail. Added a --destroot
option to various tools, and do the right thing when we're doing a destroot
install.
Jack Jansen [Sun, 26 Dec 2004 23:07:48 +0000 (23:07 +0000)]
After discussion on the PythonMac-SIG it was decided that it is better
to make using "-undefined dynamic_lookup" for linking extensions more
automatic on 10.3 and later. So if we're on that platform and
MACOSX_DEPLOYMENT_TARGET is not set we now set it to the current OSX
version during configure. Additionally, distutils will pick up the
configure-time value by default.
Jack Jansen [Sun, 26 Dec 2004 23:02:05 +0000 (23:02 +0000)]
A script to fix Apple-installed Python 2.3 (and a test whether the user
needs to run it in the Makefile).
After installing a newer framework Python the apple-installed Python can
no longer build extension modules, because they will inadvertantly be linked
against the newer framework. This script modifies lib/config/Makefile so
it will link extensions with "-undefined dynamic_lookup", which forestalls
this problem.
Armin Rigo [Thu, 23 Dec 2004 22:13:13 +0000 (22:13 +0000)]
Dima Dorfman's patch for coercion/comparison of C types (patch #995939), with
a minor change after the coercion, to accept two objects not necessarily of
the same type but with the same tp_compare.
Fred Drake [Thu, 23 Dec 2004 16:50:36 +0000 (16:50 +0000)]
discuss how the __builtin__ module is normally used, and try to clarify the
difference between __builtins__ and __builtin__ (based on an email comment)
Kurt B. Kaiser [Thu, 23 Dec 2004 04:20:59 +0000 (04:20 +0000)]
The GUI was hanging if the shell window was closed while a raw_input()
was pending. Restored the quit() of the readline() mainloop().
http://mail.python.org/pipermail/idle-dev/2004-December/002307.html
Fred Drake [Tue, 21 Dec 2004 23:46:34 +0000 (23:46 +0000)]
add __file__ to the globals available for tests loaded via DocFileSuite;
this is useful for locating supporting data files, just as it is in Python
modules
Walter Dörwald [Tue, 21 Dec 2004 22:24:00 +0000 (22:24 +0000)]
The changes to the stateful codecs in 2.4 resulted in StreamReader.readline()
trying to return a complete line even if a size parameter was given (see
http://www.python.org/sf/1076985). This leads to buffer overflows with long
source lines under Windows if e.g. cp1252 is used as the source encoding.
This patch reverts the behaviour of readline() to something that behaves more
like Python 2.3: If a size parameter is given, read() is called only once.
As a side effect of this, readline() now supports all types of linebreaks
supported by unicode.splitlines().
Note that the tokenizer is still broken and it's possible to provoke segfaults
(see http://www.python.org/sf/1089395).
Armin Rigo [Mon, 20 Dec 2004 12:25:57 +0000 (12:25 +0000)]
Any call to marshal.dumps() with the new optional argument 'version' just
immediately segfaults, due to a typo! This was obviously never tested...
Added a test for it, and also fixed the documentation.