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