Raymond Hettinger
6924a00d10
Use sets instead of lists for membership testing
2004-05-06 16:55:07 +00:00
Andrew M. Kuchling
30633c9a64
[Bug #945063 ] Get file extension correct. (2.3 bugfix candidate)
2004-05-06 13:13:44 +00:00
Fred Drake
e143bbb610
fix documentation for ContentHandler.ignorableWhitespace()
...
(closes SF bug #881707 )
2004-05-06 03:47:48 +00:00
Martin v. Löwis
ae20722d96
Consider output encoding in XMLGenerator. Fixes #938076 .
...
Backported to 2.3.
2004-05-06 02:22:43 +00:00
Martin v. Löwis
0ea558f7b4
Properly delegate startElementNS in saxutils.XMLFilterBase. Fixes #936637 .
...
Backported to 2.3.
2004-05-06 02:04:21 +00:00
Martin v. Löwis
456ab1d271
Swap public and system ID in start_doctype_decl. Fixes #780300 .
2004-05-06 01:54:36 +00:00
Martin v. Löwis
8b3e871a19
Patch #944110 : Properly process empty passwords. Fixes #944082 .
...
Backported to 2.3.
2004-05-06 01:41:26 +00:00
Guido van Rossum
843c734ddd
Using reversed() is not compatible with Python 1.5.2.
2004-05-04 18:18:59 +00:00
Raymond Hettinger
bac788a3cd
Replace str.find()!=1 with the more readable "in" operator.
2004-05-04 09:21:43 +00:00
Raymond Hettinger
c5e378da41
Testing for None should be done with 'is'
2004-05-04 08:34:56 +00:00
Raymond Hettinger
0b569bb399
Stacks based on lists work better and read more clearly when they
...
grow and shrink on the right.
2004-05-04 08:21:52 +00:00
Martin v. Löwis
9f1340b9f2
Do not use the default namespace for attributes.
...
Fixes http://bugs.debian.org/229885
Will backport to 2.3.
2004-05-02 20:37:13 +00:00
Walter Dörwald
c60c203670
Add a test script for the colorsys module.
2004-04-28 17:07:50 +00:00
Kurt B. Kaiser
e3636e05de
Fix a bug I introduced which causes all block openers at an indent level
...
to be shown, instead of outdenting each level.
2004-04-26 22:26:04 +00:00
Kurt B. Kaiser
d00587a2ed
1. Add an Options menu entry: Code Context
...
2. Add a <<toggle-code-context>> envent to the [CodeContext] section of
config-extensions.def and also a default-on variable, set to 0.
3. Update the help file to include Code Context.
M CodeContext.py
M config-extensions.def
M help.txt
2004-04-24 03:08:13 +00:00
Kurt B. Kaiser
610c7e07f3
1. Polish variables in EditorWindow extension loading and Tkinter variable code.
...
2. Add exception handling to EditorWindow Tkinter variable setvar() and getvar() fcns.
3. EditorWindow: remove some unneeded comments.
4. Add a separator to the Options menu
5. extend.txt: describe how to create a menu entry which has no keybinding.
M Bindings.py
M EditorWindow.py
M extend.txt
2004-04-24 03:01:48 +00:00
Kurt B. Kaiser
54d1a3b920
- New Extension: CodeContext. Provides block structuring hints for code
...
which has scrolled above an edit window. Patch 936169 Noam Raphael.
A CodeContext.py
M NEWS.txt
M config-extensions.def
2004-04-21 20:06:26 +00:00
Hye-Shik Chang
9f62eccb66
SF #926075 : Fixed the bug that returns a wrong pattern object for
...
a string or unicode object in sre.compile() when a different type
pattern with the same value exists.
2004-04-20 21:30:07 +00:00
Hye-Shik Chang
0f5bf1ebdd
SF #926075 : Fixed the bug that returns a wrong pattern object for
...
a string or unicode object in sre.compile() when a different type
pattern with the same value exists.
2004-04-20 21:11:11 +00:00
Raymond Hettinger
c46cb2a1a9
* Restore the pure python version of heapq.py.
...
* Mark the C version as private and only use when available.
2004-04-19 19:06:21 +00:00
Martin v. Löwis
61e40bd897
Special case normalization of empty strings. Fixes #924361 .
...
Backported to 2.3.
2004-04-17 19:36:48 +00:00
Skip Montanaro
c00fc8452e
Open file in universal newline mode when passing to compile(). Solution
...
from Felix Wiemann. Closes patch #934971 .
2004-04-16 03:28:19 +00:00
Raymond Hettinger
7892b1c651
* Add unittests for iterators that report their length
...
* Document the differences between them
* Fix corner cases covered by the unittests
* Use Py_RETURN_NONE where possible for dictionaries
2004-04-12 18:10:01 +00:00
Andrew MacIntyre
daedf21852
Fixes for AF_UNIX support on OS/2:
...
- return the full size of the sockaddr_un structure, without which
bind() fails with EINVAL;
- set test_socketserver to use a socket name that meets the form
required by the underlying implementation;
- don't bother exercising the forking AF_UNIX tests on EMX - its
fork() can't handle the stress.
2004-04-11 12:03:57 +00:00
Kurt B. Kaiser
cf6f1b69eb
M EditorWindow.py
...
M IOBinding.py
M NEWS.txt
M configDialog.py
- If nulls somehow got into the strings in recent-files.lst
EditorWindow.update_recent_files_list() was failing. Python Bug 931336.
2004-04-11 03:16:07 +00:00
Skip Montanaro
249369c7f0
atof: correct parameter name
2004-04-10 16:39:32 +00:00
Skip Montanaro
5bfd98498a
Refactor common code out of globaltrace_trackcallers() and
...
globaltrace_countfuncs() into file_module_function_of().
In that function use Michael Hudson's suggestion of gc.get_referrers() to
back up from the code object to a function, then to a class's dict and
finally to a class object if one exists.
2004-04-10 16:29:58 +00:00
Skip Montanaro
cafc811415
Added --trackcalls command line arg to display crude caller/callee
...
relationships at program exit. Output is a bit prettier than that for
--listfuncs but won't parse as easily using downstream postprocessing tools.
2004-04-07 15:46:05 +00:00
Andrew M. Kuchling
22ab06e4de
Fix comment typo
2004-04-06 19:43:03 +00:00
Andrew M. Kuchling
d9b38d2729
Remove specific Python version from #!
2004-04-06 19:42:34 +00:00
Andrew MacIntyre
69e18c9344
OS/2 has support for spawnvp() and spawnvpe() in the C libraries supplied
...
with major C compilers (VACPP, EMX+gcc and [Open]Watcom).
Also tidy up the export of spawn*() symbols in the os module to match what
is found/implemented.
2004-04-04 07:11:43 +00:00
Andrew MacIntyre
4e10ed3b86
If a file is opened with an explicit buffer size >= 1, repeated
...
close() calls would attempt to free() the buffer already free()ed on
the first close(). [bug introduced with patch #788249 ]
Making sure that the buffer is free()ed in file object deallocation is
a belt-n-braces bit of insurance against a memory leak.
2004-04-04 07:01:35 +00:00
Fred Drake
456d3258d6
Fix support for the "prog" keyword to the OptionParser constructor, as well
...
as directly setting the .prog attribute (which should be supported based on
the class docstring).
Closes SF bug #850964 .
2004-04-01 07:40:35 +00:00
Andrew M. Kuchling
b67c94318e
[Bugfix candidate] Escape traceback type and value. There are probably additional cases where cgitb.py doesn't escape as paranoidly as it should (e.g. attribute names)
2004-03-31 20:17:56 +00:00
Guido van Rossum
59db96f2a3
When /tmp has certain sticky bits set, newly created subdirectories
...
inherit those bits, causing the test_mkdtemp.test_mode() test to fail.
Remove those before comparing the actual mode to the expected mode.
2004-03-31 18:53:29 +00:00
Tim Peters
116d83ce71
SF bug 924242: socket._fileobject._getclosed() returns wrong value
...
The .closed property always returned the wrong result.
Bugfix candidate!
2004-03-28 02:20:45 +00:00
Raymond Hettinger
d732c95eb0
Revert 1.51 booleans so that sre will still run on old pythons.
2004-03-27 09:24:36 +00:00
Raymond Hettinger
968c56a626
Simple Optimizations:
...
* Factor constant expressions out of loops.
* Presize a list being grown to a known length.
2004-03-26 23:24:00 +00:00
Raymond Hettinger
29e383754e
Remove unnecessary test. (Thanks Skip)
2004-03-26 20:16:39 +00:00
David Ascher
1c5701d36c
Fix test failure for test_tcl on OS/X and Windows if a
...
version of Tcl other than ActiveTcl is installed (ActiveTcl
included TclX, other Tcl distros didn't).
I'm removing the package loading test because it's hard to
come up with a package that is guaranteed to be in any Tcl installation.
Special-casing darwin and windows is ok since that leaves the
only Tk platform (X) which the test was trying to address.
2004-03-26 15:10:25 +00:00
Armin Rigo
01ab279056
Marshal clean-up (SF patch #873224 )
2004-03-26 15:09:27 +00:00
Raymond Hettinger
01c9f8c35f
Simple optimizations:
...
* pre-build a single identity function for the fixup function
* pre-build membership tests in dictionaries instead of in-line tuples
* assign len() to a local variable
* assign append() methods to a local variable
* use xrange() instead of range()
* replace "x<<1" with "x+x"
2004-03-26 11:16:55 +00:00
Fred Drake
4b49823edd
make sure the default manifest generation includes files identified as
...
scripts
closes SF bug 796042
2004-03-25 22:04:52 +00:00
Marc-André Lemburg
91e83e209d
Added more Windows version names (thanks to Thomas Heller).
...
Fixed bug in platform() cache (thanks to Brett Cannon).
(Restored Python 1.5.2 compatibility.)
2004-03-25 18:35:12 +00:00
Brett Cannon
9001cde559
Fix last patch to be backwards-compatible with Python 1.5.2 .
...
Bumped version micro number.
2004-03-25 18:32:11 +00:00
Brett Cannon
21beb4c2ce
Fixed a caching bug in platform.platform() where the argument of 'terse' was
...
not taken into consideration when caching value.
2004-03-25 16:55:12 +00:00
Martin v. Löwis
1c0f1f97fb
Defer compilation of regular expressions until first use.
2004-03-25 14:58:19 +00:00
Martin v. Löwis
bc503d1e90
Use True/False instead of 0/1 for character classes.
2004-03-25 13:50:59 +00:00
Phillip J. Eby
91a968af76
Ensure super() lookup of descriptor from classmethod works (SF #743627 )
2004-03-25 02:19:34 +00:00
Piers Lauder
f167dc3380
fix name in setacl method doc string
2004-03-25 00:12:21 +00:00