Nick Coghlan
13c25c08ca
Fix an incompatibility between the -i and -m command line switches as reported on python-dev by PJE - runpy.run_module now leaves any changes it makes to the sys module intact after the function terminates
2007-07-24 13:58:28 +00:00
Nick Coghlan
4f82a03714
Tweak runpy test to do a better job of confirming that sys has been manipulated correctly
2007-07-24 13:07:38 +00:00
Nick Coghlan
ae21fc6d1f
Correctly cleanup sys.modules after executing runpy relative import
...
tests
Restore Python 2.4 ImportError when attempting to execute a package
(as imports cannot be guaranteed to work properly if you try it)
2007-07-23 13:41:45 +00:00
Nick Coghlan
f17a2e4f87
Add explicit relative import tests for runpy.run_module
2007-07-22 10:18:07 +00:00
Facundo Batista
7f4f41255f
Selectively enable tests for asyncore.readwrite based on the presence
...
of poll support in the select module (since this is the only case in
which readwrite can be called). [GSoC - Alan McIntyre]
2007-07-22 00:13:00 +00:00
Facundo Batista
b1994b4a5d
Added a select.select call in the test server loop to make sure the
...
socket is ready to be read from before attempting a read (this
prevents an error 10035 on some Windows platforms). [GSoC - Alan
McIntyre]
2007-07-19 23:57:38 +00:00
Kurt B. Kaiser
db98f3632a
Fix failing unicode test caused by change to ast.c at r56441
2007-07-18 19:58:42 +00:00
Guido van Rossum
b6ac23cd07
SF patch# 1755885 by Kurt Kaiser: show location of Unicode escape errors.
...
(Slightly tweaked for style and refcounts.)
2007-07-18 17:19:14 +00:00
Facundo Batista
78e19616f3
Prevent asyncore.dispatcher tests from hanging by adding loop counters
...
to server & client, and by adding asyncore.close_all calls in
tearDown. Also choose correct expected logging results based on the
value of __debug__ [Alan McIntyre - GSoC]
2007-07-17 02:19:39 +00:00
Facundo Batista
66263cf151
Changed the used port and commented out some tests that uses
...
a non documented function that appers to uses resources
not present in Windows.
2007-07-15 20:30:39 +00:00
Facundo Batista
f47bc182f1
First version. Includes tests for helper functions: read, write,
...
_exception, readwrite, closeall, compact_traceback; and for classes
dispatcher, dispatcher_with_send, and file_wrapper.
[Alan McIntyre - GSoC]
2007-07-14 22:41:45 +00:00
Andrew M. Kuchling
2b09ef0c6d
Avoid exception if there's a stray directory inside a Maildir folder.
...
The Maildir specification doesn't seem to say anything about this
situation, and it can happen if you're keeping a Maildir mailbox in
Subversion (.svn directories) or some similar system. The patch just
ignores directories in the cur/, new/, tmp/ folders.
2007-07-14 21:56:19 +00:00
Barry Warsaw
81a06d4260
In response to this SF bug:
...
[ 1752723 ] email.message_from_string: initial line gets discarded
I added a test to assert that when the first line of text passed to
message_from_string() contains a leading space, the message ends up with the
appropriate FirstHeaderLineIsContinuationDefect on its defects list.
The bug is invalid.
2007-07-13 22:12:58 +00:00
Thomas Heller
fa704c6ade
Fix for SF# 1701409: segfault in c_char_p of ctypes. The repr output
...
of c_char_p and c_wchar_p has changed as a sideeffect.
2007-07-13 17:12:23 +00:00
Thomas Heller
ad0cfe3dd7
Do not try to load the GLUT library in the ctypes tests. This test
...
adds little value, but has a large problem on OS X, as explained in
SF# 1581906.
2007-07-13 16:50:43 +00:00
Thomas Heller
1fd1cc5be2
Add tests for _ctypes.COMError.
2007-07-13 14:18:06 +00:00
Facundo Batista
5a3b524e8e
Added tests for basic behavior of DateTime, Binary, and Fault classes
...
and the escape function. Check that marshalling recursive sequences &
dicts raises TypeError. Check that marshalling out-of-range ints
raises OverflowError [Alan McIntyre - GSoC]
2007-07-13 10:43:44 +00:00
Georg Brandl
4b3ab6fcc0
Patch #1675424 : Added tests for uncovered code in the zipfile module.
...
The KeyError raised by Zipfile.getinfo for nonexistent names now has
a descriptive message.
2007-07-12 09:59:22 +00:00
Georg Brandl
b2e208f901
Patch #1731169 : clean up expected skips list.
2007-07-12 09:24:04 +00:00
Georg Brandl
7c3b50db66
Patch #1673759 : add a missing overflow check when formatting floats
...
with %G.
2007-07-12 08:38:00 +00:00
Georg Brandl
bc5fbd9f8c
Patch #1739696 : use code.co_code only if really necessary
2007-07-12 08:11:29 +00:00
Georg Brandl
f91149e4a1
Patch #1752270 , #1750931 : complain if urllib2 add_handler called
...
without handler.
2007-07-12 08:05:45 +00:00
Ronald Oussoren
9b0bcc1f4b
Patch 1693258: Fix for duplicate "preferences" menu-OS X
2007-07-09 06:02:21 +00:00
Neal Norwitz
e3b185f966
Fix typo in comment
2007-07-06 04:13:39 +00:00
Georg Brandl
ee250301b7
Fix a few webbrowser.py problems.
2007-07-01 08:11:35 +00:00
Georg Brandl
75ec1dbd9d
Bug #1737864 : allow empty message in logging format routines.
2007-06-19 12:36:00 +00:00
Lars Gustäbel
104490e615
Added exclude keyword argument to the TarFile.add() method.
2007-06-18 11:42:11 +00:00
Marc-André Lemburg
b24cd0f05a
Add patch #1726668 : Windows Vista support.
2007-06-12 09:26:49 +00:00
Marc-André Lemburg
0e09788eda
Apply patch #1734945 to support TurboLinux as distribution.
2007-06-12 09:09:58 +00:00
Neal Norwitz
c161cb9955
Bug #1734723 : Fix repr.Repr() so it doesn't ignore the maxtuple attribute.
...
Will backport
2007-06-11 07:29:43 +00:00
Neal Norwitz
ade2c216e1
Not sure why this only fails sometimes on Unix machines. Better
...
to disable it and only import msvccompiler on Windows since that's
the only place it can work anyways.
2007-06-11 06:16:48 +00:00
Neal Norwitz
478b99b89f
Add all of the distuils modules that don't seem to have explicit tests. :-(
...
Move an import in mworkscompiler so that this module can be imported on
any platform. Hopefully this works on all platforms.
2007-06-11 05:28:45 +00:00
Neal Norwitz
fdffca27c1
Prevent hang if the port cannot be opened.
2007-06-11 04:52:37 +00:00
Neal Norwitz
5c9a81a3d8
Fix a bug when there was a newline in the string expandtabs was called on.
...
This also catches another condition that can overflow.
Will backport.
2007-06-11 02:16:10 +00:00
Neal Norwitz
ba965deea8
Prevent these tests from running on Win64 since they don\'t apply there either
2007-06-11 02:14:39 +00:00
Martin v. Löwis
6371cd8177
Patch #1733960 : Allow T_LONGLONG to accept ints.
...
Will backport to 2.5.
2007-06-09 07:42:52 +00:00
Neal Norwitz
7dbd2a3720
Prevent expandtabs() on string and unicode objects from causing a segfault when
...
a large width is passed on 32-bit platforms. Found by Google.
It would be good for people to review this especially carefully and verify
I don't have an off by one error and there is no other way to cause overflow.
2007-06-09 03:36:34 +00:00
Thomas Heller
1b9e041812
Make this test work with older Python releases where struct has no 't' format character.
2007-06-08 16:10:27 +00:00
Georg Brandl
ff8712263d
Patch #1667860 : Fix UnboundLocalError in urllib2.
2007-06-07 13:34:10 +00:00
Georg Brandl
e06cf4534f
Disallow function calls like foo(None=1).
...
Backport from py3k rev. 55708 by Guido.
2007-06-07 13:23:24 +00:00
Facundo Batista
10951d51e2
Added an optional timeout parameter to function urllib2.urlopen,
...
with tests in test_urllib2net.py (must have network resource
enabled to execute them). Also modified test_urllib2.py because
testing mock classes must take it into acount. Docs are also
updated.
2007-06-06 17:15:23 +00:00
Facundo Batista
9249312020
FTP.ntransfercmd method now uses create_connection when passive,
...
using the timeout received in connection time.
2007-06-06 15:13:37 +00:00
Collin Winter
50b79ce8e6
Patch #1731049 : make threading.py use a proper "raise" when checking internal state, rather than assert statements (which get stripped out by -O).
2007-06-06 00:17:35 +00:00
Hye-Shik Chang
f9a0ea8ce1
Fix for Windows: close a temporary file before trying to delete it.
2007-06-05 19:28:15 +00:00
Hye-Shik Chang
9b5414090b
Bug #1728403 : Fix a bug that CJKCodecs StreamReader hangs when it
...
reads a file that ends with incomplete sequence and sizehint argument
for .read() is specified.
2007-06-05 18:58:51 +00:00
Brett Cannon
f7188cefb3
Make _strptime.TimeRE().pattern() use ``\s+`` for matching whitespace instead
...
of ``\s*``. This prevents patterns from "stealing" bits from other patterns in
order to make a match work.
Closes bug #1730389 . Will be backported.
2007-06-03 23:13:41 +00:00
Neal Norwitz
4a700bb469
SF 1668596/1720897: distutils now copies data files
...
even if package_dir is empty.
This needs to be backported. I'm too tired tonight. It would be great
if someone backports this if the buildbots are ok with it. Otherwise,
I will try to get to it tomorrow.
2007-06-01 07:29:12 +00:00
Brett Cannon
f0cb1d7ad6
Have cfmfile raise a DeprecationWarning as per PEP 4.
2007-05-31 20:01:11 +00:00
Brett Cannon
791d56f1f7
Cause buildtools to raise a DeprecationWarning.
2007-05-31 19:40:42 +00:00
Brett Cannon
c2aa09ad80
Have the sha module raise a DeprecationWarning as specified in PEP 4.
2007-05-31 19:20:00 +00:00
Brett Cannon
7eec217908
Have md5 raise a DeprecationWarning as per PEP 4.
2007-05-30 22:24:28 +00:00
Brett Cannon
c249bdab92
Have mimify raise a DeprecationWarning. The docs and PEP 4 have listed the
...
module as deprecated for a while.
2007-05-30 21:48:58 +00:00
Brett Cannon
90134c9a05
Have MimeWriter raise a DeprecationWarning as per PEP 4 and its documentation.
2007-05-30 20:46:26 +00:00
Thomas Heller
b4eec28e33
Correct the name of a field in the WIN32_FIND_DATAA and WIN32_FIND_DATAW structures.
...
Closes bug #1726026 .
2007-05-30 07:01:25 +00:00
Martin v. Löwis
e9607e24a7
Revert 55634.
2007-05-29 04:02:03 +00:00
Martin v. Löwis
a652f69c1c
Test pre-commit hook for a link to a .py file.
2007-05-29 04:01:29 +00:00
Lars Gustäbel
a0fcb9384e
Added errors argument to TarFile class that allows the user to
...
specify an error handling scheme for character conversion. Additional
scheme "utf-8" in read mode. Unicode input filenames are now
supported by design. The values of the pax_headers dictionary are now
limited to unicode objects.
Fixed: The prefix field is no longer used in PAX_FORMAT (in
conformance with POSIX).
Fixed: In read mode use a possible pax header size field.
Fixed: Strip trailing slashes from pax header name values.
Fixed: Give values in user-specified pax_headers precedence when
writing.
Added unicode tests. Added pax/regtype4 member to testtar.tar all
possible number fields in a pax header.
Added two chapters to the documentation about the different formats
tarfile.py supports and how unicode issues are handled.
2007-05-27 19:49:30 +00:00
Peter Astrand
81a191b351
Applied patch 1669481, slightly modified: Support close_fds on Win32
2007-05-26 22:18:20 +00:00
Brett Cannon
6cef076ba5
Remove direct call's to file's constructor and replace them with calls to
...
open() as ths is considered best practice.
2007-05-25 20:17:15 +00:00
Vinay Sajip
754a5fb640
Updated docstring for SysLogHandler ( #1720726 ).
2007-05-25 07:05:59 +00:00
Neal Norwitz
38917f56fe
Get test passing again by commenting out the reference to the test class.
2007-05-25 05:13:40 +00:00
Facundo Batista
d9880d07fc
Commenting out the tests until find out who can test them in
...
one of the problematic enviroments.
2007-05-25 04:20:22 +00:00
Facundo Batista
e312416809
Fixing stupid error, and introducing a sleep, to see if the
...
other thread is awakened and finish sending data.
2007-05-25 03:47:19 +00:00
Facundo Batista
b4dfafaba6
Trying to make the tests work in Windows and Solaris, everywhere
...
else just works
2007-05-25 03:10:28 +00:00
Facundo Batista
62c744e7d1
Let's see if reading exactly what is written allow this live
...
test to pass (now I know why there were so few tests in ftp,
http, etc, :( ).
2007-05-24 20:51:19 +00:00
Facundo Batista
965fa24e8d
Removed the .recv() in the test, is not necessary, and was
...
causing problems that didn't have anything to do with was
actually being tested...
2007-05-24 20:01:59 +00:00
Facundo Batista
711a54ebde
Added an optional timeout parameter to urllib.ftpwrapper, with tests
...
(for this and a basic one, because there weren't any). Changed also
NEWS, but didn't find documentation for this function, assumed it
wasn't public...
2007-05-24 17:50:54 +00:00
Georg Brandl
dd96ca3d6b
Fix parameter passing.
2007-05-24 17:33:33 +00:00
Georg Brandl
c90bc75994
shlex.split() now has an optional "posix" parameter.
2007-05-24 16:49:29 +00:00
Georg Brandl
2134e754f2
Patch #1686487 : you can now pass any mapping after '**' in function calls.
2007-05-21 20:34:16 +00:00
Facundo Batista
70f996be24
Added timeout support to HTTPSConnection, through the
...
socket.create_connection function. Also added a small
test for this, and updated NEWS file.
2007-05-21 17:32:32 +00:00
Raymond Hettinger
767debb6aa
Allow all alphanumeric and underscores in type and field names.
2007-05-21 16:40:10 +00:00
Raymond Hettinger
0d6a8ccfb7
Replace assertion with straight error-checking.
2007-05-21 08:13:35 +00:00
Brett Cannon
41bf2fad62
Cause posixfile to raise a DeprecationWarning. Documented as deprecated since
...
Ptyhon 1.5.
2007-05-20 23:57:38 +00:00
Brett Cannon
49da0ead95
Move imgfile import to the global namespace to trigger an import error ASAP to
...
prevent creation of a test file.
2007-05-20 23:56:18 +00:00
Brett Cannon
5e2635103c
Remove the macfs module. This led to the deprecation of macostools.touched();
...
it completely relied on macfs and is a no-op on OS X according to code
comments.
2007-05-20 23:17:38 +00:00
Brett Cannon
dc48b74497
Remove the rgbimg module. It has been deprecated since Python 2.5.
2007-05-20 07:09:50 +00:00
Georg Brandl
8d76cca026
Fix docstring for add_package in site.py.
2007-05-19 18:09:26 +00:00
Neal Norwitz
d410b320ec
Give some clue as to what happened if the test fails.
2007-05-19 04:35:52 +00:00
Raymond Hettinger
f3241a3727
Fix beginner mistake -- don't mix spaces and tabs.
2007-05-19 01:50:11 +00:00
Raymond Hettinger
5a41daf096
Improvements to NamedTuple's implementation, tests, and documentation
2007-05-19 01:11:16 +00:00
Collin Winter
6290305e67
Backport PEP 3110's new 'except' syntax to 2.6.
2007-05-18 23:11:24 +00:00
Neal Norwitz
6eb7bede72
Verify neither dumps or loads overflow the stack and segfault.
2007-05-18 05:47:16 +00:00
Raymond Hettinger
72ef8daa88
calendar.py gets no benefit from xrange() instead of range()
2007-05-17 01:08:04 +00:00
Brett Cannon
d75f043c33
Remove the gopherlib module. It has been raising a DeprecationWarning since
...
Python 2.5.
Also remove gopher support from urllib/urllib2. As both imported gopherlib the
usage of the support would have raised a DeprecationWarning.
2007-05-16 22:42:29 +00:00
Neal Norwitz
b1a9b37aa8
Fix bug in marshal where bad data would cause a segfault due to
...
lack of an infinite recursion check.
Contributed by Damien Miller at Google.
2007-05-16 20:05:11 +00:00
Georg Brandl
a09a96a544
HTML-escape the plain traceback in cgitb's HTML output, to prevent
...
the traceback inadvertently or maliciously closing the comment and
injecting HTML into the error page.
2007-05-15 20:19:34 +00:00
Raymond Hettinger
8be9ab8497
Small speedup.
2007-05-14 20:52:31 +00:00
Neal Norwitz
cd498be90e
Remove support for freebsd[23] which haven't been released since 2000
...
or earlier. http://www.freebsd.org/releases/index.html
2007-05-13 21:13:42 +00:00
Georg Brandl
0c1f6fcaac
Add bz2 to content encodings.
2007-05-13 08:04:07 +00:00
Raymond Hettinger
a74b67e15e
Better tests for posixpath.commonprefix
2007-05-11 17:59:59 +00:00
Neal Norwitz
42dd86b8e2
Deprecate os.popen* and popen2 module in favor of the subprocess module.
2007-05-11 06:57:33 +00:00
Neal Norwitz
82be218e97
Remove trailing whitespace in docstring
2007-05-11 06:56:52 +00:00
Neal Norwitz
aa87fb6be4
Fix typo in docstring (the module is popen2, not 3).
2007-05-11 06:23:01 +00:00
Neal Norwitz
d9841039db
Don't ever report a failure when the sum of the reference count differences
...
are zero. This should help reduce the false positives.
The message about references leaking is maintained to provide as much
info as possible rather than simply suppressing the message at the source.
2007-05-11 05:55:15 +00:00
Collin Winter
fa9be8c289
Fix a bug in test.test_support.open_urlresource().
...
If the call to requires() doesn't precede the filesystem check, we get the following situation:
1. ./python Lib/test/regrtest.py test_foo # test needs urlfetch, not enabled, so skipped
2. ./python Lib/test/regrtest.py -u urlfetch test_foo # test runs
3. ./python Lib/test/regrtest.py test_foo # test runs (!)
By moving the call to requires() *before* the filesystem check, the fact that fetched files are cached on the local disk becomes an implementation detail, rather than a semantics-changing point of note.
2007-05-09 04:14:36 +00:00
Brett Cannon
229cee2d3d
Deprecate BaseException.message as per PEP 352.
2007-05-05 01:34:02 +00:00
Thomas Heller
2ebc4d8054
Oops, these tests do not run on Windows CE.
2007-05-04 19:56:32 +00:00
Thomas Heller
1ad576c267
Do not truncate 64-bit pointers to 32-bit integers.
...
Fixes SF #1703286 , will backport to release25-maint.
2007-05-04 19:54:22 +00:00
Thomas Heller
0455214f1c
Fix some ctypes test crashes, when running with a debug Python
...
version on win64 by using proper argtypes and restype function
attributes.
2007-05-04 07:14:39 +00:00