Greg Ward [Thu, 23 Aug 2001 20:53:27 +0000 (20:53 +0000)]
Patch #449054 to implement PEP 250. The standard install directory for
modules and extensions on Windows is now $PREFIX/Lib/site-packages.
Includes backwards compatibility code for pre-2.2 Pythons. Contributed
by Paul Moore.
Barry Warsaw [Thu, 23 Aug 2001 16:14:45 +0000 (16:14 +0000)]
Implement some suggestions by Laura Creighton.
ChipWidget.__init__(): Added a message area just below the color
name. Both the message and name widgets are now FLAT, DISABLED
Entry widgets instead of Labels. This allows users to
copy-n-paste the color names or color specs. Also, the contents
of both widgets are now driven by StringVars.
set_color(): This only sets the chip color; it does not set the name
widgets.
set_name(): New method which only sets the name widget contents.
set_message(): New method which only sets the message widget contents.
ChipViewer.update_yourself(): Set the color, name, and message for
each chip as follows: the first line always contains the color
spec in #rrggbb format. The second line will contain the color
name, but slightly differently for each widget. For the Selected
widget, if the color exactly matches the Nearest color, the name
is shown, otherwise the message field will be empty. The name
field of the Nearest widget will always contain the color name.
Jack Jansen [Thu, 23 Aug 2001 13:51:46 +0000 (13:51 +0000)]
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Guido van Rossum [Thu, 23 Aug 2001 02:58:07 +0000 (02:58 +0000)]
When an inlined operation on two small ints causes overflow, don't
raise the exception here -- call the generic function (which may
convert the arguments to long and try again).
Ka-Ping Yee [Tue, 21 Aug 2001 06:53:01 +0000 (06:53 +0000)]
Enhancements:
- file URL now starts with "file://" (standard) rather than "file:"
- new optional argument 'context' to enable()
- repeated variable names don't have their values shown twice
- dotted attributes are shown; missing attributes handled reasonably
- highlight the whole logical line even if it has multiple physical lines
- use nice generator interface to tokenize
- formatting fixed so that it looks good in lynx, links, and w3m too
Skip Montanaro [Tue, 21 Aug 2001 04:23:21 +0000 (04:23 +0000)]
This is supposed to help configure better sort out the various libdb
incarnations. It's probably not quite sufficient, but should be better than
the status quo...
Barry Warsaw [Mon, 20 Aug 2001 22:33:46 +0000 (22:33 +0000)]
Removed --have-resources flag in favor of the more granular -u/--use
flag, which specifies external or resource intensive tests to
perform. This is used by test_largefile and test_socket_ssl.
-u/--use takes a comma separated list of flags, currently supported:
largefile, network.
usage(): New function. Note that the semantics of main() have changed
slightly; instead of returning an error code, it raises a
SystemExit (via sys.exit()) with the given error code.
main(): use_large_resources => use_resources
Also, added support for long-option alternative to the short
options.
_expectations: Added test_socket_ssl to the list of expectedly skipped
tests.
Barry Warsaw [Mon, 20 Aug 2001 22:29:23 +0000 (22:29 +0000)]
use_large_resources => use_resources
requires(): New function which can be used to `assert' that a specific
-u/--use resource flag is present. Raises a TestSkipped if not.
This is used in test_largefile and test_socket_ssl to enable
external or resource consumptive tests that are normally
disabled.
Barry Warsaw [Mon, 20 Aug 2001 22:26:24 +0000 (22:26 +0000)]
SSL_dealloc(): Apply the change suggested in SF bug #425370 which
changes the order of the free calls to be the reverse of the alloc
calls. Closes that bug.
Fred Drake [Mon, 20 Aug 2001 21:24:19 +0000 (21:24 +0000)]
Deal more appropriately with bare ampersands and pointy brackets; this
module has to deal with "class" HTML-as-deployed as well as XHTML, so we
cannot be as strict as XHTML allows.
This closes SF bug #453059, but uses a different fix than suggested in
the bug comments.
Jack Jansen [Sun, 19 Aug 2001 22:30:31 +0000 (22:30 +0000)]
Step 1 in packaging the toolbox modules and making MacPython more
like normal Python. toolbox modules are now in the Carbon package
in :Mac:Lib, with a workaround flat namespace in :Mac:Lib:lib-compat.
Other dynamic modules are in :Lib:lib-dynload. :Mac:Lib:lib-toolbox and
:Mac:Plugins are gone.
Jack Jansen [Sun, 19 Aug 2001 22:28:32 +0000 (22:28 +0000)]
Compatibility modules. lib-compat is on the default sys.path for MacPython 2.2, and each of these modules imports * from its namesake in the Carbon package.
Jack Jansen [Sun, 19 Aug 2001 22:07:59 +0000 (22:07 +0000)]
Carbon is now a package encapsulating all the toolbox modules. Carbon is not
the best of names right now (because QuickTime, for instance, is part of
its own framekwork in OSX terminology, and because all these modules also
work on pre-Carbon MacOS) but in a year or so it will be:-).
Jack Jansen [Sun, 19 Aug 2001 22:02:56 +0000 (22:02 +0000)]
Step 1 in packaging the toolbox modules and making MacPython more
like normal Python. toolbox modules are now in the Carbon package
in :Mac:Lib, with a workaround flat namespace in :Mac:Lib:lib-compat.
Other dynamic modules are in :Lib:lib-dynload. :Mac:Lib:lib-toolbox and
:Mac:Plugins are gone.
Jack Jansen [Sun, 19 Aug 2001 20:28:39 +0000 (20:28 +0000)]
Got rid of all the plugin xml files: they are generated, and
they were only in the repository for people building MacPython from
CVS (the .cmp project files are in a MacPython source
distribution). The process to regenerate them is now easier (and
documented!) so these shouldn't be needed anymore.
And eventually they should all be built by setup.py anyway.
Skip Montanaro [Sun, 19 Aug 2001 04:25:24 +0000 (04:25 +0000)]
add debug calls to self._note for the Semaphore class. This closes bug
443614. I will submit a new feature request and patch to threading.py and
libthreading.tex to address the bounded semaphore issue.
Tim Peters [Sun, 19 Aug 2001 00:56:28 +0000 (00:56 +0000)]
Windows fiddling for 2.2a2: bump build number; update copyright and
company info in resource files; change installer strings to match.
This belongs in the release branch too, of course.
Guido van Rossum [Sat, 18 Aug 2001 21:22:07 +0000 (21:22 +0000)]
SF patch #452239 by Gordon McMillan, to fix SF bug #451547.
This patch attempts to do to cPickle what Guido did
for pickle.py v 1.50. That is: save_global tries
importing the module, and fetching the name from the
module. If that fails, or the returned object is not
the same one we started with, it raises a
PicklingError. (All this so pickling a lambda will
fail at save time, rather than load time).
Guido van Rossum [Sat, 18 Aug 2001 21:08:22 +0000 (21:08 +0000)]
Add dependencies for Python/thread.c on all of the header files that
it may depend on. It's really annoying that thread.o doesn't get
rebuilt when the .h file is changed! :-)
The dependency is on *all* the Python/thread_*.h files -- that should
be sufficient and rarely cause unneeded recompilations.
Guido van Rossum [Sat, 18 Aug 2001 17:43:36 +0000 (17:43 +0000)]
Fix SF bug #443600:
Change to get/set/del slice operations so that if the object doesn't
support slicing, *or* if either of the slice arguments is not an int
or long, we construct a slice object and call the get/set/del item
operation instead. This makes it possible to design classes that
support slice arguments of non-integral types.
Greg Stein [Sat, 18 Aug 2001 09:20:23 +0000 (09:20 +0000)]
Resolve patch #449367.
For the HTTPS class (when available), ensure that the x509 certificate data
gets passed through to the HTTPSConnection class. Create a new
HTTPS.__init__ to do this, and refactor the HTTP.__init__ into a new _setup
method for both init's to call.
Note: this is solved differently from the patch, which advocated a new
**x509 parameter on the base HTTPConnection class. But that would open
HTTPConnection to arbitrary (ignored) parameters, so was not as desirable.
Tim Peters [Sat, 18 Aug 2001 00:05:50 +0000 (00:05 +0000)]
Remove the horrid generators hack from doctest.py. This relies on a
somewhat less horrid hack <wink>: if a module does
from __future__ import X
then the module dict D is left in a state such that (viewing X as a
string)
D[X] is getattr(__future__, X)
So by examining D for all the names of future features, and making that
test for each, we can make a darned good guess as to which future-features
were imported by the module. The appropriate flags are then sucked out
of the __future__ module, and passed on to compile()'s new optional
arguments (PEP 264).
Also gave doctest a meaningful __all__, removed the history of changes
(CVS serves that purpose now), and removed the __version__ vrbl (similarly;
before CVS, it was a reasonable clue, but not anymore).
Tim Peters [Fri, 17 Aug 2001 23:04:59 +0000 (23:04 +0000)]
Fix for bug [#452230] future division isn't propagated.
builtin_eval wasn't merging in the compiler flags from the current frame;
I suppose we never noticed this before because future division is the
first future-feature that can affect expressions (nested_scopes and
generators had only statement-level effects).