Walter Dörwald
6493699c0d
Make raise statements PEP 8 compatible.
2006-04-14 15:22:27 +00:00
Armin Rigo
969ef7501c
Show case: reference cycles involving only the ob_type field are rather
...
uncommon but possible. Inspired by SF bug 1469629.
2006-04-14 14:58:30 +00:00
Walter Dörwald
15be5ec100
Call encode()/decode() with final==True as the last call in the
...
incremental codec tests.
2006-04-14 14:03:55 +00:00
Neal Norwitz
38a76a1017
Copy note from leakers README here too. We want to keep all test cases.
2006-04-14 06:35:46 +00:00
Neal Norwitz
621292237c
Restore test tee with some modifications.
...
The test case came from test_generators, not test_itertools.
Ensure there's no cyclic garbage we are counting.
This is weird because it leaks, then reaches a limit:
python.exe -i test_tee.py
>>> leak()
0
[26633 refs]
>>> leak()
0
[26658 refs]
>>> leak()
0
[26683 refs]
>>> leak()
0
[26708 refs]
>>> leak()
0
[26708 refs]
>>> leak()
0
[26708 refs]
>>> leak()
0
2006-04-14 06:33:24 +00:00
Neal Norwitz
cde8750414
Move the old test_generator_cycle.py which leaked but was removed into the test
2006-04-14 06:11:08 +00:00
Neal Norwitz
03f3be50af
Update notes to address cyclic garbage and what should happen when a test is fixed.
2006-04-14 05:35:39 +00:00
Tim Peters
7db4f2460f
When using -R, lots of "*** DocTestRunner.merge:" nuisance messages
...
appear. Get rid of them by nuking doctest's default DocTestRunner
instance as part of cleanup(). Also cleanup() before running the
first test repetition (the test was run once before we get into
the -R branch).
2006-04-13 23:12:24 +00:00
Tim Peters
8e6480ca02
Whitespace normalization.
2006-04-13 22:58:42 +00:00
Georg Brandl
7f573f7319
Add a test for Py_ssize_t. Correct typo in getargs.c.
2006-04-13 07:59:30 +00:00
Neal Norwitz
07c6071729
test_compile can be really long if we are using -u compiler.
...
This may be causing the debian sparc buildbot to fail.
Print a little message to let the user ^w buildbot know it's still thinking.
We may want to adjust the time period which is currently 5 minutes.
Will backport.
2006-04-13 06:34:59 +00:00
Neal Norwitz
0cfa58c43a
Remove tests that no longer leak. There is still one leaking generator test
2006-04-13 04:35:36 +00:00
Tim Peters
ba8194bd2a
tty isn't supported on all boxes.
2006-04-13 03:09:40 +00:00
Anthony Baxter
57fdcbc60f
reverting r45321: Patch #860326 : traceback.format_exception_only() now
...
prepends the exception's module name to non-builtin exceptions, like
the interpreter itself does.
broke a number of doctests. should be discussed before checking in (see
discussion on python-dev).
2006-04-13 01:34:33 +00:00
Georg Brandl
24c274f5dc
Patch #860326 : traceback.format_exception_only() now prepends the
...
exception's module name to non-builtin exceptions, like the interpreter
itself does.
2006-04-12 21:14:09 +00:00
Gregory P. Smith
64029986bc
Fixes bug #1117761
...
bsddb.*open() methods cachesize parameter wouldn't work (raised an
internal bsddb.db exception when it was given). The set_cachesize
call needed to be moved from the DB object to the DBEnv since the env
was introduced to allow for threading.
(will backport to 2.4)
2006-04-12 20:35:02 +00:00
Gregory P. Smith
14c6b4626f
Closes bug #1149413
...
Using None for a filename with the 'n' flag when calling bsddb.btopen
would cause an error while checking if the file None existed. error
not likely to be seen as anyone using None for a filename would likely
use the 'c' flag in the first place.
2006-04-12 20:16:56 +00:00
Thomas Heller
55d031ef23
Fix for a bug found by Armin Rigo, plus test.
...
https://sourceforge.net/tracker/?func=detail&atid=532154&aid=1467852&group_id=71702
2006-04-12 19:07:36 +00:00
Georg Brandl
314fce92dd
Patch #1468808 : don't complain if Tkinter is already deleted at the time Font.__del__ is run.
2006-04-12 15:28:49 +00:00
Georg Brandl
f69a24c6ac
Update test_sundry. Many modules have now tests, but
...
e.g. SimpleXMLRPCServer wasn't in here yet.
2006-04-12 12:44:36 +00:00
Anthony Baxter
e29002ccb0
Bug #1469163 : SimpleXMLRPCServer unconditionally attempted to import fcntl.
...
Wrapped in a try/except.
2006-04-12 12:07:31 +00:00
Walter Dörwald
bc96609555
Patch #1463288 : use a context manager to temporarily switch locales.
...
Add tests for the output of the TextCalendar and HTMLCalendar classes.
2006-04-12 10:09:16 +00:00
Neal Norwitz
d3a9162e5e
Add another little test to make sure we roundtrip multiple list comp ifs ok.
...
Add tests for generator expressions too.
2006-04-12 05:27:46 +00:00
Thomas Wouters
ced6cddc03
Part two of the fix for SF bug #1466641 : Regenerate graminit.c and add test
...
for the bogus failure.
2006-04-12 00:07:59 +00:00
Vinay Sajip
502348d010
StreamHandler now checks explicitly for None before using sys.stderr as the stream (see SF bug #1463840 ).
2006-04-11 21:42:00 +00:00
Neal Norwitz
0c469854bc
Adjust whitespace.
2006-04-11 07:21:20 +00:00
Neal Norwitz
b94a368ff4
Add whitespace after comma
2006-04-11 07:17:08 +00:00
Tim Peters
319c47fcdb
Try to repair what may be the last new test failure on the
...
"x86 OpenBSD trunk" buildbot due to changing Python so that
Python-exposed addresses are always non-negative.
test_int_pointer_arg(): This line failed now whenever the
box happened to assign an address to `ci` "with the sign
bit set":
self.failUnlessEqual(addressof(ci), func(byref(ci)))
The problem is that the ctypes addressof() inherited "all
addresses are non-negative now" from changes to
PyLong_FromVoidPtr(), but byref() did not inherit that
change and can still return a negative int.
I don't know whether, or what, the ctypes implementation wants
to do about that (possibly nothing), but in the meantime
the test fails frequently.
So, introduced a Python positive_address() function in
the test module, that takes a purported machine address and,
if negative, converts it to a non-negative value "with the
same bits". This should leave the test passing under all
versions of Python.
Belated thanks to Armin Rigo for teaching me the sick trick ;-)
for determining the # of bits in a machine pointer via abuse
of the struct module.
2006-04-11 02:59:48 +00:00
Tim Peters
171b868195
subclasspropagation(): Squash two more bogus hash(x) == id(x)
...
tests. Alas, because only the "x86 OpenBSD trunk" buildbot fails
these tests, and test_descr stops after the first failure, there's
no sane way for me to fix these short of fixing one and then
waiting for the buildbot to reveal the next one.
2006-04-11 01:59:34 +00:00
Tim Peters
413c9226d2
Whitespace normalization.
2006-04-11 01:44:26 +00:00
Tim Peters
85b362f007
specials(): squash another incorrect hash(x) == id(x)
...
test. Add some lines that at least invoke the default
__hash__, although there's nothing to check there beyond
that they don't blow up.
2006-04-11 01:21:00 +00:00
Phillip J. Eby
4703211080
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
...
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects. Tests and doc updates are included.
2006-04-11 01:07:43 +00:00
Tim Peters
7731dfdaad
Huh. This belonged with the last checkin -- no idea why svn
...
didn't commit it.
2006-04-11 00:44:27 +00:00
Tim Peters
6902b44406
Try to repair more new buildbot failures in "x86 OpenBSD trunk", due
...
to that id() can now return a Python long on a 32-bit box that allocates
addresses "with the sign bit set".
test_set.py test_subclass_with_custom_hash(): it's never been portably
legal for a __hash__() method to return id(self), but on 32-bit boxes
that never caused a problem before it became possible for id() to
return a Python long. Changed __hash__ here to return a Python int
regardless of platform.
test_descr.py specials():
vereq(hash(c1), id(c1))
has never been a correct test -- just removed it (hash() is always
a Python int; id() may be a Python long).
2006-04-11 00:43:27 +00:00
Tim Peters
9bdc85f8bf
Fix one of the tests that fails on the "x86 OpenBSD trunk" buildbot,
...
due to that id() may return a long on a 32-bit box now. On a box that
assigns addresses "with the sign bit set", id() always returns a long now.
2006-04-10 21:38:11 +00:00
Tim Peters
88459359b1
Fix one of the tests that fails on the "x86 OpenBSD trunk" buildbot, due
...
to that id() may return a long on a 32-bit box now. On a box that assigns
addresses "with the sign bit set", id() always returns a long now.
2006-04-10 21:34:00 +00:00
Tim Peters
3daf304f3b
Whitespace normalization.
2006-04-10 20:28:40 +00:00
Tim Peters
a19dc0beb1
DecimalContextTestCase: this permanently changed the
...
default decimal context, causing test_tokenize to fail
if it ran after test_contextlib. Changed to restore
the decimal context in effect at the test's start.
2006-04-10 20:25:47 +00:00
Phillip J. Eby
bd0c10f7c9
test_contextlib wasn't actually being run by regrtest.py. Or more precisely,
...
it was being run, but no tests were actually executed!
2006-04-10 18:33:17 +00:00
Phillip J. Eby
93149d935d
Minor clarity edit to contextlib per Guido's request.
2006-04-10 17:56:29 +00:00
Martin v. Löwis
17de8ffc21
Patch #1467770 : Add Popen objects to _active only in __del__.
...
Introduce _child_active member to keep track on whether a child
needs to be waited for.
Backport candidate.
2006-04-10 15:55:37 +00:00
Martin v. Löwis
10acfd00b2
Patch #1429775 : Link Python modules to libpython on linux if
...
--enable-shared. Fixes #832799 .
2006-04-10 12:39:36 +00:00
Martin v. Löwis
b04dee935c
Patch #1462222 : Fix Tix.Grid. Closes #1036406 .
2006-04-10 08:34:21 +00:00
Anthony Baxter
8220174489
Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
...
to load extension modules and now provides the dl module. As a result,
sys.setdlopenflags() now works correctly on these systems. (SF patch
#1454844 )
2006-04-09 15:07:40 +00:00
Georg Brandl
a50794b620
Patch #1466993 : remove wrong comment in socket.py
2006-04-09 14:28:13 +00:00
Neal Norwitz
ce4a9c9019
Fix tests so they pass in -R mode
2006-04-09 08:36:46 +00:00
Neal Norwitz
aa34b6c2e3
Get test_optparse to pass in -R mode by stop changing state (COLUMNS env var)
2006-04-09 06:26:12 +00:00
Neal Norwitz
349c0ed27f
Convert test_compare to use unittest. Hopefully we can find out
...
why this breaks on openbsd sometimes.
2006-04-09 04:50:18 +00:00
Neal Norwitz
c5d0dbd328
Fix a couple of strings that were no-ops. urllib.open_file was a docstring
...
in 2.4, so put it back. The string in telnetlib looks like a comment.
2006-04-09 04:00:49 +00:00
Neal Norwitz
a31bf18c48
glob('anything*/') would fail because isdir is in os.path, not os.
2006-04-09 03:35:43 +00:00
Tim Peters
e0bb597d03
test_timeout(): This test was added during Bug Day, but disabled
...
soon after because the gmail address it connects to started timing
out on all the buildbot slaves. Rewrote the test to produce a
warning message (instead of failing) when the address times out.
Also removed the special case for Windows -- this test started to
work on Windows as soon as bug 1462352 was fixed.
2006-04-08 12:05:15 +00:00
Gregory P. Smith
7f5b6f4b33
Fix bsddb.db.DBError derived exceptions so they can be unpickled.
...
Also adds some backwards compatibility when compiling _bsddb.c on earlier
python versions (needed for pybsddb).
2006-04-08 07:10:51 +00:00
Anthony Baxter
7846f4d365
missing 'self' from TextCalendar.prweek.
2006-04-07 05:41:13 +00:00
Anthony Baxter
b4e4165b96
minor error in uudecode main error handling
2006-04-07 05:39:17 +00:00
Tim Peters
7d6b8954bf
Whitespace normalization.
2006-04-06 19:35:27 +00:00
Thomas Heller
fff61ea025
Expose RTLD_LOCAL and RTLD_GLOBAL always from the _ctypes extension module.
...
If RTLD_LOCAL is not #defined in any header file (Windows), set it to 0.
If RTLD_GLOBAL is not #defined, set it equal to RTLD_LOCAL.
This should fix ctypes on cygwin.
2006-04-06 15:23:16 +00:00
Neal Norwitz
5102c4e385
Hopefully this makes test_urllib2 have inconsistent leak results
2006-04-06 08:00:20 +00:00
Anthony Baxter
04b9403e5b
Fix for failure of test_urllib2 breaking test_mimetypes (SF bug 1464978)
...
will backport.
2006-04-06 07:31:31 +00:00
Anthony Baxter
e94e3b440f
In some environments (under screen, in a chroot) curses doesn't support
...
mouse events. This makes the test fail. Catch that case and don't run
the tests. Should make the debian/ubuntu buildbots that run in a chroot
work again.
Will backport to release24-maint.
2006-04-06 07:12:39 +00:00
Fred Drake
70d044ba67
remove more cruft no longer needed
2006-04-06 01:32:26 +00:00
Fred Drake
9ea179fa7d
remove much of the Python-version compatibility cruft; the minimum Python
...
version this should support is Python 2.3
2006-04-06 01:29:04 +00:00
Thomas Heller
fb8f83b33f
One test still fails on the ia64 debian box.
2006-04-05 19:01:35 +00:00
Thomas Heller
726dcf34a6
Use 'ldd' to find the libc library to load. Based on an idea from Matthias Klose.
2006-04-05 17:36:45 +00:00
Anthony Baxter
a2a26b9e1f
whitespace normalisation
2006-04-05 17:30:38 +00:00
Anthony Baxter
22495c02e2
no-one but windows should expect startfile to work
2006-04-05 13:24:26 +00:00
Neal Norwitz
9ad18bbb52
we need os.path too for the normal run on windows
2006-04-04 19:29:29 +00:00
Thomas Heller
b882f47383
Change the import statement so that the test is skipped when
...
os.startfile is not present.
2006-04-04 18:52:27 +00:00
Thomas Heller
19fd857906
Add a simple test for os.startfile().
2006-04-04 18:31:35 +00:00
Thomas Wouters
f4d8f39053
Make xrange more Py_ssize_t aware, by assuming a Py_ssize_t is always at
...
least as big as a long. I believe this to be a safe assumption that is being
made in many parts of CPython, but a check could be added.
len(xrange(sys.maxint)) works now, so fix the testsuite's odd exception for
64-bit platforms too. It also fixes 'zip(xrange(sys.maxint), it)' as a
portable-ish (if expensive) alternative to enumerate(it); since zip() now
calls len(), this was breaking on (real) 64-bit platforms. No additional
test was added for that behaviour.
2006-04-04 17:28:12 +00:00
Thomas Wouters
8ddab27182
Fix __import__("") to raise ValueError rather than return None.
2006-04-04 16:17:02 +00:00
Anthony Baxter
06853fc150
Fix test_platform on cygwin. When running from build area, sys.executable
...
is 'python'. But 'python' is actually a directory, 'python.exe' is the
executable.
2006-04-04 15:52:00 +00:00
Tim Peters
b2fc21e9f8
sqlite on Windows:
...
- The buildbot "fetch it" step failed at the end, due to
using Unix syntax in the final "copy the DLL" step.
test_sqlite was skipped as a result.
- test_sqlite is no longer an expected skip on Windows.
2006-04-04 15:21:02 +00:00
Jeremy Hylton
ed40ea1159
Generate line number table entries for except handlers.
...
Re-enable all the tests in test_trace.py except one. Still not sure that these tests test what they used to test, but they pass. One failing test seems to be caused by undocumented line number table behavior in Python 2.4.
2006-04-04 14:26:39 +00:00
Anthony Baxter
768018592c
cygwin's curses support isn't up to scratch to run the tests.
2006-04-04 13:32:08 +00:00
Jeremy Hylton
1b6cab6531
Remove debugging prints.
2006-04-04 12:48:33 +00:00
Anthony Baxter
72289a616c
Update to pysqlite 2.2.0
2006-04-04 06:29:05 +00:00
Neal Norwitz
a7a3cfe792
Comment out the prints. These appear to be only for debugging purposes.
...
Jeremy, please fix this correctly after the alpha.
2006-04-04 05:44:36 +00:00
Jeremy Hylton
2f327c14eb
Add lineno, col_offset to excephandler to enable future fix for
...
tracing/line number table in except blocks.
Reflow long lines introduced by col_offset changes. Update test_ast
to handle new fields in excepthandler.
As note in Python.asdl says, we might want to rethink how attributes
are handled. Perhaps they should be the same as other fields, with
the primary difference being how they are defined for all types within
a sum.
Also fix asdl_c so that constructors with int fields don't fail when
passed a zero value.
2006-04-04 04:00:23 +00:00
Phillip J. Eby
9388020b86
Fix typos; enhance comments on patch for SF #1462485 .
...
--This line, and those below, will be ignored--
M contextlib.py
2006-04-03 21:20:07 +00:00
Phillip J. Eby
9444bd51c4
Fix SF#1462485: StopIteration raised in body of 'with' statement suppressed
2006-04-03 20:05:05 +00:00
Walter Dörwald
2a1b4a69b7
For backwards compatibility reasons the global function
...
setfirstweekday() still needs to do a range check.
2006-04-03 15:24:49 +00:00
Walter Dörwald
72d84af401
Always return firstweekday % 7 instead of complaining
...
on setting.
2006-04-03 15:21:59 +00:00
Walter Dörwald
aba10cf153
Turn firstweekday into a property.
2006-04-03 15:20:28 +00:00
Anthony Baxter
ebed3f629b
preparation for 2.5a1
2006-04-03 15:03:44 +00:00
Martin v. Löwis
a8cd7a26d4
Add test case for #43581 .
2006-04-03 11:05:39 +00:00
Anthony Baxter
cf0a2a8576
Deal with openbsd's different style of default /etc/hosts by forcing the fqdn
...
lookup to use the IP address returned by gethosbyname.
2006-04-03 08:10:33 +00:00
Anthony Baxter
93f5b93422
The email module's parsedate_tz function now sets the daylight savings
...
flag to -1 (unknown) since it can't tell from the date whether it should
be set.
patch from Aldo Cortesi
2006-04-03 08:05:07 +00:00
Neal Norwitz
9e5eb4ffbf
I could have sworn this was part of the change to not abbreviate ABSOLUTE
2006-04-03 06:58:51 +00:00
Neal Norwitz
b0b20a10bc
Get ctypes loader working on OSF1 (Tru64)
2006-04-03 06:52:43 +00:00
Neal Norwitz
cbce280d4f
Don't abbreviate ABS, use long name ABSOLUTE.
2006-04-03 06:26:32 +00:00
Neal Norwitz
84c95b9407
Fix test_pty on OSF/1 (Tru64). The problem is that the newline gets
...
converted to CR CR NL. There may be a way to fix this with tcsetattr,
but I couldn't find it. There was a similar problem on IRIX.
Just normalize the output and compare that.
Will backport.
2006-04-03 05:28:31 +00:00
Neal Norwitz
9cdfa4c98c
Skip the test for sys.stdin.seek(-1) on OSF/1 (Tru64) since it does Bad Things
...
like cause the interpreter to exit abruptly. If there's a way to fix this,
it would be good to really fix it. It could just be the operation of the
std C library and we just aren't supposed to do that.
When the test case is skipped, we print a message so the user can check
for themselves.
2006-04-03 05:27:05 +00:00
Neal Norwitz
b902f4e401
Use absolute imports
2006-04-03 04:45:34 +00:00
Tim Peters
480725d4c5
Whitespace normalization.
2006-04-03 02:46:44 +00:00
Walter Dörwald
04ee87097c
Always use firstweekday module 7.
2006-04-02 22:11:10 +00:00
Georg Brandl
7fff58c097
Readd urllib.quote import as it doesn't cause any harm.
2006-04-02 21:13:13 +00:00
Georg Brandl
4696ffbf09
Remove "disgusting hack" in favour of closure (patch #1462235 )
2006-04-02 21:09:51 +00:00
Georg Brandl
c5ffd91911
Patch #1463012 : remove not working undocumented classes from urllib2
2006-04-02 20:48:11 +00:00
Georg Brandl
720096a6bf
Patch #1462790 : fix urllib2 ProxyHandler for host:port proxies
2006-04-02 20:45:34 +00:00
Georg Brandl
4eb521e595
bug #1462706 : guard against host not having FQDN hostname
2006-04-02 20:37:17 +00:00
Fred Drake
ad5177cf8d
Patch #624325 : urlparse.urlparse() and urlparse.urlsplit() results
...
now sport attributes that provide access to the parts of the result.
2006-04-01 22:14:43 +00:00
Walter Dörwald
f878b8120c
Make firstweekday a simple attribute instead
...
of hiding it behind a setter and a getter.
2006-04-01 20:40:23 +00:00
Georg Brandl
7f6b67c235
patch #1462498 : handle entityrefs in attribute values.
2006-04-01 08:35:18 +00:00
Walter Dörwald
48d5e508eb
Bug #947906 : Add classes LocaleTextCalendar and LocaleHTMLCalendar,
...
that output localized month and weekday names and can cope
with encodings.
2006-04-01 07:57:00 +00:00
Georg Brandl
1c5a59f80a
Bug #1458017 : make distutils.Log._log more forgiving when passing in
...
msg strings with '%', but without format args.
2006-04-01 07:46:54 +00:00
Fred Drake
23fd3d49e9
add support for the sips: scheme (identical to sip: except for scheme name)
2006-04-01 06:11:07 +00:00
Tim Peters
d8eaa49092
Fix stupid typo.
2006-04-01 01:32:13 +00:00
Tim Peters
4423b8cebc
test_timeout(): Disable this new test on all platforms.
...
The
s.connect(("gmail.org", 995))
line has been timing out on all buildbot slaves for hours
now, causing the test to fail.
2006-04-01 01:28:51 +00:00
Anthony Baxter
c51ee69b27
merged the sqlite-integration branch.
...
This is based on pysqlite2.1.3, and provides a DB-API interface in
the standard library. You'll need sqlite 3.2.2 or later to build
this - if you have an earlier version, the C extension module will
not be built.
2006-04-01 00:57:31 +00:00
Tim Peters
c17976e983
Another crack at bug #1460340 : make random.sample(dict)
...
work, this time by ugly brute force.
2006-04-01 00:26:53 +00:00
Georg Brandl
c90397a7c9
Make test_socket_ssl finally pass on WIn
2006-03-31 21:12:32 +00:00
Georg Brandl
814727582a
Update version number to 2.5
2006-03-31 20:02:40 +00:00
Georg Brandl
dcdfd22bb4
bug #1257988 : don't bail out on gethostbyname(gethostname()) failure
2006-03-31 19:34:13 +00:00
Georg Brandl
d49be30938
Disable test_socket_ssl timeout test on Windows.
2006-03-31 19:09:56 +00:00
Georg Brandl
ccadf84a1b
Patch #1460496 : round() now accepts keyword arguments.
2006-03-31 18:54:53 +00:00
Georg Brandl
338ef7d2bd
Bug #1445068 : getpass.getpass() can now be given an explicit stream
...
argument to specify where to write the prompt.
2006-03-31 18:42:16 +00:00
Georg Brandl
22ec80bc4f
Patch #1462313 , bug #1443328 : the pickle modules now can handle classes
...
that have __private names in their __slots__.
2006-03-31 18:25:44 +00:00
Georg Brandl
43f08a85e4
Patch #1380952 : fix SSL objects timing out on consecutive read()s
2006-03-31 18:01:16 +00:00
Georg Brandl
dd2245f230
Bug #1250170 , Patch #1462230 : handle socket.gethostname()
...
failures gracefully
2006-03-31 17:18:06 +00:00
Georg Brandl
51dbc4c879
traceback now shows error position for all SyntaxError subclasses,
...
e.g. IndentationError. (bug #1447885 )
2006-03-31 15:59:13 +00:00
Thomas Wouters
a6126ba890
Fix the reference leak in test_generators, by explicitly breaking the cycle
...
we are about to leave behind. An example of the cause of this leak can be
found in the leakers directory, in case we ever want to tackle the
underlying problem.
2006-03-31 15:31:43 +00:00
Walter Dörwald
58917a6083
Bug #947906 : An object oriented interface has been added to the calendar
...
module. It's possible to generate HTML calendar now and the module can be
called as a script (e.g. via ``python -mcalendar``).
2006-03-31 15:26:22 +00:00
Tim Peters
46cc702b72
test_main(): Restore the decimal context that was in
...
effect at the time test_decimal was imported. Else
running test_decimal had the bad side effect of
permanently changing the decimal context in effect.
That caused text_tokenize to fail if it ran after
test_decimal.
2006-03-31 04:11:16 +00:00
Tim Peters
ef57567de0
Repaired a number of errors in this test:
...
- The doctests in decistmt() weren't run at all when
test_tokenize was run via regrtest.py.
- Some expected output in decistmt() was Windows-specific
(but nobody noticed because the doctests weren't getting
run).
- test_roundtrip() didn't actually test anything when
running the tests with -O. Now it does.
- Changed test_roundtrip() to show the name of the input
file when it fails. That would have saved a lot of
time earlier today.
- Added a bunch of comments.
2006-03-31 03:17:30 +00:00
Barry Warsaw
176014ffad
SF patch #1458476 with modifications based on discussions in python-dev. This
...
adds the following API calls: PySet_Clear(), _PySet_Next(), and
_PySet_Update(). The latter two are considered non-public. Tests and
documentation (for the public API) are included.
2006-03-30 22:45:35 +00:00
Guido van Rossum
c259cc9c4c
Insert a safety space after numbers as well as names in untokenize().
2006-03-30 21:43:35 +00:00
Thomas Heller
0d93a23479
Try to fix test_loading on openbsd.
2006-03-30 19:16:15 +00:00
Thomas Heller
300269ae6f
Oops - this should not have gone in.
2006-03-30 18:29:25 +00:00
Thomas Heller
b320682577
Output more info when the test fails.
2006-03-30 17:49:55 +00:00
Armin Rigo
314861c568
Minor bugs in the __index__ code (PEP 357), with tests.
2006-03-30 14:04:02 +00:00
Anthony Baxter
4ef3a23a35
whitespace normalisation
2006-03-30 12:59:11 +00:00
Armin Rigo
5eca19b894
Checking in the test for PEP 357.
...
This is from the SF tracker as well; for some reason the
content of test_index.py was lost and an empty file was
checked in instead.
2006-03-30 11:28:43 +00:00
Anthony Baxter
67b6d516ce
Fixed bug #1459029 - unicode reprs were double-escaped.
2006-03-30 10:54:07 +00:00
Phillip J. Eby
2e550b3dd2
Implementation for patch request #1457316 : support --identity option
...
for setup.py "upload" command.
2006-03-30 02:12:14 +00:00
Raymond Hettinger
3c3346daa9
SF bug #1460340 : random.sample can raise KeyError
...
Fix the hit and miss style of testing for sets and dicts.
2006-03-29 09:13:13 +00:00
Georg Brandl
80bb2bb7eb
Revert r43399.
2006-03-28 19:19:56 +00:00
Georg Brandl
f1349cd05d
Bug #1459963 : urllib2 now normalizes HTTP header names correctly
...
with title().
2006-03-28 12:40:24 +00:00
Thomas Heller
240ec6b9ef
Make the tests succeed with -Qnew: Do not rely on the exact wording of a ZeroDivisionError.
2006-03-28 11:00:08 +00:00
Georg Brandl
f871270c92
Make uu use floor division instead of classic division.
...
This was discovered by test_email failing with -Qnew.
2006-03-28 10:29:45 +00:00
Georg Brandl
019514e854
Make test_augassign pass with -Qnew and convert to unittest.
2006-03-28 10:26:45 +00:00
Georg Brandl
b921a84405
Make xdrlib use floor division instead of classic division.
...
Makes test_xdrlib pass.
2006-03-28 10:07:46 +00:00
Georg Brandl
686eaeb0b8
Make test_coercion pass with -Qnew. Converted to unittest on the occasion.
2006-03-28 10:00:53 +00:00
Thomas Wouters
4054b9720b
In true regression-test spirit, make sure the
...
itertools.tee->instance->attribute->itertools.tee and
itertools.tee->teedataobject->itertools.tee cycles, which can be found now
that itertools.tee and its teedataobject participate in GC, remain findable
and cleanable. The test won't fail when they aren't, but at least the
frequent hunt-refleaks runs would spot the rise in refleaks.
2006-03-28 08:44:55 +00:00
Thomas Wouters
a33b2bc873
Add an example of a generator->freevar->cell->generator reference-cycle that
...
doesn't get cleaned up and thus leaks.
2006-03-28 08:14:24 +00:00
Georg Brandl
96c3f7f56b
Make test_decimal work with -Qnew.
2006-03-28 08:06:35 +00:00
Tim Peters
b82cb8dcd5
Part of bug 1459808: fiddle test_input_and_raw_input()
...
so it passes w/ -Qnew.
2006-03-28 07:39:22 +00:00
Tim Peters
1c5bc1c9d7
Part of bug 1459808: fiddle so that this passes
...
with or without -Qnew.
2006-03-28 07:28:40 +00:00
Phillip J. Eby
35fd142435
Fix contextlib not copying function attributes
2006-03-28 00:07:24 +00:00
Phillip J. Eby
849974fb56
dummy_thread needs to support PEP 343 too.
2006-03-27 23:32:10 +00:00
Phillip J. Eby
02e19975d4
Patch #1459476 : install PKG-INFO metadata alongside distutils-installed packages.
2006-03-27 21:55:21 +00:00
Walter Dörwald
a8da934069
Whitespace.
2006-03-27 09:02:04 +00:00
Neal Norwitz
33b730e33c
Fix SF bug #1458903 with AST compiler.
...
def foo((x)): was getting recognized as requiring tuple unpacking
which is not correct.
Add tests for this case and the proper way to unpack a tuple of one:
def foo((x,)):
test_inpsect was incorrect before. I'm not sure why it was passing,
but that has been corrected with a test for both functions above.
This means the test (and therefore inspect.getargspec()) are broken in 2.4.
2006-03-27 08:58:23 +00:00
Georg Brandl
1c168d8eeb
Bug #1457264 : parse http://host?query correctly in urllib
2006-03-26 20:59:38 +00:00
Martin v. Löwis
04855cc100
Fix typo.
2006-03-26 16:40:47 +00:00
Martin v. Löwis
6da56f9428
Patch from Aldo Cortesi: expected skips for OpenBSD.
2006-03-26 10:02:34 +00:00
Martin v. Löwis
c667d052e5
Provide more debug output, to diagnose OpenBSD test failures.
2006-03-26 09:50:11 +00:00
Hye-Shik Chang
9f4b632212
Allow long objects as a position value of error callbacks returned.
2006-03-26 06:21:34 +00:00
Neal Norwitz
7545a6bac2
regsub is gone, nothing to ignore
2006-03-26 04:59:27 +00:00
Neal Norwitz
2c85d826d8
Try to handle sys.getfilesystemencoding() returning None.
...
ascii seems like the safest bet that it will exist. I wonder if utf-8
would be a better choice? This should get test_fileinput passing on OpenBSD.
2006-03-26 03:11:57 +00:00
Hye-Shik Chang
e2ac4abd01
Patch #1443155 : Add the incremental codecs support for CJK codecs.
...
(reviewed by Walter Dörwald)
2006-03-26 02:34:59 +00:00
Georg Brandl
baf05b7e09
fix typo
2006-03-25 13:12:56 +00:00
Raymond Hettinger
c4e94b90a8
Don't decrement below zero. And add more tests.
2006-03-25 12:15:04 +00:00
Phillip J. Eby
ccc7bb4ef2
More extensive comment on __exit__ handling, per Guido's request.
2006-03-25 04:32:12 +00:00
Tim Peters
e33901eb2b
Whitespace normalization.
2006-03-25 01:50:43 +00:00
Phillip J. Eby
6edd258608
Fix a problem with @contextmanager not detecting a broken generator
...
that yields after a throw(). Make @contextmanager not reraise
exceptions, but return a false value in that case instead. Add test
cases for both behaviors.
2006-03-25 00:28:24 +00:00
Phillip J. Eby
bee0712214
Support throw() of string exceptions.
2006-03-25 00:05:50 +00:00
Raymond Hettinger
43b00da219
Revert previous change. Wasn't ready yet.
2006-03-24 23:55:32 +00:00
Raymond Hettinger
e751c86dcb
Add more tests
2006-03-24 23:47:53 +00:00
Phillip J. Eby
4a26633e0e
Revert r42719, because the isinstance() check wasn't redundant; formatting a
...
string exception was causing a TypeError.
2006-03-24 22:10:54 +00:00
Raymond Hettinger
fd3fcf0b35
SF Patch #1455676 : Simplify using Queues with daemon consumer threads
...
Adds join() and task_done() methods to track when all enqueued tasks have
been gotten and fully processed by daemon consumer threads.
2006-03-24 20:43:29 +00:00
Nick Coghlan
c841bb6b63
run_module shouldn't hold the import lock when running a script
2006-03-24 13:05:53 +00:00
Neal Norwitz
cdb7948f97
Use absolute import.
2006-03-24 08:58:38 +00:00
Martin v. Löwis
b95caff56c
Clarify cases when waitpid might not return self.pid.
2006-03-24 08:26:26 +00:00
Martin v. Löwis
478c82d30f
Bug #1183780 : Add Popen objects to _active only in __del__.
...
Cleanup terminated processes as well.
Add cmd attribute to Popen4.
2006-03-24 08:14:54 +00:00
Neal Norwitz
846d72a7d7
Exceptions should inherit from Exception now.
2006-03-24 08:02:51 +00:00
Neal Norwitz
de868c9a1b
Hmmm, I don't think we wanted to test // twice and / not at all (in this section).
2006-03-24 07:30:56 +00:00
Neal Norwitz
5a822fb720
Exceptions should inherit from Exception now.
2006-03-24 07:03:44 +00:00
Martin v. Löwis
c92157ff52
Relax result test for program mode of quopri.
2006-03-23 19:14:23 +00:00
Martin v. Löwis
bd8dbab247
Preserve command name, for later printing of active
...
commands. If there are active commands when the tests
start, fail, printing these commands.
2006-03-23 18:18:35 +00:00
Martin v. Löwis
83be9669c8
Rewrite pipe code using subprocess, to make sure the
...
child process is closed when the test completes.
2006-03-23 18:16:43 +00:00
Neal Norwitz
e98ccf6690
Forward port MvL's fix in 43227:
...
Fix crash when a Unicode string containing an encoding declaration is
compile()d. Fixes #1115379 .
2006-03-23 05:39:47 +00:00
Neal Norwitz
8142cb6f20
Damn another occurrence of using as as a keywordf
2006-03-22 07:13:30 +00:00
Tim Peters
0ae07bdb59
Whitespace normalization.
2006-03-22 03:23:21 +00:00
Tim Peters
b84de02f75
Record that test_wait[34] get skipped on native Windows.
2006-03-22 02:58:17 +00:00
Georg Brandl
bb03ac0dae
Correct API design mistake from rev. 43126: make socket attributes readonly properties.
2006-03-21 18:17:25 +00:00
Tim Peters
59b96c1029
Try to repair at least one segfault on the Mac buildbot,
...
as diagnosed by Nick Coghlan.
test_capi.py: A test module should never spawn a thread as
a side effect of being imported. Because this one did, the
segfault one of its thread tests caused didn't occur until
a few tests after test_regrtest.py thought test_capi was
finished. Repair that. Also join() the thread spawned
at the end, so that test_capi is truly finished when
regrtest reports that it's done.
_testcapimodule.c test_thread_state(): this spawns a
couple of non-threading.py threads, passing them a PyObject*
argument, but did nothing to ensure that those threads
finished before returning. As a result, the PyObject*
_could_ (although this was unlikely) get decref'ed out of
existence before the threads got around to using it.
Added explicit synchronization (via a Python mutex) so
that test_thread_state can reliably wait for its spawned
threads to finish.
2006-03-21 03:58:41 +00:00
Thomas Heller
cce2267cf1
Plug a leak in the ctypes test suite when tests are run repeatedly.
2006-03-20 08:11:56 +00:00
Thomas Heller
d59ca8f335
Accessing unaligned structure fields works now on all architectures.
...
Including unittest.
2006-03-20 07:54:01 +00:00
Anthony Baxter
46fa48ab04
whitespace n11n
2006-03-20 07:10:01 +00:00
Neal Norwitz
05a45599d7
Patch #1309579 : wait3 and wait4 were added to the posix module by Chad J. Schroeder.
...
This was a fair amount of rework of the patch. Refactored test_fork1 so it
could be reused by the new tests for wait3/4. Also made them into new style
unittests (derive from unittest.TestCase).
2006-03-20 06:30:08 +00:00
Anthony Baxter
fa86907aae
SF [ 1231053 ] audioop - alaw encoding/decoding added, code updated
...
This patch adds a-LAW encoding to audioop and replaces the old
u-LAW encoding/decoding code with the current code from sox.
Possible issues: the code from sox uses int16_t.
Code by Lars Immisch
2006-03-20 05:21:58 +00:00
Neal Norwitz
d5b0c9b87e
Fix problem spotted by Coverity that occurs if tzinfo.tzname().replace()
...
returns a non-string when converting %Z.
Will backport.
2006-03-20 01:58:39 +00:00
Kurt B. Kaiser
70f05c5d7f
Source file f.flush() after writing; trying to avoid lossage if user
...
kills GUI. Report from B. Sherwood. Backport to 2.3.4.
2006-03-19 20:40:05 +00:00
Walter Dörwald
6a7ec7c3e2
Change raise statement to PEP 8 style.
2006-03-18 16:35:17 +00:00
Barry Warsaw
e5c5117acf
Shim for test_email_renamed.py tests.
2006-03-18 16:17:17 +00:00
Barry Warsaw
40ef0067ad
Merge email package 4.0 from the sandbox, including documentation, test cases,
...
and NEWS updates.
2006-03-18 15:41:53 +00:00
Walter Dörwald
9ae019bf5b
Add tests for the C APIs PyCodec_IncrementalEncoder() and
...
PyCodec_IncrementalDecoder().
2006-03-18 14:22:26 +00:00
Georg Brandl
ddb84d7c69
Bug #1353433 : be conciliant with spaces in redirect URLs
2006-03-18 11:35:18 +00:00
Georg Brandl
bc45a3f821
RFE #567972 : Socket objects' family, type and proto properties are
...
now exposed via new get...() methods.
2006-03-17 19:17:34 +00:00
Thomas Heller
b03cb602e8
Merge changes from the upstream version:
...
- cast is implemented as a foreign function now
- On Windows, it is now possible to access functions exported by ordinal only
2006-03-17 15:52:58 +00:00
Neal Norwitz
c72f501aa2
as is on the road to keyword-hood, use a different var name.
2006-03-17 08:55:46 +00:00
Neal Norwitz
d5f8ec27a8
Oops, copied the wrong code from keeprefs. Get the right code
...
this time and call gc.collect(), since there is some garbage.
The original code didn't really leak (if gc.collect() was called).
2006-03-17 07:15:59 +00:00
Neal Norwitz
770a800967
Update/expand on comments about leaking tests.
2006-03-17 04:52:38 +00:00
Neal Norwitz
ddda855337
Ignore ctypes leaks, but add a test case so we do not forget.
2006-03-17 04:45:38 +00:00
Neal Norwitz
8749316c08
Try to find a host that responds slower from python.org so this test does not fail on macteagle (G4 OSX.4 in buildbot)
2006-03-17 04:37:34 +00:00
Thomas Heller
23e408603c
Fix a test that fails when libGL.so and libGLU.so are not installed (on posix systems).
2006-03-16 20:09:22 +00:00
Tim Peters
d71afb2d10
Set eol-style to native.
2006-03-16 18:55:20 +00:00
Trent Mick
f8cf13eeb7
Update test_winsound to check for a configured sound card (using a VBScript
...
helper written by Roger Upole and Mark Hammond) and adjust the expected
PlaySoundTest case results accordingly.
2006-03-16 17:34:41 +00:00
Neal Norwitz
6bed1c1fab
Add some versionadded info to new incremental codec docs and fix doco nits.
2006-03-16 07:49:19 +00:00
Neal Norwitz
10be10cbe7
Remove regsub, reconvert, regex, regex_syntax and everything under lib-old.
2006-03-16 06:50:13 +00:00
Neal Norwitz
f0e2c07a74
Spel compatibility write.
2006-03-16 06:33:21 +00:00
Neal Norwitz
f521de6efc
Add back an sre.py that should be backwards compatible except for the warning.
2006-03-16 06:31:02 +00:00
Neal Norwitz
94a9c09e10
Rename sre.py -> re.py
2006-03-16 06:30:02 +00:00
Neal Norwitz
559e88be28
Remove re.py, in order to rename sre.py -> re.py (svn seems to require 2 steps).
2006-03-16 06:27:37 +00:00
Neal Norwitz
04d1513724
The pre module has been gone for a while. Need to go through and find other modules that no longer exists, since errors are silently ignored.
2006-03-16 06:21:19 +00:00
Guido van Rossum
f8480a7856
Instead of relative imports, use (implicitly) absolute ones.
2006-03-15 23:08:13 +00:00
Walter Dörwald
197e8321c6
SF patch #1359365 : cStringIO.StringIO.isatty() will raise a ValueError
...
now if close() has been called before (like file and StringIO.StringIO do)
2006-03-15 22:13:13 +00:00
Tim Peters
f99b8162a2
Whitespace normalization.
2006-03-15 18:08:37 +00:00
Walter Dörwald
13ed60b504
Fix typo.
2006-03-15 13:36:50 +00:00
Nick Coghlan
598f8a0031
Don't try to explicitly set path in runpy package tests (tests were broken on Windows)
2006-03-15 13:29:19 +00:00
Nick Coghlan
586b83c4bb
Don't let cleanup errors mask real errors in the runpy tests
2006-03-15 13:11:54 +00:00
Vinay Sajip
a2173a189a
Catch situations where currentframe() returns None. See SF patch #1447410 , this is a different implementation.
2006-03-15 12:45:07 +00:00
Nick Coghlan
5424ad8a2a
Make test_runpy close all references to test modules before trying to delete the underlying files
2006-03-15 12:40:38 +00:00
Walter Dörwald
abb02e5994
Patch #1436130 : codecs.lookup() now returns a CodecInfo object (a subclass
...
of tuple) that provides incremental decoders and encoders (a way to use
stateful codecs without the stream API). Functions
codecs.getincrementaldecoder() and codecs.getincrementalencoder() have
been added.
2006-03-15 11:35:15 +00:00
Nick Coghlan
e2ebb2d7f7
Implement PEP 338 which has been marked as accepted by GvR
2006-03-15 11:00:26 +00:00
Walter Dörwald
0af5d93d8a
SF patch #1359365 : file and cStringIO raise a ValueError when next() is called
...
after calling close(). Change StringIO, so that it behaves the same way.
2006-03-15 08:23:53 +00:00
Guido van Rossum
87de069e4e
Use relative imports in a few places where I noticed the need.
...
(Ideally, all packages in Python 2.5 will use the relative import
syntax for all their relative import needs.)
2006-03-15 04:33:54 +00:00
Tim Peters
903d846a69
Renamed test_hashlib_speed.py to time_hashlib.py.
...
Since it's never intended that this script be run by
regrtest.py, it shouldn't have been named with a "test_"
prefix to begin with. A consequence is that we shouldn't
see useless:
test_hashlib_speed skipped -- not a unit test (stand alone benchmark)
lines in regrtest output anymore.
2006-03-14 22:48:56 +00:00
Nick Coghlan
cb35b95f86
Teach the compiler module about augmented assignment to tuple subscripts
2006-03-14 13:21:14 +00:00
Vinay Sajip
d364a07517
Added logThreads and logProcesses to allow conditional omission of logging this information
2006-03-13 22:05:28 +00:00
Nick Coghlan
eadee9a744
Fix SF bug #1448804 and ad a test to ensure that all subscript operations continue to be handled correctly
2006-03-13 12:31:58 +00:00
Thomas Heller
a022789ab3
Plug some refcount leaks when tests are run repeatedly.
2006-03-13 10:47:02 +00:00
Hye-Shik Chang
abb903fd54
Bug #1448490 : Fix a bug that ISO-2022 codecs could not handle
...
SS2 (single-shift 2) escape sequences correctly.
2006-03-13 10:20:08 +00:00
Thomas Heller
6058aa40d2
Remove the slightly broken test_leaks.py.
...
Change test_functions.py so that it can be run multiple time without
failing: Assign a restype to the function in test_intresult, and move
the definition of class POINT to module level so that no new class is
created each time the test is run.
2006-03-13 07:33:38 +00:00
Thomas Wouters
318af47512
Plug the last 657 referenceleaks in test_bsddb3: a circular reference
...
between a TestCase instance, the database it opened (or a cursor to a
database) and a bound method as a registered database callback, and a lack
of GC-handling in bsddb caused the TestCases to linger. Fix the test, for
now, as backward compatibility makes adding GC to bsddb annoying.
2006-03-12 00:13:09 +00:00
Tim Peters
88ca467ca4
Whitespace normalization.
2006-03-10 23:39:56 +00:00
Tim Peters
922dd7d49d
When the new -w option (yay! great idea) reruns a
...
failed test, first display the name of the test (else
it's not always clear from the output which test is
getting run).
2006-03-10 23:37:10 +00:00
Martin v. Löwis
04824ce8ed
Add regrtest -w option.
2006-03-10 21:26:16 +00:00
Martin v. Löwis
4196296605
Update test data to 4.1; disable PRI #29 for now.
2006-03-10 11:59:47 +00:00
Martin v. Löwis
5bd7c02298
Avoid forward-declaring the methods array.
...
Rename unicodedata.db* to unicodedata.ucd*
2006-03-10 11:20:04 +00:00
Guido van Rossum
f669436189
Um, I thought I'd already checked this in.
...
Anyway, this is the changes to the with-statement
so that __exit__ must return a true value in order
for a pending exception to be ignored.
The PEP (343) is already updated.
2006-03-10 02:28:35 +00:00
Martin v. Löwis
480f1bb67b
Update Unicode database to Unicode 4.1.
2006-03-09 23:38:20 +00:00
Georg Brandl
24cb053b15
Patch #1446372 : quit and exit can now be called from the interactive
...
interpreter to exit.
2006-03-09 23:22:06 +00:00
Thomas Heller
51f77b5152
Remove the magic to run an uninstalled ctypes version from a CVS sandbox.
2006-03-09 19:40:00 +00:00
Georg Brandl
d09def36d5
Bug #1442874 : handle "<!>", the empty SGML comment
2006-03-09 13:27:14 +00:00
Thomas Heller
57e881eb22
Disable the testcase that crashes solaris.
2006-03-09 09:43:53 +00:00
Thomas Heller
e317d0e307
Replace the trivial ctypes test (did only an import) with the real test suite.
2006-03-09 07:21:33 +00:00
Neal Norwitz
72c2c062d7
Try to be a bit more consistent on all platforms:
...
python .
python < .
both print a message, return non-zero and do not core dump.
2006-03-09 05:58:11 +00:00
Tim Peters
e8d09e5818
Whitespace normalization.
2006-03-09 01:15:05 +00:00
Hye-Shik Chang
d758d3d747
Remove .cvsignore and set svn:ignore for *.pyc *.pyo.
2006-03-08 23:31:17 +00:00
Thomas Heller
200af39722
Trivial test for ctypes, more to come
2006-03-08 20:38:11 +00:00
Thomas Heller
babddfca75
Copy ctypes-0.9.9.4 Python modules from external into the trunk.
2006-03-08 19:56:54 +00:00
Georg Brandl
533ff6fc06
Patch #1434038 : property() now uses the getter's docstring if there is
...
no "doc" argument given. This makes it possible to legitimately use
property() as a decorator to produce a read-only property.
2006-03-08 18:09:27 +00:00
Georg Brandl
26fd2e1dcc
Fix pydoc.synopsis() so that it doesn't error out with an unreadable
...
module.
2006-03-08 09:34:53 +00:00
Tim Peters
df44ab7b1c
_hotshot hotshot_profiler(): If write_header() returned
...
an error code, this let `self` leak. This is a disaster
on Windows, since `self` already points to a newly-opened
file object, and it was impossible for Python code to
close the thing since the only reference to it was in a
blob of leaked C memory.
test_hotshot test_bad_sys_path(): This new test provoked
the C bug above. This test passed, but left an open
"@test" file behind, which caused a massive cascade of
bogus test failures in later, unrelated tests on Windows.
Changed the test code to remove the @test file it leaves
behind, which relies on the change above to close that
file first.
2006-03-07 23:53:32 +00:00
Guido van Rossum
38fff8c4e4
Checking in the code for PEP 357.
...
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
2006-03-07 18:50:55 +00:00
Andrew M. Kuchling
ec73cd4b1a
Typo fix
2006-03-07 16:16:07 +00:00
Barry Warsaw
d3c38ff7f8
SF patch #1443865 ; gc.get_count() added and optional argument 'generation'
...
added to gc.collect(). Updated docs, unit test, and NEWS entry.
(Also, fixed a typo in NEWS.)
2006-03-07 09:46:03 +00:00
Neal Norwitz
60da31660c
Thanks to Coverity, these were all reported by their Prevent tool.
...
All of these (except _lsprof.c) should be backported. Particularly
the hotshot change which validates sys.path. Can someone backport?
2006-03-07 04:48:24 +00:00
Walter Dörwald
ca199432c2
If size is specified, try to read at least size characters.
...
This is a alternative version of patch #1379332 .
2006-03-06 22:39:12 +00:00
Martin v. Löwis
fbab90e95b
Import bdist_msi
2006-03-05 13:36:04 +00:00
Neal Norwitz
5bab0f8872
Backout the last hack and add in this new one.
...
The failure definitely seems timing related. This change *seems* to work.
Since the failure isn't doesn't occur consistently, it's hard to tell.
Running these tests on Solaris in this order:
test_urllibnet test_operator test_cgi \
test_isinstance test_future test_ast test_logging
generally caused a failure (about 50% of the time) before the sleep.
I couldn't provoke the failure with the sleep.
This should really be cleaned up by using threading.Events or something
so it is not timing dependent and doesn't hang forever on failure.
2006-03-05 02:16:12 +00:00
Neal Norwitz
83cbb24cd4
Oops, urllib may or may not already be loaded.
2006-03-04 23:56:53 +00:00
Neal Norwitz
d8cea79bb4
Fix spurious test failure of test_socket_ssl when run in this order:
...
test_codecmaps_tw test_importhooks test_socket_ssl
I don't completely understand the cause, but there's a lot of import magic
going on and this is the smallest change which fixes the problem.
2006-03-04 23:13:41 +00:00
Neal Norwitz
b62c433d71
Remove test for timing (already not built since commented out in setup.py).
...
Add note to NEWS.
2006-03-04 18:35:47 +00:00
Barry Warsaw
ad9afcf213
Actually this file should have svn:eol-style CRLF since it's specifically
...
testing line ending compatibility.
2006-03-04 04:55:02 +00:00
Tim Peters
c32886dad8
Set eol-style to native -- doesn't appear to be any reason
...
for it to claim it has mime-type application/octet-stream.
2006-03-04 02:57:23 +00:00
Tim Peters
39e11fb104
Whitespace normalization.
2006-03-04 02:43:44 +00:00
Neal Norwitz
67dfb6f086
I think the test_logging failure on Solaris is timing related. We don't
...
want to wait forever if we don't receive the last message. But we also
don't want the test to fail if we shutdown too quickly. I can't reliably
reproduce this failure, so I'm kinda guessing this is the problem.
We'll see if this band-aid helps.
2006-03-03 21:53:14 +00:00
Neal Norwitz
10be2ea85d
SF bug 1442442: LIST_APPEND optimization got lost in the AST merge.
...
Add it back.
2006-03-03 20:29:11 +00:00
Neal Norwitz
d4e3035701
Fix compiler breakage related to absolute imports
2006-03-03 20:21:48 +00:00
Neal Norwitz
eaed39f303
Hopefully this removes all vestiges of CO_GENERATOR_ALLOWED that can
...
be removed in 2.x.
2006-03-03 19:12:58 +00:00
Thomas Wouters
fa0cf4f3ae
Add support for absolute/relative imports and if/else expressions:
...
- regenerate ast.py
- add future flags for absolute-import and with-statement so they
(hopefully) properly get set in code-object flags
- try out if/else expressions in actual code for the hell of it.
Seems to generate the same kind of bytecode as the normal compiler.
2006-03-03 18:16:20 +00:00
Brett Cannon
4954b384e4
Fix mismatch opening and closing quotes on a string.
2006-03-02 17:47:01 +00:00
Guido van Rossum
5bde08dba3
Fix failure of test_compiler.py when compiling test_contextlib.py.
...
The culprit was an expression-less yield -- the first apparently in
the standard library. I added a unit test for this.
Also removed the hack to force compilation of test_with.py.
2006-03-02 04:24:01 +00:00
Martin v. Löwis
d9bfeac330
Reformat the exception message by going through a list.
2006-03-01 23:24:34 +00:00
Tim Peters
5ddfe41e84
Whitespace normalization.
2006-03-01 23:02:57 +00:00
Martin v. Löwis
49c5da1d88
Patch #1440601 : Add col_offset attribute to AST nodes.
2006-03-01 22:49:05 +00:00
Martin v. Löwis
15bfc3b082
Make failures in test cases print failing source file.
2006-03-01 21:11:49 +00:00
Guido van Rossum
a9f068726f
Fix a bug in nested() - if one of the sub-context-managers swallows the
...
exception, it should not be propagated up. With unit tests.
2006-03-01 17:10:01 +00:00
Tim Peters
1a57296450
Set svn:eol-style to native.
2006-03-01 06:19:04 +00:00
Brett Cannon
6b4ed74791
Fix parsing of exception_hierarchy.txt when a platform-specific exception is
...
specified. Hopefully this wll bring warming to Tim's Windows-loving heart.
2006-03-01 06:10:48 +00:00
Thomas Wouters
7c187bcc82
Remove redundant isinstance() check.
2006-03-01 05:34:22 +00:00
Brett Cannon
bf36409e2a
PEP 352 implementation. Creates a new base class, BaseException, which has an
...
added message attribute compared to the previous version of Exception. It is
also a new-style class, making all exceptions now new-style. KeyboardInterrupt
and SystemExit inherit from BaseException directly. String exceptions now
raise DeprecationWarning.
Applies patch 1104669, and closes bugs 1012952 and 518846.
2006-03-01 04:25:17 +00:00
Thomas Wouters
1f1c16a812
Regenerate.
2006-02-28 22:50:17 +00:00
Guido van Rossum
1a5e21e033
Updates to the with-statement:
...
- New semantics for __exit__() -- it must re-raise the exception
if type is not None; the with-statement itself doesn't do this.
(See the updated PEP for motivation.)
- Added context managers to:
- file
- thread.LockType
- threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore}
- decimal.Context
- Added contextlib.py, which defines @contextmanager, nested(), closing().
- Unit tests all around; bot no docs yet.
2006-02-28 21:57:43 +00:00
Neal Norwitz
cd8ca8092f
Add a note about removing the file once the bug is fixed
2006-02-28 20:40:50 +00:00
Neal Norwitz
9193491eb3
Make __future__ features similar for with and absolute import since they were both added before a1
2006-02-28 20:02:42 +00:00
Tim Peters
dfc240450c
Gave README a .txt extension.
2006-02-28 19:05:29 +00:00
Thomas Wouters
34aa7ba114
from __future__ import with_statement addon for 'with', mostly written by
...
Neal.
2006-02-28 19:02:24 +00:00
Neal Norwitz
edc8f1366a
Add directory which contains known ref leaks. Some of these are likely to be system dependent (like test_gestalt).
2006-02-28 19:02:05 +00:00
Tim Peters
400cbc3a44
Set EOL style to native.
2006-02-28 18:44:41 +00:00
Tim Peters
710ab3b5f8
Whitespace normalization.
2006-02-28 18:30:36 +00:00
Neal Norwitz
14ca327f99
Instead of printing the exception when you interrupt a test (Ctrl-C),
...
print the status so far and suppress printing the exception (but still exit).
2006-02-28 18:05:43 +00:00
Neal Norwitz
03bdedd574
Update comments
2006-02-28 17:53:58 +00:00
Jeremy Hylton
7b03bade2b
Test case to cover subscription bug from SF 1333982
2006-02-28 17:46:23 +00:00
Thomas Wouters
f7f438ba3b
SF patch #1438387 , PEP 328: relative and absolute imports.
...
- IMPORT_NAME takes an extra argument from the stack: the relativeness of
the import. Only passed to __import__ when it's not -1.
- __import__() takes an optional 5th argument for the same thing; it
__defaults to -1 (old semantics: try relative, then absolute)
- 'from . import name' imports name (be it module or regular attribute)
from the current module's *package*. Likewise, 'from .module import name'
will import name from a sibling to the current module.
- Importing from outside a package is not allowed; 'from . import sys' in a
toplevel module will not work, nor will 'from .. import sys' in a
(single-level) package.
- 'from __future__ import absolute_import' will turn on the new semantics
for import and from-import: imports will be absolute, except for
from-import with dots.
Includes tests for regular imports and importhooks, parser changes and a
NEWS item, but no compiler-package changes or documentation changes.
2006-02-28 16:09:29 +00:00
Guido van Rossum
baf3eb2410
Forgot to explain the effect of the new opcode.
...
Sigh -- we really should have one place for all opcode metadata.
2006-02-28 00:40:16 +00:00
Guido van Rossum
7ad94f011e
Update the compiler package to compile the with-statement.
...
Jeremy, please review!
2006-02-28 00:32:16 +00:00
Neal Norwitz
0023a2f858
Finish removal of CO_GENERATOR_ALLOWED.
2006-02-27 23:24:48 +00:00
Guido van Rossum
c2e20744b2
PEP 343 -- the with-statement.
...
This was started by Mike Bland and completed by Guido
(with help from Neal).
This still needs a __future__ statement added;
Thomas is working on Michael's patch for that aspect.
There's a small amount of code cleanup and refactoring
in ast.c, compile.c and ceval.c (I fixed the lltrace
behavior when EXT_POP is used -- however I had to make
lltrace a static global).
2006-02-27 22:32:47 +00:00
Neal Norwitz
9aaad88393
Even though we don't currently use unicode or complex numbers in the test,
...
be complete when when checking types.
Yield cannot be tested outside a function, so add a comment to that effect.
2006-02-27 21:08:23 +00:00
Brett Cannon
be66e943c2
Don't filter out OverflowWarning; should be a test failure if it is raised by
...
the interpreter in 2.5 .
2006-02-27 20:03:56 +00:00
Martin v. Löwis
59977a677c
Make or_test similar to test, not testlist.
2006-02-27 19:57:01 +00:00
Martin v. Löwis
415ed937c2
Skip over doc strings.
2006-02-27 19:56:30 +00:00
Martin v. Löwis
16c7f71380
Handle testlist_safe and or_test like testlist.
2006-02-27 16:11:03 +00:00
Martin v. Löwis
49a1302952
Alias non-terminals introduced for backwards compatibility.
2006-02-27 16:03:39 +00:00
Anthony Baxter
322a23f21b
regenerated. please read PEP 306 when changing Python's grammar!
2006-02-27 06:49:54 +00:00
Thomas Wouters
dca3b9c797
PEP 308 implementation, including minor refdocs and some testcases. It
...
breaks the parser module, because it adds the if/else construct as well as
two new grammar rules for backward compatibility. If no one else fixes
parsermodule, I guess I'll go ahead and fix it later this week.
The TeX code was checked with texcheck.py, but not rendered. There is
actually a slight incompatibility:
>>> (x for x in lambda:0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: iteration over non-sequence
changes into
>>> (x for x in lambda: 0)
File "<stdin>", line 1
(x for x in lambda: 0)
^
SyntaxError: invalid syntax
Since there's no way the former version can be useful, it's probably a
bugfix ;)
2006-02-27 00:24:13 +00:00
Martin v. Löwis
bd260da900
Generate code to recursively copy an AST into
...
a tree of Python objects. Expose this through compile().
2006-02-26 19:42:26 +00:00
Tim Peters
d6e7e73ff8
Whitespace normalization.
2006-02-26 04:21:50 +00:00
Guido van Rossum
1968ad32cd
- Patch 1433928:
...
- The copy module now "copies" function objects (as atomic objects).
- dict.__getitem__ now looks for a __missing__ hook before raising
KeyError.
- Added a new type, defaultdict, to the collections module.
This uses the new __missing__ hook behavior added to dict (see above).
2006-02-25 22:38:04 +00:00
Jack Jansen
de540e2288
Got rid of byte-order dependencies.
2006-02-23 14:54:30 +00:00
Georg Brandl
418a1ef089
RFE #1436243 : make integers in [0..256] preallocated.
2006-02-22 11:30:06 +00:00
Georg Brandl
6a29c323ba
Add test for classmethod ./. keyword args.
2006-02-21 22:17:46 +00:00
Tim Peters
42a3deb7b5
Suppress another deprecation warning in the tests.
2006-02-21 03:28:49 +00:00
Tim Peters
32cbc96150
Whitespace normalization.
2006-02-20 21:42:18 +00:00
Georg Brandl
a223d2cb29
Bug #1210377 : close bsddb cursor correctly after NotFoundError.
2006-02-20 20:29:52 +00:00
Martin v. Löwis
de2cde614c
Detect Win64 builds.
2006-02-20 12:26:58 +00:00
Martin v. Löwis
e46af8c367
Let the SDK setup override distutils logic.
2006-02-20 12:15:15 +00:00
Georg Brandl
5771310a09
Bug #1101233 : fix test_fcntl on netbsd2 platform.
2006-02-20 10:32:02 +00:00
Georg Brandl
8f7c54eaa5
Bug #1413790 : zipfile now sanitizes absolute archive names that are
...
not allowed by the specs.
2006-02-20 08:40:38 +00:00
Tim Peters
200a58058a
Whitespace normalization.
2006-02-19 21:26:07 +00:00
Tim Peters
4d7cad115d
Repair new test failures on Windows due to
...
implicit assumptions that there's no difference
between text and binary modes.
2006-02-19 21:22:10 +00:00
Marc-André Lemburg
fe4b34cc4b
Fix the encodings package codec search function to only search
...
inside its own package. Fixes problem reported in patch #1433198 .
Add codec search function for codec test codec.
2006-02-19 15:22:22 +00:00
Georg Brandl
c98eeede17
Patch #1215184 : FileInput now can be given an opening hook which can
...
be used to control how files are opened.
2006-02-19 14:57:47 +00:00
Georg Brandl
c029f873cb
Patch #1212287 : fileinput.input() now has a mode parameter for
...
specifying the file mode input files should be opened with.
2006-02-19 14:12:34 +00:00
Georg Brandl
67e9fb9d7a
Patch #1215184 : fileinput now has a fileno() function for getting the
...
current file number.
2006-02-19 13:56:17 +00:00
Georg Brandl
602b9ba6b3
Patch #1349274 : gettext.install() now optionally installs additional
...
translation functions other than _() in the builtin namespace.
2006-02-19 13:26:36 +00:00
Georg Brandl
e466217ab9
Patch #1337756 : fileinput now accepts Unicode filenames.
2006-02-19 09:51:27 +00:00
Tim Peters
2a8ec996ce
test_gopher(): Squash another deprecation
...
warning about gopherlib.
2006-02-19 05:09:00 +00:00
Georg Brandl
19e2203fff
Add a unit test for bug fix #1396678 .
2006-02-19 01:21:11 +00:00
Georg Brandl
26caeba35a
Bug #1396678 : a closed bsddb.DB raises AttributeError on repr().
...
It now returns "{}". Is that the correct solution?
2006-02-19 00:53:54 +00:00
Neal Norwitz
bb45973455
This fixes test _locale failing on macteagle (Mac OS 10.4 AFAIK).
...
Google for: eu_ES decimal point
shows that BSD locales had the eu_ES decimal point as
a single quote (') instead of a comma (,).
This was seems to have been fixed 15 months ago, but it's not on our
Mac and presumably others. So skip this broken locale.
2006-02-19 00:13:15 +00:00
Georg Brandl
1f63670a2a
Patch #1426648 : urllib proxy_bypass broken
2006-02-18 23:10:23 +00:00
Neal Norwitz
d5b6715083
This should get test_timeout to pass when running on any python.org host. Will backport
2006-02-18 21:20:31 +00:00
Georg Brandl
7b4e7c24df
Patch #1373643 : The chunk module can now read chunks larger than
...
two gigabytes.
2006-02-18 21:10:56 +00:00
Tim Peters
e2c9a6cea7
Suppress new deprecation warnings when running the
...
test suite.
For urllib2, move the import of gopherlib into the
only function that uses it: users (including the
test suite) certainly shouldn't see a deprecation
warning just because they import urllib2! If they
actually use gopher_open(), fine, _then_ they should
see a deprecation warning.
2006-02-18 04:14:16 +00:00
Tim Peters
24f7cad6ca
Changed the new deprecation warning to show the
...
code _importing_ gopherlib instead of gopherlib's
call to warnings.warn.
2006-02-18 04:00:23 +00:00
Tim Peters
b6be87f9b0
Whitespace normalization.
2006-02-18 03:10:56 +00:00
Georg Brandl
4cbd1e3fc1
Move test case for HTTP response dict to httplib.
2006-02-17 22:01:08 +00:00
Georg Brandl
6aab16e9f6
Move "httpresponses" dict from urllib2 to httplib where it belongs.
2006-02-17 19:17:25 +00:00
Georg Brandl
5d076961e2
Patch #1417555 : SimpleHTTPServer now returns Last-Modified headers.
2006-02-17 13:34:16 +00:00
Georg Brandl
b86a54f395
Add deprecation warning to modules deprecated since 2000.
2006-02-17 11:29:04 +00:00
Georg Brandl
bd3bc4dc4c
Bug #1430298 : It is now possible to send a mail with an empty
...
return address using smtplib.
2006-02-17 09:52:53 +00:00
Georg Brandl
501dd0dd9d
The names of lambda functions are now properly displayed in pydoc.
2006-02-17 09:45:40 +00:00
Martin v. Löwis
18e165558b
Merge ssize_t branch.
2006-02-15 17:27:45 +00:00
Tim Peters
cffcfed126
New test code failed to close the file. This caused
...
test_file to fail on Windows in reality (can't delete
a still-open file), but a new bare "except:" hid that
test_file failed on Windows, and leaving behind the
still-open TESTFN caused a cascade of bogus failures
in later tests.
So, close the file, and stop hiding failure to unlink.
2006-02-14 17:41:18 +00:00
Thomas Wouters
c45251a485
SF patch #1397960 : When mixing file-iteration and
...
readline/readlines/read/readinto, loudly break by raising ValueError, rather
than silently deliver data out of order or hitting EOF prematurely.
Probably not a bugfix candidate, even though it affects no 'working' code.
2006-02-12 11:53:32 +00:00
Armin Rigo
f5b3e36493
Renamed _length_cue() to __length_hint__(). See:
...
http://mail.python.org/pipermail/python-dev/2006-February/060524.html
2006-02-11 21:32:43 +00:00
Vinay Sajip
ed1992f2aa
Added function name to LogRecord.
2006-02-09 08:48:36 +00:00
Vinay Sajip
260ce43252
Propagate exceptions from shutdown() if raiseExceptions is not set.
...
Added 'extra' keyword argument handling to logging calls, as discussed on python-dev.
2006-02-09 08:34:14 +00:00
Vinay Sajip
1eb77a50c8
Added lock acquisition/release around shared data structure manipulation
2006-02-09 08:31:00 +00:00
Barry Warsaw
e58df82919
Port relevant patches for SF 1409455 to the trunk for email 3.0/Python 2.5.
...
Will port to Python 2.4.
2006-02-08 14:34:21 +00:00
Armin Rigo
a871ef2b3e
Added the cProfile module.
...
Based on lsprof (patch #1212837 ) by Brett Rosen and Ted Czotter.
With further editing by Michael Hudson and myself.
History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof
* Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper.
* pstats.py updated to display cProfile's caller/callee timings if available.
* setup.py and NEWS updated.
* documentation updates in the profiler section:
- explain the differences between the three profilers that we have now
- profile and cProfile can use a unified documentation, like (c)Pickle
- mention that hotshot is "for specialized usage" now
- removed references to the "old profiler" that no longer exists
* test updates:
- extended test_profile to cover delicate cases like recursion
- added tests for the caller/callee displays
- added test_cProfile, performing the same tests for cProfile
* TO-DO:
- cProfile gives a nicer name to built-in, particularly built-in methods,
which could be backported to profile.
- not tested on Windows recently!
2006-02-08 12:53:56 +00:00
Vinay Sajip
e0f85926d6
Removed defensive test in Handler.close
2006-02-07 13:55:52 +00:00
Vinay Sajip
f0a95eca45
Saved and restored logging._handlerList at the same time as saving/restoring logging._handlers.
2006-02-07 13:44:48 +00:00
Martin v. Löwis
0075690ced
Patch #1412872 : zipfile: use correct system type on unixy systems.
2006-02-05 17:09:41 +00:00
Neal Norwitz
55cd82fe0a
Get test_logging to not hang when running under regrtest.py -R ::
...
Not sure why/how _handlers/_handlerList is out of sync. This could
indicate a deeper problem.
In test_logging, the only absolutely necessary change to get working
was tcpserver.abort = 1. But we don't want to wait infinitely
to join the threads, so give a 2.0 second timeout.
There doesn't appear to be a need for a local abort variable
in serve_until_stopped, so just use the instance member.
Note the problem is only on HEAD, not in 2.4.
2006-02-05 08:21:08 +00:00
Neal Norwitz
0e6bc8c260
Patch #1407135 , bug #1424041 , make mmap.mmap(-1, length) work the same
...
on both Unix (SVR4 and BSD) and Windows. Restores behaviour of passing -1
for anonymous memory on Unix. Use MAP_ANONYMOUS instead of _ANON since
the latter is deprecated according to Linux (gentoo) man pages.
Should we continue to allow mmap.mmap(0, length) to work on Windows?
0 is a valid fd.
Will backport bugfix portions.
2006-02-05 05:45:43 +00:00
Barry Warsaw
e3dd5b2c87
Resolves SF bug #1423972 .
2006-02-04 23:32:26 +00:00
Neal Norwitz
faa26dfdd8
Fix typo
2006-02-04 03:26:20 +00:00
Barry Warsaw
602426e3cf
parsedate_tz(): Minor cleanup.
...
Port from Python 2.3/email 2.5: Add a test for the tm_yday field is 1 in the
return of parsedate().
2006-02-03 04:44:52 +00:00
Gustavo Niemeyer
548148810b
Patch #1413711 : Certain patterns of differences were making difflib
...
touch the recursion limit. The applied patch inlines the recursive
__helper method in a non-recursive way.
2006-01-31 18:34:13 +00:00
Gregory P. Smith
c26cf5a6f1
fix test import for use in standalone pybsddb project bsddb3 module as well
...
as python builtin bsddb.
2006-01-29 23:54:38 +00:00
Tim Peters
249c7b050b
Whitespace normalization.
2006-01-29 22:50:26 +00:00
Martin v. Löwis
5b1e003da8
Try a number of ports, in case 9020 is already in use.
2006-01-29 20:10:38 +00:00
Martin v. Löwis
f684888b1e
Explicitly close the server socket.
2006-01-29 19:55:18 +00:00
Thomas Wouters
35f34f8d60
Work around a Solaris peculiarity that caused test_pty to sometimes fail: a
...
tty opened by os.openpty() isn't always a tty according to os.isatty(), when
it's tested inside the process that opened it. Doesn't affect actual
functionality, as using a tty this way is rarely, if ever, useful. Ignoring
the failure allows the test for actual functionality to continue.
Will backport to 2.4-maint.
2006-01-28 12:05:54 +00:00
Jeremy Hylton
c960f26044
Improved handling of syntax errors.
...
Expand set of errors caught in set_context(). Some new errors, some
old error messages changed for consistency.
Fixed error checking in generator expression code. The first set of
tests were impossible condition given the grammar. In general, the
ast code uses REQ() for those sanity checks.
Fix some error handling for augmented assignments. As comments in the
code explain, set_context() ought to work here, but I got unexpected
crashes when I tried it. Should come back to this.
Add note to Grammar that yield expression is a special case.
Add doctest cases for SyntaxErrors raised by ast.c.
2006-01-27 15:18:39 +00:00
Gregory P. Smith
3d344e8b07
Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVER
...
(test cases and dbobj wrapping)
2006-01-27 07:06:15 +00:00
Neal Norwitz
08e301f8bd
There was a race condition where the connector would try to connect
...
before the listener was ready (on gentoo x86 buildslave). This
caused the listener to not exit normally since nobody connected to it
(waited in accept()). The exception was raised in the other thread
and the test failed.
This fix doesn't completely eliminate the race, but should make it
near impossible to trigger. Hopefully it's good enough.
2006-01-25 08:39:35 +00:00
Neal Norwitz
14361fffc2
Remove generated test db files
2006-01-25 07:20:47 +00:00
Neal Norwitz
62a21121b4
Fix bug #1413192 , fix seg fault in bsddb if a txn was deleted before the env.
...
Will backport.
2006-01-25 05:21:55 +00:00
Tim Peters
2a4712dc80
test_rude_shutdown(): Rewrote to use proper thread
...
synchronization and termination.
2006-01-24 22:44:54 +00:00
Tim Peters
92037a15a9
Whitespace normalization.
2006-01-24 22:44:08 +00:00
Martin v. Löwis
3e86595280
Patch #1349118 : urllib2 now supports user:pass@ style proxy
...
specifications, raises IOErrors when proxies for unsupported protocols
are defined, and uses the https proxy on https redirections.
2006-01-24 15:51:21 +00:00
Tim Peters
68f2d000e9
Repaired new test failures on Windows:
...
- The path separator isn't "/" on Windows.
- Leaving behind a read-only file causes cascades
of bogus failures on Windows.
2006-01-23 22:19:24 +00:00
Tim Peters
bc29c1a4cc
Whitespace normalization.
2006-01-23 21:28:42 +00:00
Neal Norwitz
dbc95f4222
Disable this test until I can test on big-endian machines and get passing
2006-01-23 08:48:03 +00:00
Neal Norwitz
b155b62f54
Test zipimporter a bit more. Also get working with -R :: option for finding ref leaks
2006-01-23 07:52:13 +00:00
Neal Norwitz
0e17f8cd38
Convenience function to remove a possibly non-existant file
2006-01-23 07:51:27 +00:00
Neal Norwitz
9730bcb4a6
Test getsignal() and some error conditions
2006-01-23 07:50:06 +00:00
Neal Norwitz
cd3e219cda
Use unittest and make sure a few other cases don't crash
2006-01-23 07:49:36 +00:00
Georg Brandl
531cebad4c
Bug #902075 : urllib2 now handles "host:port" proxy specifications
...
Can/should this be backported?
2006-01-21 07:20:56 +00:00
Tim Peters
887c080a80
Whitespace normalization.
2006-01-20 23:40:56 +00:00
Georg Brandl
bde4ad4f92
Patch #1410998 : remove "DOS" from os.py docstring
2006-01-20 21:36:02 +00:00
Georg Brandl
23929f2828
Try to resolve the remaining webbrowser issues (backgrounding, local urls)
2006-01-20 21:03:35 +00:00
Tim Peters
777f1083ef
Whitespace normalization.
2006-01-20 20:03:24 +00:00
Vinay Sajip
568482a266
Added a test for the ability to specify a class attribute in Formatter configuration. Contributed by Shane Hathaway.
2006-01-20 18:29:36 +00:00
Vinay Sajip
80d2df86dc
Added a test for the ability to specify a class attribute in Formatter configuration. Contributed by Shane Hathaway.
2006-01-20 18:28:59 +00:00
Vinay Sajip
7a7160bd0c
Added the ability to specify a class attribute in Formatter configuration. Contributed by Shane Hathaway.
2006-01-20 18:28:03 +00:00
Georg Brandl
81cdb4ebe1
Patch #1388073 : Make unittest.TestCase easier to subclass
2006-01-20 17:55:00 +00:00
Georg Brandl
da6b107745
Checkin the test of patch #1400181 .
2006-01-20 17:48:54 +00:00
Georg Brandl
89f35ac180
Bug #1407902 : Added support for sftp:// URIs to urlparse.
2006-01-20 17:24:23 +00:00
Georg Brandl
5035c1c557
Readd bug report note.
2006-01-20 13:38:26 +00:00
Georg Brandl
b709c2caba
Bug #1371247 : Update Windows LCIDs in locale.py.
2006-01-20 09:07:35 +00:00
Brett Cannon
2dbf2a98f4
Add a more informative error message for test_float_parsing so the failing
...
locale can be known.
2006-01-19 07:09:09 +00:00
Barry Warsaw
6153201274
SF bug #1347874 ; FeedParser does not comply with RFC2822.
...
Change headerRE as suggested in the bug report, so that single character
headers are accepted. Test case added too. Will backport to Python 2.4.
2006-01-17 05:58:08 +00:00
Barry Warsaw
a0f28efcd1
Ported 42075 from release23-maint branch.
...
SF bug #1403349 solution for email 3.0; some MUAs use the 'file' parameter
name in the Content-Distribution header, so Message.get_filename() should fall
back to using that. Will port to the Python 2.5 trunk.
Also, bump the email package version to 3.0.1 for eventual release. Of
course, add a test case too.
XXX Need to update the documentation.
2006-01-17 04:49:07 +00:00
Vinay Sajip
989b69a519
Refactoring for fileConfig. Contributed by Shane Hathaway.
2006-01-16 21:28:37 +00:00
Vinay Sajip
fe03bee62f
Changes due to added test for fileConfig contributed by Shane Hathaway.
2006-01-16 21:25:28 +00:00
Vinay Sajip
22b25aa9e2
Added test for fileConfig. Contributed by Shane Hathaway.
2006-01-16 21:24:38 +00:00
Vinay Sajip
814fa0fe11
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).
2006-01-16 09:27:58 +00:00
Vinay Sajip
e928977b80
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).
2006-01-16 09:27:10 +00:00
Vinay Sajip
d952041dc7
TimedRotatingFileHandler now calculates next rollover from previous rollover rather than current time.
2006-01-16 09:13:58 +00:00
Vinay Sajip
74a83e9ffb
Fixed bug in time-to-midnight calculation.
2006-01-16 09:08:06 +00:00
Armin Rigo
b4b5a7601b
collected my segfaulting Python examples from the SF trackers
...
(is the purpose of the crashers directory to scare people? :-)
2006-01-14 10:58:30 +00:00
Georg Brandl
45ab233935
Bug #1394565 : SimpleHTTPServer now doesn't choke on query paramters
...
any more.
2006-01-13 17:05:56 +00:00
Georg Brandl
4edd989eaf
Bug #1403410 : The warnings module now doesn't get confused
...
when it can't find out the module name it generates a warning for.
2006-01-13 16:59:46 +00:00
Tim Peters
a28ad77844
Whitespace normalization.
2006-01-13 03:05:25 +00:00
Georg Brandl
05f5ba9636
Test curses.setupterm() before initscr().
2006-01-12 15:41:05 +00:00
Neal Norwitz
3b4fff8079
Fix SF bug #1402308 , segfault when using mmap(-1, ...)
...
This didn't crash on Linux, but valgrind complained.
I'm not sure if this test is valid on Windows.
Will backport.
2006-01-11 08:54:45 +00:00
Neal Norwitz
ae1df41127
add another crash reported by Thomas Wouters
2006-01-11 07:21:19 +00:00
Georg Brandl
05af43d6a0
Remove outstanding_crashes again.
2006-01-10 20:07:13 +00:00
Georg Brandl
7e8bfa4163
Add outstanding_crashes.py with tests for crashes.
2006-01-10 19:29:24 +00:00
Neal Norwitz
8cc4ef561c
As I threatened on python-dev, add a directory which contains all known
...
bugs which cause the interpreter to crash. I'm sure we can find a few
more. Many missing bugs deal with variations on unchecked infinite recursion
(like coerce.py).
2006-01-10 07:49:41 +00:00
Neal Norwitz
88bbd73d07
SF bug #1400822 , Extended version of _curses over{lay,write} does not work
...
Fix signatures to conform to doc (also fixed ungetmouse()).
Will backport.
2006-01-10 07:05:44 +00:00
Georg Brandl
ed1e497fb2
Correct test_builtin locale handling.
2006-01-09 22:36:58 +00:00
Neal Norwitz
5e3d862392
Bug #1400115 , Fix segfault when calling curses.panel.userptr()
...
without prior setting of the userptr.
Will backport.
2006-01-09 06:24:35 +00:00
Georg Brandl
c4e2a9b70a
Add a test file (which isn't run by regrtest) for bugs which
...
aren't fixed yet.
Includes a first test (for compiler).
2006-01-08 14:32:19 +00:00
Martin v. Löwis
6d0c85a71c
Patch #1299675 : Pass metadata in upload.
2006-01-08 10:48:54 +00:00
Martin v. Löwis
412ed3b8a7
Patch #1177307 : UTF-8-Sig codec.
2006-01-08 10:45:39 +00:00
Tim Peters
2841af4cec
Revert revision 41940: the test causes -uall to
...
fail everywhere.
2006-01-07 23:20:46 +00:00
Georg Brandl
39cdfff691
Add compiler test regarding optional arguments.
2006-01-06 19:28:15 +00:00
Neal Norwitz
9f39f68533
initscr() will exit if there's an error. Try to catch the obvious failure
...
cases if TERM isn't set or is unknown (perhaps we should only check if
unset or empty?)
Skip the test if TERM isn't set. This seems to occur when running under
buildbot and presumably cron.
For some more info check here:
http://mail.python.org/pipermail/python-checkins/2006-January/048704.html
Will backport if it works.
2006-01-06 04:18:21 +00:00
Martin v. Löwis
1df5c3961c
Generalize buildno to be a sequence of non-comma
...
characters.
2006-01-06 00:44:11 +00:00
Neal Norwitz
c6d1f9100f
If the audio file does not exist, the test should be skipped. Will backport.
2006-01-05 07:16:13 +00:00
Neal Norwitz
eeab7da591
Skip test_curses if stdin is not a tty (like when run from cron or buildbot). Will backport.
2006-01-05 06:09:13 +00:00
Tim Peters
0cdc3d884e
test_main(): Restore the original root logger level after running
...
the tests. This stops the confusing/annoying:
No handlers could be found for logger "cookielib"
message we got whenever some test running after test_logging
happened to use cookielib.py (when not using regrtest's -r,
this happened during test_urllib2; when using -r, it varied).
2005-12-30 20:46:23 +00:00
Tim Peters
1b27f86411
Whitespace normalization.
2005-12-30 18:42:42 +00:00
Martin v. Löwis
4cfa136680
Work around test_locale failing on Solaris.
...
Will backport to 2.4.
2005-12-30 12:51:45 +00:00
Skip Montanaro
39b29be8a6
Fix a delimiter detection problem in sniffer. Sniffing "a|b|c\r\n" was
...
returning 'a' as the delimiter. It now returns '|', but not because I
understood better what the code was supposed to do. Would someone that
understands the idea behind _guess_delimiter() (see its doc string) look to
see if my fallback choice is better than before or if it's just serendipity
that I picked the proper delimiter?
2005-12-30 05:09:48 +00:00
Fredrik Lundh
24f0fa97c5
SF#1391872
...
Floating point literals don't work in non-US locale in 2.5. Patch and
new locale tests by Hye-Shik Chang.
2005-12-29 20:35:52 +00:00
Armin Rigo
037d1e0ff3
SF bug #1153075 : "PyXxx_Check(x) trusts x->ob_type->tp_mro".
...
A patch by mwh to check that user-defined mro's are reasonable
enough.
2005-12-29 17:07:39 +00:00
Armin Rigo
f5bd3b442d
adding in-place operators to the operator module.
2005-12-29 16:50:42 +00:00
Armin Rigo
fd163f92ce
SF patch #1390657 :
...
* set sq_repeat and sq_concat to NULL for user-defined new-style
classes, as a way to fix a number of related problems. See
test_descr.notimplemented()). One of these problems was fixed
in r25556 and r25557 but many more existed; this is a general
fix and thus reverts r25556-r25557.
* to avoid having PySequence_Repeat()/PySequence_Concat() failing
on user-defined classes, they now fall back to nb_add/nb_mul if
sq_concat/sq_repeat are not defined and the arguments appear to
be sequences.
* added tests.
Backport candidate.
2005-12-29 15:59:19 +00:00
Skip Montanaro
91bb70c5c0
Fix for problem with Sniffer class. If your delimiter is whitespace and the
...
last field was empty it would strip the delimiter and incorrectly guess that
"" was the delimiter. Reported in c.l.py by Laurent Laporte. Will
backport.
2005-12-28 15:37:25 +00:00
Georg Brandl
c0b24734e0
Bug #649974 : make docstrings for url2pathname consistent
2005-12-26 22:53:56 +00:00
Tim Peters
536cf99536
Whitespace normalization.
2005-12-25 23:18:31 +00:00
Tim Peters
83a8c393b0
test_bug_1333982(): This one must fail under -O.
...
All the --all test pass using -O on WinXP now.
2005-12-25 22:52:32 +00:00
Neal Norwitz
71dad72ebe
SF patch #1157027 , cookielib mis-handles RFC 2109 cookies in Netscape mode
2005-12-23 21:43:48 +00:00
Neal Norwitz
3e7de59bd2
Fix SF #1117398 , cookielib LWPCookieJar and MozillaCookieJar exceptions
...
cookielib.LWPCookieJar and .MozillaCookieJar are documented to raise
cookielib.LoadError on attempt to load an invalid cookies file, but
raise IOError instead. Compromise by having LoadError subclass IOError.
2005-12-23 21:24:35 +00:00
Neal Norwitz
51abbc7b4a
Fix Armin's bug 1333982. He found it, he didn't created it :-)
...
This code generated a C assertion:
assert 1, ([s for s in x] +
[s for s in x])
pass
assert was completely broken, it needed to use the proper block.
compiler_use_block() is now no longer used, so remove it.
2005-12-18 07:06:23 +00:00
Neal Norwitz
db83eb3170
Fix Bug #1378022 , UTF-8 files with a leading BOM crashed the interpreter.
...
Needs backport.
2005-12-18 05:29:30 +00:00
Neal Norwitz
e7214a130b
Get float() to be more portable across platforms. Disable hex strings.
2005-12-18 05:03:17 +00:00
Neal Norwitz
3dafaabfb5
Fix _sys_version() so it works with the new buildno, not sure if it is correct. test_platform passes
2005-12-18 04:10:10 +00:00
Neal Norwitz
8856fb750b
SF Patch #1365916 , mmap fails on AMD64
...
Fix some 64-bit issues due to mismatch format characters w/actual data types
2005-12-18 03:34:22 +00:00
Neal Norwitz
f599f424a2
SF patch #1355913 , PEP 341 - Unification of try/except and try/finally
...
Modified since ast-arenas was implemented.
2005-12-17 21:33:47 +00:00
Hye-Shik Chang
835b243c71
Bug #1379994 : Fix *unicode_escape codecs to encode r'\' as r'\\'
...
just like string codecs.
2005-12-17 04:38:31 +00:00
Fredrik Lundh
8911ca3d70
added encoding tests to ElementTree/cElementTree tests
2005-12-16 22:07:17 +00:00
Georg Brandl
6ee6952eb2
Patch #1360443 : Make SimpleHTTPServer display unencoded directory names.
2005-12-16 19:36:08 +00:00
Georg Brandl
07f159de86
Bug #1378455 : a problem of urllib using open_local_file
2005-12-15 21:59:00 +00:00
Walter Dörwald
3b287702dd
Add two tests for the script interface.
2005-12-15 20:17:20 +00:00
Fredrik Lundh
9235ea4f26
added cElementTree tests
2005-12-15 18:41:22 +00:00
Neal Norwitz
a716eabca7
Revert r41662 and the part of 41552 that originally caused the problem
...
(calling ftell(stdin) doesn't seem defined). So we won't test errors
from ftell unless we can do it portably.
2005-12-15 05:25:09 +00:00
Walter Dörwald
b197543680
If quopri uses the implementations from binascii do the tests a second time
...
using the Python implementations of the functions. This imcreases code
coverage and makes sure that both implementations do the same thing.
2005-12-14 23:32:22 +00:00
Fredrik Lundh
63168a52f4
added PSF licensing blurbs to relevant files
2005-12-14 22:29:34 +00:00
Fredrik Lundh
4c86ec651e
added cElementTree/_elementtree build stuff and wrapper module
2005-12-14 18:46:16 +00:00
Armin Rigo
9ed7306031
Subversion settings:
...
svn:ignore *.pyc *.pyo
svn:eol-style native
The .py files appear to have been checked in with Windows or inconsistent line
endings. The current check-in disrupts the 'svn blame', but hopefully it is
irrelevant for freshly imported code.
2005-12-14 18:10:45 +00:00
Fred Drake
7316ad224d
- remove leftover directory
...
- add file I forgot to add in previous commit
2005-12-14 06:26:11 +00:00
Fred Drake
c6730e1772
move the xml package implementation to xmlcore, and adjust the tests to
...
test that package, not the xmlcore/PyXML switcheroo fiasco in the xml
module/package
2005-12-14 06:20:35 +00:00
Hye-Shik Chang
e2f8e3c14f
Fix test not to fail on FreeBSD. Directories work also as data
...
files on the platform.
2005-12-13 17:06:45 +00:00
Fredrik Lundh
af57fa13f4
r1077@spiff: Fredrik | 2005-12-12 22:58:44 +0100
...
make sure xml.etree can be used even if PyXML is present
(solution proposed by Philip J. Eby)
2005-12-12 21:59:52 +00:00
Fredrik Lundh
0e664e15ef
skip NIS entries, empty entries, etc
2005-12-12 20:53:40 +00:00
Fredrik Lundh
80768f8635
skip nis entries, if not filtered out by getpwall itself
2005-12-12 20:46:31 +00:00
Fredrik Lundh
2a60d9ac2d
added xml.etree test (enough of the ElementTree selftest to
...
make sure that all included components work)
2005-12-12 20:19:44 +00:00
Fredrik Lundh
7e0aef0e75
r1068@spiff: Fredrik | 2005-12-12 19:50:30 +0100
...
assorted xml.etree tweaks
2005-12-12 18:54:55 +00:00
Fredrik Lundh
075854fcc5
added ElementTree core components to xml.etree
2005-12-12 15:10:44 +00:00
Neal Norwitz
f8d403dd97
SF #1377897 , Bus error in ast
...
If a line had multiple semi-colons and ended with a semi-colon, we would
loop too many times and access a NULL node. Exit the loop early if
there are no more children.
2005-12-11 20:12:40 +00:00
Hye-Shik Chang
aaa2f1dea7
Patch #1276356 : Implement new resource "urlfetch" for regrtest.
...
This enables even impatient people to run tests that require remote
files such as test_normalization and test_codecmaps_*.
2005-12-10 17:44:27 +00:00
Neal Norwitz
ec77645df9
mwh spotted a copied error message, make it unique (and correct)
2005-12-05 01:23:48 +00:00
Neal Norwitz
a6fc397a80
Fix SF #1373161 , r41552 broke test_file on OS X
...
You apparently can seek(0) on sys.stdin on OS X.
But you can't go backwards, so seek(-1).
2005-12-05 01:17:03 +00:00
Andrew M. Kuchling
593d6b311e
[Bug #1281032 ] Pass encoding from the input source to pyexpat's ParserCreate()
2005-12-04 19:53:45 +00:00
Andrew M. Kuchling
bdb3901001
[Bug #1164912 ] Ensure Datetime wrapper class .value attribute is an 8-bit string, not a Unicode string
2005-12-04 19:11:17 +00:00
Andrew M. Kuchling
427aedbbd4
[Patch #1039083 ] Add 'encoding' parameter to SimpleXMLRPCServer
2005-12-04 17:13:12 +00:00
Andrew M. Kuchling
ce100d8d4c
Use boolean name
2005-12-04 16:45:05 +00:00
Andrew M. Kuchling
10a16dea74
[Patch #893642 ] Add optional allow_none argument to SimpleXMLRPCServer, CGIXMLRPCRequestHandler
2005-12-04 16:34:40 +00:00
Andrew M. Kuchling
bc6a195344
[Bug #1372836 ] Remove unused code
2005-12-04 16:09:54 +00:00
Andrew M. Kuchling
e63fde72f3
[Bug #792570 ] Under Windows, socket.read() seems to run into trouble when
...
asked to read tens of megabytes of data. On my Mac, it hits MemoryErrors
when reading around 15Mb in one chunk. The fix is to read the body in several
parts, not as one big piece.
It would be nice to fix the underlying socket.read() problem, too.
2.4 bugfix candidate.
2005-12-04 15:36:57 +00:00
Andrew M. Kuchling
3a97605500
[Bug #1222790 ] Set reuse-address and close-on-exec flags on the HTTP listening socket
2005-12-04 15:07:41 +00:00
Walter Dörwald
ede187f022
Test another error case in PyFloat_FromString().
2005-11-29 15:45:14 +00:00
Neal Norwitz
fcf4435ae0
Improve test coverage. Hope the test_file changes work the same on windows.
2005-11-27 20:37:43 +00:00
Martin v. Löwis
307021f40b
Patch #1162825 : Support non-ASCII characters in IDLE window titles.
2005-11-27 16:59:04 +00:00
Georg Brandl
1f663574ee
bug #1365984 : urllib and data: URLs. Problem was that cStringIO objects cannot be assigned attributes on the fly.
2005-11-26 16:50:44 +00:00
Walter Dörwald
9356fb9881
SF patch #1364545 : test_cmd_line.py relied on english error messages when
...
invoking the Python interpreter (which didn't work on non-english Windows
versions). Check return codes instead.
2005-11-25 15:22:10 +00:00
Neal Norwitz
212a575242
Remove unused _callers member. No need for types, use isinstance
2005-11-25 03:19:29 +00:00
Neal Norwitz
ef260c0803
Stop looping to do nothing, just pass.
2005-11-25 03:18:58 +00:00
Neal Norwitz
d752f7d8e8
No need for types, use isinstance
2005-11-25 03:17:59 +00:00
Neal Norwitz
f9232678ae
Use sorted() builtin
2005-11-25 03:16:34 +00:00
Neal Norwitz
89886ab2b0
Test is still disabled, but access through public module
2005-11-25 03:15:49 +00:00
Neal Norwitz
21d19f7203
Get symtable to limp along, can run compiler/symbols.py. Not saying much, needs more work.
2005-11-25 03:14:00 +00:00
Neal Norwitz
545d4962f5
Cleanup a bit more references so test_urllibnet is stable (test_urllib2 is sometimes stable, at least in isolation)
2005-11-25 02:55:49 +00:00
Neal Norwitz
7025ce6fb0
Fix some comment typos
2005-11-25 02:02:50 +00:00
Neal Norwitz
2fcf206a6f
Fix typo in comment.
...
Delete globals which contain variable information at the end of the test.
This makes the test stable (no reported leaks) when running regrtest -R
to find reference leaks.
2005-11-24 23:28:37 +00:00
Neal Norwitz
430f68b447
Move registration of the codec search function to the module scope
...
so it is only executed once. Otherwise the same search function is
repeated added to the codec search path when regrtest is run with -R
and leaks are reported.
2005-11-24 22:00:56 +00:00
Neal Norwitz
a98e7694ee
move test into a unittest.TestCase, no functional changes
2005-11-24 21:58:51 +00:00
Kurt B. Kaiser
9df23ea1fc
Fix main() call
...
Patch 1315161 sebastien blanchet
2005-11-23 15:12:19 +00:00
Brett Cannon
ad07ff2c77
Prevent threading.Thread.join() from blocking when a previous call raised an
...
exception (e.g., passing in an illegal argument).
Applies patch #1314396 . Thanks Eric Blossom.
2005-11-23 02:15:50 +00:00
Kurt B. Kaiser
5c6e0a1a0c
1. Made advanced keybinding dialog functional.
...
2. Allow binding of movement keys
2005-11-22 21:09:37 +00:00
Georg Brandl
4a5a91838b
Prefer GNOME browser over mozilla.
2005-11-22 19:18:01 +00:00
Andrew M. Kuchling
841d25ee66
[Patch #1094164 ] replaceChild(x,x) ends up removing x of the tree. Add fix from Felix Rabe and a test case
2005-11-22 19:03:16 +00:00
Andrew M. Kuchling
bb7e800506
[Patch #1350573 ] zlib.crc32 doesn't handle 0xffffffff seed. Add tests and bugfix. Bug reported by John Schmidt; bugfix by Danny Yoo.
2005-11-22 15:32:28 +00:00
Walter Dörwald
d331b433c3
Use optparse instead of getopt for command line options.
...
Use "raise instance" instead of "raise class, args".
Modernize the code in other spots (bools, startswith()).
2005-11-22 14:12:21 +00:00
Walter Dörwald
91043f3286
Avoid using str as a variable name.
2005-11-22 12:58:19 +00:00
Neal Norwitz
5898fa2dcd
improve test coverage in Python/pystrtod.c and Python/mystrtoul.c.
2005-11-22 05:17:40 +00:00
Kurt B. Kaiser
3b148ca43d
Fix typo and update comment obsoleted by 'syntax' patch
2005-11-22 02:17:10 +00:00
Kurt B. Kaiser
2bf2af6d9b
Default two second delay on attribute pop-up, less noisy interface.
...
(Opens immediately if TAB is typed after '.')
2005-11-22 01:52:22 +00:00
Kurt B. Kaiser
5a67f9b815
Following 'syntax' patch, accelerator keys in menus weren't being
...
updated after a keyset change. Also, formatted ApplyKeyBindings()
2005-11-22 01:47:14 +00:00
Walter Dörwald
09f0dd5842
Use basestring instead of type.StringType for checking whether a input
...
or output file is a file name instead of a file object. This enables
unicode file names as arguments to uu.encode() and uu.decode().
2005-11-21 19:10:07 +00:00
Walter Dörwald
705fd474e9
Add a test for uu.encode() that passed filenames as
...
in_file and out_file.
2005-11-21 18:55:56 +00:00
Walter Dörwald
c69d1c498f
Add a rudimentary test for the platform module that at least calls each
...
documented function once.
2005-11-21 17:48:12 +00:00
Walter Dörwald
e5a7fad356
Fix typo.
2005-11-21 17:01:27 +00:00
Kurt B. Kaiser
b17544551f
Merge IDLE-syntax-branch r39668:41449 into trunk
...
A idlelib/AutoCompleteWindow.py
A idlelib/AutoComplete.py
A idlelib/HyperParser.py
M idlelib/PyShell.py
M idlelib/ParenMatch.py
M idlelib/configDialog.py
M idlelib/EditorWindow.py
M idlelib/PyParse.py
M idlelib/CallTips.py
M idlelib/CallTipWindow.py
M idlelib/run.py
M idlelib/config-extensions.def
A idlelib/MultiCall.py
2005-11-18 22:05:48 +00:00
Walter Dörwald
c85c74cd08
Increase code coverage in Python/structmember.c from 33% to 40%
...
(by forcing a call to the listmember() function).
2005-11-18 16:51:05 +00:00
Walter Dörwald
690402ff17
Add tests to increase code coverage in Python/codecs.c and Python/exceptions.c.
2005-11-17 18:51:34 +00:00
Walter Dörwald
e22d339dc5
Add tests for various error cases and for readbuffer_encode() and
...
charbuffer_encode(). This increases code coverage in Modules/_codecsmodule.c
from 83% to 95%.
2005-11-17 08:52:34 +00:00
Kurt B. Kaiser
b61602c968
Better indentation after first line of string continuation.
...
IDLEfork Patch 681992, Noam Raphael
2005-11-15 07:20:06 +00:00
Fredrik Lundh
96c1c7a571
SF#1343671.
...
The removedirs function removes empty directories, it doesn't
empty them.
2005-11-12 15:55:04 +00:00
Fredrik Lundh
d489398da9
r903@spiff: Fredrik | 2005-11-12 16:28:37 +0100
...
removed outdated copyright notices (etc)
2005-11-12 15:28:52 +00:00
Fredrik Lundh
0d89e351e1
r879@spiff: Fredrik | 2005-11-12 14:38:03 +0100
...
r878@spiff: Fredrik | 2005-11-12 14:37:22 +0100
minor docstring and comment tweaks (wikipedia might not be the
ultimate reference, but it's a lot better than "XXX" ;-)
2005-11-12 15:21:05 +00:00
Walter Dörwald
e62e936e79
Change PrettyPrinter.pprint(), so that output is written directly to the
...
output stream, instead of writing it to a StringIO first and writing the
result of this to the output stream. This should speed up the initial
output.
2005-11-11 18:18:51 +00:00
Georg Brandl
1cb179e93f
Bug #1338995 : fix problem with new webbrowser.py.
2005-11-09 21:42:48 +00:00
Walter Dörwald
966c264b02
Fix typos.
2005-11-09 17:12:43 +00:00
Vinay Sajip
8b6b53f8ac
Fixed indentation bug in _connect_unixsocket (thanks to Ken Lalonde for reporting it/supplying a patch)
2005-11-09 13:55:13 +00:00
Marc-André Lemburg
380f417e15
Patch by pythonic <pythonic@gmail.com> to support Fedora
...
as Linux distro.
2005-11-07 16:11:02 +00:00
Armin Rigo
c6686b7c7e
Added proper reflection on instances of <type 'method-wrapper'>, e.g.
...
'[].__add__', to match what the other internal descriptor types provide:
'__objclass__' attribute, '__self__' member, and reasonable repr and
comparison.
Added a test.
2005-11-07 08:38:00 +00:00
Armin Rigo
f4afb21526
similar to SF bug 847019: a quick check in the time() constructor, which
...
accepts strings only for unpickling reasons. This check prevents the honest
mistake of passing a string like '2:59.0' to time() and getting an insane
object.
2005-11-07 07:15:48 +00:00
Ka-Ping Yee
9a2dcf8ac1
Fix SF bug #417833 (pydoc HTTP reload failure) by removing from
...
sys.modules all submodules of a the given module/package path
when trying to reload a module.
2005-11-05 05:04:41 +00:00
Ka-Ping Yee
a487e4eb05
Accept patch to resolve SF bug #651124 .
2005-11-05 04:49:18 +00:00
Neal Norwitz
6d98ed4ad2
Oops, forgot to add the output file to 41388.
2005-11-03 05:07:15 +00:00
Neal Norwitz
0f46bbf781
Bug #1346533 , select.poll() doesn't raise an error if timeout > sys.maxint
...
Need to check return result of PyInt_AsLong()
Will backport.
2005-11-03 05:00:25 +00:00
Brett Cannon
5d0bf9446b
Change time.strptime() to raise ValueError whenever there is an error in the
...
format string. Before exceptions generated by the internal code propagated up
to the user and were not helpful.
Closes bug #1340337 .
2005-11-02 23:04:26 +00:00
Neal Norwitz
cf4863831c
Fix SF #1345263 , colorsys tests, bug in frange
...
Fix a typo that caused step to be ignored.
Will backport.
2005-11-02 05:54:27 +00:00
Vinay Sajip
245a5ab31b
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError
2005-10-31 14:27:01 +00:00
Vinay Sajip
85c1909a78
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError
2005-10-31 13:14:19 +00:00
Tim Peters
383d3c0a68
test_directories(): This test had no chance of passing on
...
Windows. Hacked it to pass, but not sure it's worth the
bother.
2005-10-30 01:15:38 +00:00
Fred Drake
db390c1ad8
fix typos, mostly in comments
2005-10-28 14:39:47 +00:00
Neal Norwitz
f339654280
Patch #1338314 , Bug #1336623 : fix tarfile so it can extract
...
REGTYPE directories from tarfiles written by old programs.
Will backport.
2005-10-28 05:52:22 +00:00
Marc-André Lemburg
d9cf593b49
Cosmetic change: make all hex literals use upper case hex so that they
...
look more like the Unicode Consortium files.
Add ending new-line to all source files.
2005-10-24 12:14:59 +00:00
Marc-André Lemburg
3c72ded23d
Removed the decoding_map from the codecs where this is possible.
...
Replaced the tis_620, cp1140 and koi8_u codecs with new ones
based on custom mapping files.
2005-10-24 12:07:49 +00:00
Neal Norwitz
6ab080cd40
Fix problem handling EXTENDED_ARGs from SF bug # 1333982
2005-10-24 00:08:10 +00:00
Neal Norwitz
f8950654e3
Fix compiler test when run with -u (long mode)
2005-10-24 00:01:37 +00:00
Vinay Sajip
1e86beb3f8
One-off "No handlers..." error message only raised if raiseExceptions is set.
2005-10-23 22:32:59 +00:00
Neil Schemenauer
d403c45386
Fix arigo's funky LOAD_NAME bug: implicit globals inside classes have
...
historically been looked up using LOAD_NAME, not LOAD_GLOBAL.
looked up by LOAD_NAME, not
2005-10-23 04:24:49 +00:00
Neal Norwitz
ebc3457937
Revert previous checkin:
...
According to Jeremy, the comment only made sense when
the yield was disallowed. Now it's testing that the yield
is allowed, so it's not bad and the outer finally is irrelevant.
2005-10-22 03:51:42 +00:00
Neil Schemenauer
ab541bb98e
Revert change, func_name of lambda's is back to <lambda>.
2005-10-21 18:11:40 +00:00
Marc-André Lemburg
0f00ba8bd8
Replace the old EBCDIC codecs with new ones using the decoding table.
2005-10-21 14:35:35 +00:00
Marc-André Lemburg
7797be7b3b
Alias iso8859_1 to latin_1 which is the same encoding, but has
...
a much faster codec implementation.
2005-10-21 14:02:28 +00:00
Marc-André Lemburg
75c9e8392e
Add a few more Mac OS encodings. The mapping tables for these are
...
available at ftp.unicode.org.
2005-10-21 13:58:32 +00:00
Marc-André Lemburg
a1129f4b9b
Replace the old charmap codecs with new ones generated from the current
...
mapping tables available at ftp.unicode.org.
These new codecs include and use character decoding tables which speeds
up decoding by a few factors.
2005-10-21 13:49:12 +00:00
Michael W. Hudson
b2308bb9be
Fix bug:
...
[ 1327110 ] wrong TypeError traceback in generator expressions
by removing the code that can stomp on the users' TypeError raised by the
iterable argument to ''.join() -- PySequence_Fast (now?) gives a perfectly
reasonable message itself. Also, a couple of tests.
2005-10-21 11:45:01 +00:00
Neal Norwitz
37c0844b35
Fix SF bug #1167751 , Argument genexp corner case
...
Incorrect code was generated for:
foo(a = i for i in range(10))
This should have generated a SyntaxError. Fix the Grammar so
it raises a SyntaxError and test it.
I'm uncertain whether this should be backported. It makes
something that was Syntactically valid invalid. However,
the code would either be completely broken or do the wrong thing.
2005-10-21 06:24:02 +00:00
Neal Norwitz
1e8659b963
Don't use a string exception since it's deprecated
2005-10-21 06:00:24 +00:00
Neal Norwitz
f21c8ed58a
Add comment lost from AST merge
2005-10-21 04:34:18 +00:00
Jeremy Hylton
3e0055f8c6
Merge ast-branch to head
...
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.
The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Jeremy Hylton
bc2a62fcfd
Disable some tests in anticipation of merging ast-branch to the head
2005-10-20 14:27:21 +00:00
Neal Norwitz
b0e32e2b71
Fix SF bug # 1330039, patch # 1331635 from Lars Gustaebel (tarfile maintainer)
...
Problem: if two files are assigned the same inode
number by the filesystem, the second one will be added
as a hardlink to the first, which means that the
content will be lost.
The patched code checks if the file's st_nlink is
greater 1. So only for files that actually have several
links pointing to them hardlinks will be created, which
is what GNU tar does.
Will backport.
2005-10-20 04:50:13 +00:00
Neal Norwitz
40563eddf1
Get BSD DB working most for version 3.2
2005-10-20 04:36:08 +00:00
Raymond Hettinger
4b0f20def3
Teach unquote() to handle unicode inputs
2005-10-15 16:41:53 +00:00
Vinay Sajip
239322b97e
Optimised Placeholders handling of child loggers by using a dict rather than a list (much slower in the pathological case of hundreds of child Loggers to a Placeholder - problem reported by Ryan Blazecka).
2005-10-14 09:36:35 +00:00
Vinay Sajip
b79350601b
Added Host and Content-type headers to requests sent by HTTPHandler (suggested by Steven Vereecken)
2005-10-11 13:15:31 +00:00
Walter Dörwald
007f8dfde2
Bug #1245379 : Add "unicode-1-1-utf-7" as an alias for "utf-7" as specified
...
by RFC 1642.
2005-10-09 19:42:27 +00:00
Georg Brandl
b980113a8d
Fix errors in _synthesize because of missing basename attribute of
...
browser controller classes.
2005-10-08 20:47:38 +00:00
Guido van Rossum
c252c5964c
Fix unit test failure -- the output received from Python can be empty,
...
but verify_valid_flag() wasn't expecting that. Will backport.
2005-10-08 20:04:35 +00:00
Vinay Sajip
43d6e812c8
Fixed bug where the logging message was wrongly being demoted from Unicode to string (SF #1314107 )
2005-10-07 08:35:36 +00:00
Walter Dörwald
d1c1e10f70
Part of SF patch #1313939 : Speedup charmap decoding by extending
...
PyUnicode_DecodeCharmap() the accept a unicode string as the mapping
argument which is used as a mapping table.
This code isn't used by any of the codecs yet.
2005-10-06 20:29:57 +00:00
Raymond Hettinger
cc9a951f35
SF #1313496 : bisect C replacement doesn't accept named args
2005-10-05 11:39:12 +00:00
Neal Norwitz
196f733d93
Fix pychecker warnings
2005-10-04 03:17:49 +00:00
Kurt B. Kaiser
389482ccbe
Incorporate Tal Einat's comment on Patch 936169: Fixes alignment problem.
2005-10-03 20:08:25 +00:00
Kurt B. Kaiser
0a1357930a
Tweak CodeContext.py docstrings, comments, and names.
2005-10-03 19:26:03 +00:00
Georg Brandl
e8f244305e
Patch #754022 : Greatly enhanced webbrowser.py.
2005-10-03 14:16:44 +00:00
Neal Norwitz
11bd119226
SF bug #887946 , segfault if redirecting directory
...
Also provide a warning if a directory is passed on the command line.
Add minimal command line test.
Will backport.
2005-10-03 00:54:56 +00:00
Kurt B. Kaiser
74910225df
Increased performance in CodeContext extension Patch 936169 Noam Raphael
2005-10-02 23:36:46 +00:00
Neal Norwitz
40d3781416
- Fix segfault with invalid coding.
...
- SF Bug #772896 , unknown encoding results in MemoryError, which is not helpful
I will only backport the segfault fix. I'll let Anthony decide if he wants
the other changes backported. I will do the backport if asked.
2005-10-02 01:48:49 +00:00
Georg Brandl
8b813db2ef
bug [ 729103 ] Cannot retrieve name of super object
2005-10-01 16:32:31 +00:00
Neal Norwitz
484d9a409a
Patch #1309009 , Fix segfault in pyexpat when the XML document is
...
in latin_1, but Python incorrectly assumes it is in UTF-8 format
Will backport.
2005-09-30 04:46:49 +00:00
Georg Brandl
aa93517de8
patch [ 1300515 ] xdrlib.py: pack_fstring() did not use null bytes for padding
2005-09-29 20:49:16 +00:00
Georg Brandl
80ba8e8549
bug [ 1296004 ] MemoryError in httplib
2005-09-29 20:16:07 +00:00
Armin Rigo
dd5c023af5
some more fixes and tests for inspect.getsource(), triggered by crashes
...
from the PyPy project as well as the SF bug #1295909 .
2005-09-25 11:45:45 +00:00
Raymond Hettinger
6b27cda643
Convert iterator __len__() methods to a private API.
2005-09-24 21:23:05 +00:00
Peter Astrand
3a708dfc88
Changed license header: Now simply referring to PSF. This closes bug
...
1138653.
2005-09-23 17:37:29 +00:00
Michael W. Hudson
10402a306f
Patches #1298449 and #1298499 : Add some missing checks for error
...
returns in cStringIO.c. Thanks to Andrew Bennetts.
This must be a backport candidate.
2005-09-22 09:19:01 +00:00
Jack Jansen
19e11c86a7
MacOSX 10.4 apparently does not allow the creation time to be set to later
...
than the modification time. Changed the SetDates test to accomodate.
Backport candidate.
2005-09-21 20:52:11 +00:00
Armin Rigo
f879024487
test and fix for buggy handling of exceptions raised by C functions,
...
causing the profiler to crash on an AssertionError if the same Python
function catches multiple exceptions from C functions.
2005-09-20 18:50:13 +00:00
Matthias Klose
f3f231f60c
- Patch #1166948 : locale.py: Prefer LC_ALL, LC_CTYPE and LANG over LANGUAGE
...
to get the correct encoding.
- Patch #1166938 : locale.py: Parse LANGUAGE as a colon separated list of
languages.
2005-09-20 07:02:49 +00:00
Armin Rigo
3a703b6059
Reverted revision 1.83, which introduced a bug and subtle incompatibility
...
issues. See bug #1112856 .
2005-09-19 09:11:04 +00:00
Skip Montanaro
f8948ca5d7
skip _locale test if OS X < 10.4
2005-09-19 03:54:46 +00:00
Martin v. Löwis
4ed673877d
Patch #1268314 : Cache lines in StreamReader.readlines for performance.
...
Will backport to Python 2.4.
2005-09-18 08:34:39 +00:00
Georg Brandl
9e28107ce8
Test case for latest complexobject fix.
2005-09-17 07:51:15 +00:00
Vinay Sajip
116f16e4ab
Added lock acquisition around handler removal from logger
2005-09-16 10:33:40 +00:00
Raymond Hettinger
9bda1d6f64
No longer ignore exceptions raised by comparisons during key lookup.
...
Inspired by Armin Rigo's suggestion to do the same with dictionaries.
2005-09-16 07:14:21 +00:00
Brett Cannon
a783d06f8c
Clear out the regex cache when the TimeRE cache is invalidated by a locale
...
change.
Fixes bug #1290505 .
2005-09-15 02:34:56 +00:00
Guido van Rossum
8ee3e5aa93
- Changes donated by Elemental Security to make it work on AIX 5.3
...
with IBM's 64-bit compiler (SF patch #1284289 ). This also closes SF
bug #105470 : test_pwd fails on 64bit system (Opteron).
2005-09-14 18:09:42 +00:00
Gustavo Niemeyer
6fa0c5a452
Bug #1202493 : Fixing SRE parser to handle '{}' as perl does, rather than
...
considering it exactly like a '*'.
2005-09-14 08:54:39 +00:00
Raymond Hettinger
ebb7f30111
Speed-up escape()
2005-09-12 22:50:37 +00:00
Raymond Hettinger
a1d09e2ded
Minor cleanup.
2005-09-11 16:34:05 +00:00
Raymond Hettinger
cf6b6326e5
Corrected version of 1.170
2005-09-10 18:17:54 +00:00
Raymond Hettinger
2bdec7bfb0
Revert 1.170. Add tests.
2005-09-10 14:30:09 +00:00
Raymond Hettinger
803ce801ab
Simplify and speed-up unquote().
2005-09-10 06:49:04 +00:00