* Since only two cases remain for DUP_TOPX, replace
the switch-case with if-elseif.
* The in-lined integer compare does a CheckExact on
both arguments. Since the second is a little more
likely to fail, test it first.
* The switch-case for IS/IS_NOT and IN/NOT_IN can
separate the regular and inverted cases with no
additional work. For all four paths, saves a test and
jump.
SF bug #668906: class browser raises AttributeError
The Py2.3 updates to the pyclbr module return both Class and Function
objects. The IDLE ClassBrowser module only knew about Class and could
not handle objects which did not define "super".
SF bug #668906: class browser raises AttributeError
The Py2.3 updates to the pyclbr module return both Class and Function
objects. The IDLE ClassBrowser module only knew about Class and could
not handle objects which did not define "super".
Tim Peters [Sat, 18 Jan 2003 03:53:49 +0000 (03:53 +0000)]
SF patch 670012: Compatibility changes for _strptime.py.
Patch from Brett Cannon:
First, the 'y' directive now handles [00, 68] as a suffix for the
21st century while [69, 99] is treated as the suffix for the 20th
century (this is for Open Group compatibility).
strptime now returns default values that make it a valid date ...
the ability to pass in a regex object to use instead of a format
string (and the inverse ability to have strptime return a regex object)
has been removed. This is in preparation for a future patch that will
add some caching internally to get a speed boost.
Tim Peters [Fri, 17 Jan 2003 20:08:54 +0000 (20:08 +0000)]
When time.localtime() is passed a tick count the platform C localtime()
function can't handle, don't raise IOError -- that doesn't make sense.
Raise ValueError instead.
Jack Jansen [Fri, 17 Jan 2003 16:04:39 +0000 (16:04 +0000)]
Added methods AskFileForOpen(), AskFileForSave() and AskFolder(). These
are going to replace StandardGetFile() and friends. Main differences are
that these allow you to ask for specific datatypes to be returned (FSSpec,
FSRef, string, unicode or subtypes thereof) and that they provide access
to underlying features of Navigation Services through keyword arguments.
Gregory P. Smith [Fri, 17 Jan 2003 08:42:50 +0000 (08:42 +0000)]
bugfix: do not double-close DB cursor during deallocation when the
underlying DB has already been closed (and thus all of its cursors).
This fixes a potential segfault.
SF pybsddb bug id 667343
bugfix: close the DB object when raising an exception due to an error
during DB.open. This prevents an exception when closing the
environment about not all databases being closed.
SF pybsddb bug id 667340
Mark Hammond [Thu, 16 Jan 2003 04:56:52 +0000 (04:56 +0000)]
This test previously failed when run from the 'test' directory. In that
case, the test module created is actually a sub-package of 'test', thus
the module is named 'test.areallylongpackage...' - this caused failure.
Replace the hard-coded module names with __name__ attributes, which
correctly reflects any hierarchy.
Document that __cmp__() is not defined for sets.
Note, that list.sort() is undefined for lists of sets.
Add the ... prompt to the example so it runs in doctest.
Kurt B. Kaiser [Tue, 14 Jan 2003 22:03:31 +0000 (22:03 +0000)]
M Bindings.py
M EditorWindow.py
M NEWS.txt
M config-main.def
M configDialog.py
M configHandler.py
M configHelpSourceEdit.py
M configSectionNameDialog.py
- Change default: IDLE now starts with Python Shell.
- Removed the File Path from the Additional Help Sources scrolled list.
- Add capability to access Additional Help Sources on the web if the
Help File Path begins with //http or www. (Otherwise local path is
validated, as before.)
- Additional Help Sources were not being posted on the Help menu in the
order entered. Implement sorting the list by [HelpFiles] 'option'
number.
- Add Browse button to New Help Source dialog. Arrange to start in
Python/Doc if platform is Windows, otherwise start in current directory.
- Put the Additional Help Sources directly on the Help menu instead of in
an Extra Help cascade menu. Rearrange the Help menu so the Additional
Help Sources come last. Update help.txt appropriately.
- Fix Tk root pop-ups in configSectionNameDialog.py and configDialog.py
Guido van Rossum [Tue, 14 Jan 2003 16:45:04 +0000 (16:45 +0000)]
Explicitly raise an exception in __cmp__ -- this clarifies that cmp()
is not supported on sets. (Unfortunately, sorting a list of sets may
still return random results because it uses < exclusively, but for
sets that inly implements a partial ordering. Oh well.)
Replaced POP() with STACKADJ(-1) on lines where the result wasn't used.
The two are semantically equivalent, but the first triggered a compiler
warning about an unused variable. Note, the preceding steps had already
accessed and decreffed the variable so the reference counts were fine.
Tim Peters [Mon, 13 Jan 2003 21:38:45 +0000 (21:38 +0000)]
A new test here was failing on Windows, because the test before it never
managed to delete the @test file it intended to delete. Also, I don't
see a reason to create a 4MB file in the new test, so cut it back to 16K.
Guido van Rossum [Mon, 13 Jan 2003 21:18:54 +0000 (21:18 +0000)]
Duh. cmdqueue should be an instance variable, not a class variable.
This was introduced in 1998 in rev. 1.13, where I imported extensive
patches that, I am sad to say, I didn't review as carefully as I
should have.
Kurt B. Kaiser [Fri, 10 Jan 2003 20:13:57 +0000 (20:13 +0000)]
M configDialog.py
M configHelpSourceEdit.py
1. Attach configHelpSourceEdit error dialogs to parent to avoid Tk root
pop-ups.
2. Make configHelpSourceEdit OK button the default and bind <Return>.
3. Reformat configHelpSourceEdit.
4. ConfigDialog.SaveAllChangedConfig() had a bug which caused additional
help sources to be deleted when other config items were changed.
4. Uniform capitalization in configDialog.
5. Update configDialog doc string.
As discussed on python-dev, removed from DUP_TOPX support for the
parameter being either four or five. Currently, compile.c does not
generate calls with a parameter higher than three.
May have to be reverted if the second alpha or beta shakes out some
other tool generating this op code with a parameter of four or five.
Neal Norwitz [Fri, 10 Jan 2003 15:31:15 +0000 (15:31 +0000)]
As discussed briefly on python-dev, add Pending Deprecation Warning
when a string exception is raised. Note that raising string exceptions
is deprecated in an exception message.
Kurt B. Kaiser [Fri, 10 Jan 2003 05:07:24 +0000 (05:07 +0000)]
1. Make finding Python help docs more robust, including the installed
configuation.
2. Make sure that os.startfile() is used to open both Python help docs
and Extra Help docs on the Windows platforms.
Tim Peters [Fri, 10 Jan 2003 03:49:02 +0000 (03:49 +0000)]
Got rid of the timetz type entirely. This was a bit trickier than I
hoped it would be, but not too bad. A test had to change:
time.__setstate__() can no longer add a non-None tzinfo member to a time
object that didn't already have one, since storage for a tzinfo member
doesn't exist in that case.
SF patch #664320: Replace push/pop clusters in ceval.c
Replaced groups of pushes and pops with indexed access to the stack and
a single adjustment (if needed) to the stacklevel.
Avoids scores of unnecessary increments and decrements to the stackpointer.
Removes unnecessary sequential dependencies so that the compiler has more
freedom for optimizations. Frees the processor for more parallel and
pipelined execution by using mostly read-only access and having few pointer
adjustments just prior to a read or write.