Martin v. Löwis [Sun, 3 Mar 2002 21:32:01 +0000 (21:32 +0000)]
Patch #50002: Display line information for bad \x escapes:
- recognize "SyntaxError"s by the print_file_and_line attribute.
- add the syntaxerror attributes to all exceptions in compile.c.
Fixes #221791
backport gvanrossum's checkin of
revision 1.44 of test_b1.py
revision 1.31 of test_b2.py
SF patch #523169, by Samuele Pedroni.
There were never tests for the fact that list() always returns a *new*
list object, even when the argument is a list, while tuple() may
return a reference to the argument when it is a tuple. Now there are.
backport gvanrossum's checkin of
revision 1.7 of test_builtin
SF patch #523169, by Samuele Pedroni.
There were never tests for the fact that list() always returns a *new*
list object, even when the argument is a list, while tuple() may
return a reference to the argument when it is a tuple. Now there are.
backport gvanrossum's checkin of
revision 1.35 of bdb.py
date: 2002/02/25 23:23:24; author: gvanrossum; state: Exp; lines: +1 -0
canonic(): Fix by Edward K Ream to make breakpoints work better on
Windows: apply normcase() as well as abspath(). (Note: this isn't
needed to make IDLE work, but it's a good idea anyway.)
Jack Jansen [Wed, 27 Feb 2002 23:15:29 +0000 (23:15 +0000)]
Backport of 1.8-1.10 (of _Menumodule.c):
- The output MenuRef of GetMenuItemHierarchicalMenu() may be NULL.
- Added support for optional MenuObj arguments
- Added a bunch of calls as functions with an optional
MenuObj first argument. The same calls already
exist as methods, but then the first arg isn't
optional... The method versions could go as far as I'm
concerned. Jack?
Jack Jansen [Wed, 27 Feb 2002 23:11:42 +0000 (23:11 +0000)]
Backport of 1.4 thru 1.16 (of _Ctlmodule.c):
- added support for UserPaneKeyDownProc and UserPaneFocusProc
- clear error after failing PyArg_Parse()
- Oops, forgot to mark CreateScrollBarControl and CreateSliderControl
as Carbon-only
- added support for ControlActionProcs, exposing the following calls:
- ctl.SetControlAction()
- CreateScrollBarControl()
- CreateSliderControl()
Jack Jansen [Wed, 27 Feb 2002 23:07:46 +0000 (23:07 +0000)]
Backport of 1.6 thru 1.9 (of _Appmodule.c):
- Added support for DrawThemeButton() and friends.
- Q&D support for ThemeDrawingState objects.
- Added DrawThemeTextBox()
- fixed GetThemeTextDimensions(): it has an in/out Point arg, not just out.
backport tim_one's checkin of
revision 1.11 of test_descrtut.py
Somebody made list.__dict__ grow a '__doc__' key, but apparently didn't
run the test suite afterwards. Either that, or whether '__doc__' shows
up is platform-dependent!
Jack Jansen [Sun, 24 Feb 2002 23:23:52 +0000 (23:23 +0000)]
Backport of 1.18 through 1.21:
- Get rid of keyword list and use keyword.iskeyword() function (which I wasn't aware of previously).
- Identify() enum values. This was changed in 1.14, but I don't think it is a good idea.
Jack Jansen [Sun, 24 Feb 2002 23:21:35 +0000 (23:21 +0000)]
Backport of 1.15 and 1.16:
- Added minimal support for floating windows.
- Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist
and representing pathnames in a os.separator-neutral format.
These shouldn't interfere too much with Just's work on the next generation IDE,
I hope.
Jack Jansen [Sun, 24 Feb 2002 23:19:07 +0000 (23:19 +0000)]
Backport of 1.15 and 1.16:
- Don't append quit menu when on OSX, it is special and automatic there.
- Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist
and representing pathnames in a os.separator-neutral format.
These shouldn't interfere too much with Just's work on the next generation IDE,
I hope.
Jack Jansen [Sun, 24 Feb 2002 23:17:23 +0000 (23:17 +0000)]
Backport of 1.27 and 1.28:
- Added minimal support for floating windows.
- Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist
and representing pathnames in a os.separator-neutral format.
These shouldn't interfere too much with Just's work on the next generation IDE,
I hope.
Jack Jansen [Sun, 24 Feb 2002 23:16:25 +0000 (23:16 +0000)]
Backport of 1.9:
Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist
and representing pathnames in a os.separator-neutral format.
These shouldn't interfere too much with Just's work on the next generation IDE,
I hope.
Jack Jansen [Sun, 24 Feb 2002 23:12:47 +0000 (23:12 +0000)]
Backport of 1.9-1.11:
- Flush screen buffer upon console.flush() and output.flush().
This fixes bug #511992.
- Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist
and representing pathnames in a os.separator-neutral format.
These shouldn't interfere too much with Just's work on the next generation IDE,
I hope.
- Modified version of patch #496882: echo SimpleStdin readline()
input to stdout.
Jack Jansen [Sun, 24 Feb 2002 23:07:04 +0000 (23:07 +0000)]
bqackport of 1.73:
In MachoPython, don't simulate argc/argv unless we have argc=1 and argv[1]
starts with "-psn_". This means the drag-and-drop continues to work as
expected, but we can now also do
/Applications/Python.app/Contents/MacOS/python script.py
from the command line, which is a lot easier with debugging. Pressing <option>
at this point also has the expected effect of opening the options dialog!
Jack Jansen [Sun, 24 Feb 2002 23:03:47 +0000 (23:03 +0000)]
Backport of 1.5 thru 1.8:
- Use full paths for Rez and DeRez, which may not be on $PATH. Fixes bug
#509074.
- Also install the Tools directory on "make installmacsubtree".
- Added a note that you have to add Mac/Lib to sys.path after doing
a "make installmacsubtree".
- Include errors.rsrc in the Python.app resource file, so the error strings
are available in MacOS API exceptions.
Jack Jansen [Sun, 24 Feb 2002 22:55:34 +0000 (22:55 +0000)]
backport of 1.52 and 1.53:
- Added as_pathname() method to FSRef objects.
- In MachoPython expect Unix-style pathnames for both FSSpec and FSRef
initializers.
Jack Jansen [Sun, 24 Feb 2002 22:46:28 +0000 (22:46 +0000)]
Backport of 1.47, 1.48 and 1.49:
- Added minimal support for floating windows.
- Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist.
- Don't barf when an AppleEvent was not handled. It's ok to ignore.
Jack Jansen [Sun, 24 Feb 2002 22:44:00 +0000 (22:44 +0000)]
Backport of 1.9 and 1.10:
Rewritten, clarified, corrected and cleaned up by Michael J. Barber.
Some modifications and clarifications (by me) to Michael's mods.
Workaround for what is probably a problem in Apple's gcc: <pthread.h> fails
on a function pointer formal argument called "destructor", which is typedeffed
as a different function pointer type in object.h.
backport tim_one's checkin of
revision 1.101 of libfuncs.tex
SF bug #501591: dir() doc is old
Bugfix candidate.
+ Updated dir() description to match actual 2.2 behavior.
+ Replaced the dir(sys) example with dir(struct), because the former
was way out of date and is bound to change frequently, while the
latter is stable.
+ Added a note cautioning that dir() is supplied primarily for
convenience at an interactive prompt (hoping to discourage its
use as the foundation of introspective code outside the core).
backport tim_one's checkin of
revision 1.3 of reindent.py
SF bug #497839: reindent chokes on empty first lines.
Reindenter.run(): copy over initial all-whitespace lines (if any, and
after normalizing to remove trailing blanks and tabs).
Bugfix candidate.
backport tim_one's checkin of
revision 1.10 of test_thread.py
revision 1.5 of test_threaded_import.py
SF bug #516372: test_thread: unhandled exc. in thread
Fix exit races in test_thread.py and test_threaded_import.py.
I suspect the bug is provokable only under Linux (where child threads
seem to get lots of cycles before they get killed after the main thread
exits), or on multi-processor machines running other OSes.
Bugfix candidate.
backport akuchling's checkin of
revision 1.12 of file_util.py
[Bug #220993; may also fix bug #479469] Fix flakiness when old
installations are present, by always unlinking the destination file
before copying to it. Without the unlink(), the copied file remains
owned by its previous UID, causing the subsequent chmod() to fail.
Bugfix candidate, though it may cause changes on platforms where
file ownership behaves differently.
backport akuchling's checkin of
revision 1.11 of install_scripts.py
Restrict the mode to the lowest four octal positions; higher positions
contain the type of the file (regular file, socket, link, &c.).
This means that install_scripts will now print
"changing mode of <file> to 775" instead of "... to 100775".
2.2 bugfix candidate, I suppose, though this isn't actually fixing a bug.
This patch was applied by an alarmingly automated system -- I hope it
worked...
Martin v. Löwis [Sat, 16 Feb 2002 23:08:25 +0000 (23:08 +0000)]
The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715.
Replaces calls to socket.send() (which isn't guaranteed to send all data)
with the new socket.sendall() method.
Fred Drake [Fri, 8 Feb 2002 21:31:23 +0000 (21:31 +0000)]
start() and stop() methods: return None where there is no exception;
returning NULL causes the interpreter to raise a SystemError.
Noted by Anthony Baxter at Python 10.
Fred Drake [Tue, 29 Jan 2002 14:54:18 +0000 (14:54 +0000)]
Revise cheeseshop example so that the order of the keyword output is
completely determined by the example; dict insertion order and the string
hash algorithm no longer affect the output.
This fixes SF bug #509281.
It's merge time! (well, this is the last one for the moment)
Backport gvanrossum's checkin of revision 2.236:
A tentative fix for SF bug #503837 (Roeland Rengelink):
type.__module__ problems (again?)
This simply initializes the __module__ local in a class statement from
the __name__ global. I'm not 100% sure that this is the correct fix,
although it usually does the right thing. The problem is that if the
class statement executes in a custom namespace, the __name__ global
may be taken from __builtins__, in which case it would have the value
__builtin__, or it may not exist at all (if the custom namespace also
has a custom __builtins__), in which case the class statement will
fail.
Nevertheless, unless someone finds a better solution, this is a 2.2.1
bugfix too.
_parsebody(): When adding subparts to a multipart container, make sure
that the first subpart added makes the payload a list object.
Otherwise, a multipart/* with only one subpart will not have the
proper structure.