Benjamin Peterson
75c8be048b
remove executable property from doc files
2010-03-11 21:50:45 +00:00
Florent Xicluna
e2e81e8fcd
Fix repr of tree Element on windows.
2010-03-11 15:55:11 +00:00
Florent Xicluna
3e8c189faa
Issue #6472 : The xml.etree package is updated to ElementTree 1.3. The cElementTree module is updated too.
2010-03-11 14:36:19 +00:00
Victor Stinner
4478662f83
Another fix to test_executable() of test_sys: set the current working to avoid
...
the #7774 bug.
2010-03-11 13:46:06 +00:00
Victor Stinner
6ecd85f401
Fix test_executable introduce in previous commit (r78835): Windows is able to
...
retrieve the absolute Python path even if argv[0] has been set to a non
existent program name.
2010-03-11 13:27:35 +00:00
Victor Stinner
4a7e0c858c
Issue #7774 : Set sys.executable to an empty string if argv[0] has been
...
set to an non existent program name and Python is unable to retrieve the real
program name.
Fix also sysconfig: if sys.executable is an empty string, use the current
working directory.
2010-03-11 12:34:39 +00:00
Florent Xicluna
637637021a
Revert r78830: realpath() should really be applied to sys.executable.
2010-03-11 01:50:48 +00:00
Florent Xicluna
6602ec6eff
It is not optimal to test sys.stderr on a debug build.
2010-03-11 01:39:55 +00:00
Florent Xicluna
e58d91c8f0
Fix the test_subprocess failure when sys.executable is meaningless: '' or a directory.
...
It does not fix #7774 .
2010-03-11 00:56:59 +00:00
Florent Xicluna
85677617d5
Issue #7880 : Fix sysconfig when the python executable is a symbolic link.
2010-03-10 23:58:42 +00:00
Victor Stinner
3ec32005e8
ooops, fix error message in execusercustomize()
...
Copy/paste failure :-)
2010-03-10 22:45:04 +00:00
Victor Stinner
6664426d7c
Issue #3137 : Don't ignore errors at startup, especially a keyboard interrupt
...
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
2010-03-10 22:30:19 +00:00
Florent Xicluna
4d42f2b4d1
#7772 : Fix test_py3kwarn. Now the test suite could pass with "-3" flag.
2010-03-09 19:57:01 +00:00
Raymond Hettinger
e30bc38ce9
Improve code clarity a bit.
2010-03-09 11:29:10 +00:00
Raymond Hettinger
aba2293862
Have links in OrderedDicts be native Python lists instead
...
of a custom class with __slots__. This simplifies the
code a bit, reduces memory consumption, improves speed,
and eliminates the need for weak reference proxies.
2010-03-09 09:58:53 +00:00
Raymond Hettinger
9bd3508530
Add nicer docstrings to namedtuples().
...
Provides better tooltips and looks better in help().
2010-03-09 09:01:46 +00:00
Benjamin Peterson
f4803aa623
set svn:eol-style on various files
2010-03-08 22:15:11 +00:00
Florent Xicluna
47627d5164
#7624 : Fix isinstance(foo(), collections.Callable) for old-style classes.
2010-03-08 15:20:28 +00:00
Florent Xicluna
6f682be82b
Move some tests from test_macpath to test_genericpath.CommonTest
2010-03-08 12:39:35 +00:00
Florent Xicluna
d034b32f57
On finalize, don't try to join not started process.
2010-03-08 11:01:39 +00:00
Florent Xicluna
faf175385d
Replace the stderr logging with assertNotEqual(returncode, 0).
2010-03-08 10:59:33 +00:00
Florent Xicluna
cf741ceb69
Fix syntax: "rc != None" -> "rc is not None"
2010-03-08 10:58:12 +00:00
Florent Xicluna
52584779a6
Don't fail on a debug() statement, if the worker PID is (still) None.
2010-03-08 07:21:16 +00:00
R. David Murray
4617e5085a
Issue #7143 : get_payload used to strip any trailing newline from a
...
base64 transfer-encoded payload *after* decoding it; it no longer does.
email had a special method in utils, _bdecode, specifically to do this,
so it must have served a purpose at some point, yet it is clearly wrong
per RFC. Fixed with Barry's approval, but no backport. Email package
minor version number is bumped, now version 4.0.1.
Patch by Joaquin Cuenca Abela.
2010-03-08 02:04:06 +00:00
Florent Xicluna
16cd888dd9
Backport the Popen.poll() protection from subprocess to multiprocessing. See #1731717 .
...
It should fix transient failures on test_multiprocessing.
2010-03-07 23:49:03 +00:00
Michael Foord
08611b5e55
Remove accidental print statement from last commit.
2010-03-07 23:16:20 +00:00
Michael Foord
a715255a27
Fix accidental name rebinding in unittest py3k warning filtering.
2010-03-07 23:10:36 +00:00
Michael Foord
5ffa325a82
Addition of setUpClass and setUpModule shared fixtures to unittest.
2010-03-07 22:04:55 +00:00
Michael Foord
53e8eeadd6
Fix for potentials errors in constructing unittest failure messages. Plus skipped test methods no longer run setUp and tearDown (Issue 8059)
2010-03-07 20:22:12 +00:00
Florent Xicluna
fc8a1ed70e
Refresh the documentation for the test.test_support module.
2010-03-07 19:14:12 +00:00
Florent Xicluna
400efc2259
#2777 : Try hard to make Win7 buildbot happy...
2010-03-07 17:12:23 +00:00
Mark Dickinson
154b7ad07e
Issue #1530559 : When packing a non-integer with any integer conversion
...
code using struct.pack, attempt to convert to an integer first using
the argument's __int__ method (if present). Also raise a
DeprecationWarning for any such usage of __int__.
This fixes a regression from 2.6, where some (but not all) integer
conversion codes already used __int__.
2010-03-07 16:24:45 +00:00
Florent Xicluna
c083864fc8
Do not fail if returncode is 0 on send_signal/kill/terminate, for win32 platforms.
...
Do not hide the KeyboardInterrupt on POSIX platforms.
2010-03-07 15:27:39 +00:00
Florent Xicluna
c02bbe328d
#2777 : Enable test_send_signal, test_terminate and test_kill on win32 platforms.
2010-03-07 12:21:36 +00:00
Florent Xicluna
6de9e938a5
Issue #7849 : Now the utility ``check_warnings`` verifies if the warnings are
...
effectively raised. A new utility ``check_py3k_warnings`` deals with py3k warnings.
2010-03-07 12:18:33 +00:00
Florent Xicluna
1f3b4e12e8
Fix some py3k warnings in the standard library.
2010-03-07 12:14:25 +00:00
Senthil Kumaran
4e62949217
Reverting the change made in r78431.
2010-03-07 04:09:30 +00:00
Benjamin Peterson
6b31fd0f13
eliminate py3k warnings in argparse
2010-03-07 00:29:44 +00:00
Benjamin Peterson
8e7c1178a0
bump version to 2.7a4
2010-03-06 20:34:14 +00:00
Florent Xicluna
632df993dc
Skip test_send_signal, test_kill, test_terminate on win32 platforms, for 2.7a4 release.
2010-03-06 19:43:41 +00:00
Florent Xicluna
985478dbbb
Minor tweaking of previous r78734, and add a NEWS entry.
2010-03-06 18:52:52 +00:00
Florent Xicluna
dc1531c5c4
Create test_genericpath.CommonTest and reuse it to test other path modules.
2010-03-06 18:07:18 +00:00
Florent Xicluna
58526417ed
Do not print the header lines when running a single test.
2010-03-06 17:24:36 +00:00
Vinay Sajip
1adbee226e
Added checks for tuples in dictConfig.
2010-03-06 15:56:03 +00:00
Vinay Sajip
d45a278b93
Added schema version test in dictConfig.
2010-03-06 15:12:08 +00:00
Florent Xicluna
12d750d6b8
Backport "test.regrtest -R 2:3" syntax from py3k branch, and other minor adjustments.
2010-03-06 14:38:09 +00:00
Florent Xicluna
0b9a18a42f
#6906 : TCL_LIBRARY and TK_LIBRARY environment variables should be encoded.
2010-03-06 11:01:08 +00:00
Florent Xicluna
aa90db9477
#2777 : Apply same recipe on win32, i.e. do not inherit file handles.
2010-03-06 09:54:14 +00:00
Florent Xicluna
b7c20028fe
Print platform information to stdout, to help troubleshooting platform-specific failures.
2010-03-06 09:11:55 +00:00
Florent Xicluna
0932dc5671
Keep the test files in the ./build/ subdirectory, if Python is not installed.
...
Remove two hacks which are no longer needed after #7712 , because all __file__ attributes are absolute.
2010-03-06 08:07:44 +00:00
Gregory P. Smith
467298cb42
Call setreuid and setregid in a subprocess to avoid altering the test runner's
...
process state. Should fix issue8045.
2010-03-06 07:35:19 +00:00
Tarek Ziadé
c49b6efbca
search in the alternative location for VCExpress
2010-03-06 02:17:28 +00:00
Tarek Ziadé
5501e6a7da
fixed various failures and environment alterations in distutils.test_build_ext
2010-03-06 02:11:14 +00:00
Tarek Ziadé
895ee2419d
files used by win32 tests
2010-03-06 01:27:09 +00:00
Tarek Ziadé
7e48ff8e50
simplified the fallback case
2010-03-06 01:23:21 +00:00
Tarek Ziadé
fbf50b8c7c
provide a fallback for xxmodule.c in case the buildir is not present
2010-03-06 01:18:27 +00:00
Tarek Ziadé
b30868a391
copied back the build_ext tests from 2.6
2010-03-06 01:04:14 +00:00
Florent Xicluna
af9a06a77f
#2777 : Apply same recipe for test_terminate and test_kill, i.e. close or redirect fds.
2010-03-06 00:16:57 +00:00
Vinay Sajip
d77eb9a839
Factored out time usage determination into a method, to facilitate alternative formatting implementations in the future.
2010-03-05 22:11:24 +00:00
Florent Xicluna
cecef392f1
#2777 : Handle fds more carefully to try to fix some x86-Linux failures (namely, neal bot and twisted bot).
2010-03-05 19:31:21 +00:00
Mark Dickinson
1c0c78c61f
Fix incorrect stacklevel for DeprecationWarnings originating from the struct module.
...
Also clean up related tests in test_struct.
The stacklevel fix should be backported to 2.6 once that branch is unfrozen.
2010-03-05 14:36:20 +00:00
Gerhard Häring
3bbb67273a
Merged code from pysqlite 2.6.0.
2010-03-05 09:12:37 +00:00
Benjamin Peterson
2bb66e03b7
Merged revisions 78679,78681 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r78679 | benjamin.peterson | 2010-03-04 21:10:46 -0600 (Thu, 04 Mar 2010) | 1 line
set svn:eol-style
........
r78681 | benjamin.peterson | 2010-03-04 21:19:06 -0600 (Thu, 04 Mar 2010) | 1 line
remove svn:executable property
........
2010-03-05 03:24:17 +00:00
Benjamin Peterson
b3be23ad27
remove the svn:executable property from files that don't have shebang lines
2010-03-05 03:20:06 +00:00
Florent Xicluna
7272acfabe
These line should not be there.
2010-03-05 01:12:14 +00:00
Florent Xicluna
d6935631da
Let's use assertIsNone / assertIsNotNone. It's hype.
2010-03-05 01:05:55 +00:00
Florent Xicluna
80e0e2d2d8
Workaround #3137 : Retry SIGINT if it is not received the first time.
...
test_send_signal should not hang anymore on various Linux distributions.
2010-03-05 00:47:40 +00:00
Tarek Ziadé
dd7bef9bf5
reverting partially distutils to its 2.6.x state so 2.7a4 looks more like the 2.7b1 in this. the whole revert will occur after a4 is tagged
2010-03-05 00:16:02 +00:00
Florent Xicluna
ab5e17f896
#2777 : Enable test_send_signal, test_kill and test_terminate on all platforms.
2010-03-04 21:31:58 +00:00
Florent Xicluna
bab22a7c6d
Cleanup.
2010-03-04 19:40:48 +00:00
Dirkjan Ochtman
19c9b6042e
Try to fix buildbot breakage from r78384.
...
Thanks bitdancer and briancurtin for the help.
2010-03-04 19:21:53 +00:00
Florent Xicluna
3bc5cb7e0d
#7805 : wait until all workers are started before collecting their PIDs
2010-03-04 15:58:54 +00:00
Florent Xicluna
a36e245deb
Fix transient refleak in test_popen2.
2010-03-04 15:57:20 +00:00
Victor Stinner
7c924ec925
Issue #1054943 : Fix unicodedata.normalize('NFC', text) for the Public Review
...
Issue #29 .
PR #29 was released in february 2004!
2010-03-04 12:09:33 +00:00
Benjamin Peterson
e689a889da
set svn:executable on all regen scripts
2010-03-04 02:07:55 +00:00
Lars Gustäbel
6458104188
Issue #7232 : Add support for the context manager protocol
...
to the TarFile class.
2010-03-03 11:55:48 +00:00
Florent Xicluna
9e220be19d
Fix wording.
2010-03-02 23:56:38 +00:00
Benjamin Peterson
842b95b030
plug ref leaks
2010-03-02 23:43:47 +00:00
Victor Stinner
d23d3930ff
Issue #7820 : The parser tokenizer restores all bytes in the right if the BOM
...
check fails.
Fix an assertion in pydebug mode.
2010-03-02 23:20:02 +00:00
Benjamin Peterson
0e717addd8
remove cross-version compatibility code
2010-03-02 23:02:02 +00:00
Benjamin Peterson
bd56722a27
remove code to avoid BaseException.message bug
2010-03-02 22:58:01 +00:00
Florent Xicluna
c0a9d4152d
Test test_pep277 is only relevant for Unicode-friendly filesystems.
2010-03-02 22:34:11 +00:00
Benjamin Peterson
fa31eaa5f6
convert deprecated fail* methods to assert* variants
2010-03-02 22:26:25 +00:00
Benjamin Peterson
e4d90c23a3
use test_main() in __main__ section
2010-03-02 22:24:30 +00:00
Benjamin Peterson
4aa8a13b86
prevent warning filter adjustment from altering other tests
2010-03-02 22:23:33 +00:00
Benjamin Peterson
036fae39ac
enable running of argparse tests and fix two that failed in the new environment
2010-03-02 22:20:10 +00:00
Benjamin Peterson
5e32fe5f9d
remove another coding cookie
2010-03-02 22:08:40 +00:00
Benjamin Peterson
a39e966e97
set svn:eol-style
2010-03-02 22:05:59 +00:00
Benjamin Peterson
c1df5460c5
remove coding cookie as mandated by PEP 8
2010-03-02 22:03:03 +00:00
Florent Xicluna
2db61fb7a8
Tentatively enable test_pep277 on all platforms.
2010-03-02 21:34:45 +00:00
Florent Xicluna
d8472a4545
Refactor test_dict using assertRaises.
2010-03-02 16:00:00 +00:00
Steven Bethard
e9330e7941
Initial commit of the argparse library, based on argparse 1.1.
...
Docs still need some updating to make getopt and optparse match the wording promised in the PEP.
There are also probably a number of :class:ArgumentParser etc. links that could be added to the argparse documentation.
2010-03-02 08:38:09 +00:00
Barry Warsaw
08a8fb30b6
Manually copy patch for bug 7250 from the release26-maint branch. I suck
...
because I did this in the wrong order and couldn't smack svnmerge into
submission.
2010-03-01 21:46:51 +00:00
Florent Xicluna
e7901c5ebb
#7808 : Fix reference leaks in _bsddb and related tests.
2010-03-01 20:45:01 +00:00
R. David Murray
343facabf1
Issue 3892 again. The bsddb3 replication test still fails randomly.
...
Since this module is unmaintained in the library and gone in py3k,
this patch skips the remainder of the replication test if a
second timeout occurs, as it randomly does. This should improve buildbot
stability.
2010-03-01 19:14:16 +00:00
Gregory P. Smith
7512a9068d
Fix test to be skipped on windows.
2010-03-01 06:01:02 +00:00
Gregory P. Smith
6a65f85e79
Fixes issue #7999 : os.setreuid() and os.setregid() would refuse to accept
...
a -1 parameter on some platforms such as OS X.
2010-03-01 05:43:43 +00:00
Gregory P. Smith
3c699d334a
Adds c_ssize_t to ctypes. issue 6729.
2010-03-01 04:56:12 +00:00
Gregory P. Smith
3c1586ab45
Cleanup the test added in r78517 based on Ezio Melotti's feedback.
2010-03-01 03:09:19 +00:00
Gregory P. Smith
c1baf4ac9e
Fix the new test on windows (skip it, its posix only)
2010-03-01 02:53:24 +00:00
Gregory P. Smith
e6390a1503
Adds the hashlib.algorithms attribute. See issue7418.
2010-03-01 02:01:47 +00:00
Gregory P. Smith
9e5d1327f8
Issue #7242 : On Solaris 9 and earlier calling os.fork() from within a
...
thread could raise an incorrect RuntimeError about not holding the import
lock. The import lock is now reinitialized after fork.
2010-03-01 01:22:39 +00:00
Gregory P. Smith
cce211f88c
Issue #1068268 : The subprocess module now handles EINTR in internal
...
os.waitpid and os.read system calls where appropriate.
2010-03-01 00:05:08 +00:00
Gregory P. Smith
613c7a549a
Issue #7481 : When a threading.Thread failed to start it would leave the
...
instance stuck in initial state and present in threading.enumerate().
2010-02-28 18:36:09 +00:00
Florent Xicluna
78fd521f1a
Fix an oversight in r78508: p.wait() should be compared to 0
2010-02-27 21:15:27 +00:00
Florent Xicluna
98e3fc39bf
Clean test_subprocess: use assertRaises, skipIf, skipUnless helpers and a custom helper assertStderrEqual.
2010-02-27 19:20:50 +00:00
Florent Xicluna
be8c2b1ca7
#7793 : Fix RuntimeError when running "regrtest -R" for multibyte codecs.
2010-02-27 15:10:19 +00:00
Florent Xicluna
2a903b26e9
Issue #1729305 : Fix doctest to handle encode error with "backslashreplace". It fixes #7667 too.
2010-02-27 13:31:23 +00:00
Ezio Melotti
0263da547e
Add a test for normpath to test_macpath.
2010-02-27 12:42:52 +00:00
Florent Xicluna
f4b6186d9c
#691291 : codecs.open() should not convert end of lines on reading and writing.
2010-02-26 10:40:58 +00:00
Senthil Kumaran
e9a78083c0
Fix for Issue7540 ; urllib2 will raise a TypeError when you try to add_data to
...
a existing req object already having data.
2010-02-24 20:55:31 +00:00
Senthil Kumaran
8526adfbd9
Fix for Issue3819 - urllib2 sends Basic auth across redirects
2010-02-24 16:45:46 +00:00
Eric Smith
2d9856d6ce
Issue #7309 : Unchecked pointer access when converting UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings.
2010-02-24 14:15:36 +00:00
Dirkjan Ochtman
ebc73dce57
Issue #7427 : improve the representation of httplib.BadStatusLine exceptions.
2010-02-24 04:49:00 +00:00
R. David Murray
48605be128
Issue 7975: in python 2.6 bsddb.dbshelve switched from DictMixin to
...
MutableMapping, and thereby lost functionality because the replacement
functionality was implemented incorrectly or incompletely). Since bsddb
isn't in py3k, this patch just goes back to using DictMixin in order to
correct the regression.
2010-02-24 02:31:27 +00:00
Benjamin Peterson
300c5cc874
Merged revisions 78407 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r78407 | benjamin.peterson | 2010-02-23 20:21:34 -0600 (Tue, 23 Feb 2010) | 1 line
rewrite test to not rely on __doc__ being present
........
2010-02-24 02:24:35 +00:00
R. David Murray
effb24b31b
The primary copy of lib2to3 is not trunk, so the lib2to3 change
...
should not have been included in the -OO patch, back it out.
2010-02-24 02:08:28 +00:00
Victor Stinner
f20f9c299e
Issue #7649 : Fix u'%c' % char for character in range 0x80..0xFF
...
=> raise an UnicodeDecodeError. Patch written by Ezio Melotti.
2010-02-23 23:16:07 +00:00
Dirkjan Ochtman
8614817875
Fix #1537721 : add writeheader() method to csv.DictWriter.
...
Reviewed by skip.montanaro and thomas.wouters.
2010-02-23 21:09:52 +00:00
Thomas Heller
92bd059c67
ctypes CThunkObject was not registered correctly with the cycle
...
garbage collector, leading to possible leaks when using callback
functions.
2010-02-23 20:11:44 +00:00
Jack Diederich
429a74a11a
issue#6442 use in operator instead of has_key
2010-02-23 19:34:06 +00:00
Michael Foord
d99ef9a9df
unittest.TestResult can now be used with the TextTestRunner. TextTestRunner compatible with old TestResult objects.
2010-02-23 17:00:53 +00:00
Mark Dickinson
cf80f04b16
Fix spacing nit. Thanks Eric Smith for the public humiliation.
2010-02-23 13:06:50 +00:00
Mark Dickinson
8ee9187a16
Make global variable overflowok into a keyword argument; this fixes a failure when running ./python -m test.regrtest -R 3:2: test_format
2010-02-23 12:53:52 +00:00
Tarek Ziadé
b8708a298e
fixed #5801 : removed spurious empty lines in wsgiref
2010-02-23 05:53:05 +00:00
Tarek Ziadé
2900c4413b
completed the __all__ list and changed the module doctest
2010-02-23 05:36:41 +00:00
Tarek Ziadé
48cc8dc958
added make_archive (and secondary APIs) to shutil
2010-02-23 05:16:41 +00:00
Tarek Ziadé
b0aad6cd09
removed debugging code
2010-02-23 04:57:05 +00:00
R. David Murray
f28fd24c36
Issue 6292: for the moment at least, the test suite passes if run
...
with -OO. Tests requiring docstrings are skipped. Patch by
Brian Curtin, thanks to Matias Torchinsky for helping review and
improve the patch.
2010-02-23 00:24:49 +00:00
Eric Smith
87bcb243ac
Issue #6902 : Fix problem with built-in types format incorrectly with 0 padding.
2010-02-23 00:11:16 +00:00
Michael Foord
ae3db0a12b
Support for old TestResult object (unittest) with warnings when using unsupported features.
2010-02-22 23:28:32 +00:00
Jack Diederich
5cac46dd41
* fix issue#7476
2010-02-22 21:27:38 +00:00
Jack Diederich
1ce6136018
fixes issue #1522237 , bad init check in _threading_local
2010-02-22 19:55:22 +00:00
Andrew M. Kuchling
b72b0eb357
#7627 : MH.remove() would fail if the MH mailbox was locked;
...
it would call _unlock_file() and pass it a closed file object. Noted by Rob Austein.
2010-02-22 18:42:07 +00:00
Eric Smith
f32d4acead
Issue #7988 : Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types.
2010-02-22 18:33:47 +00:00
Senthil Kumaran
ee5546c316
Fix Issue7172 - BaseHTTPServer.BaseHTTPRequestHandler.responses[405] - changing
...
server to resource in the 405 response msg.
2010-02-22 10:55:08 +00:00
Michael Foord
2f6775617c
Silence UnicodeWarning in crazy unittest test.
2010-02-21 14:48:59 +00:00
Mark Dickinson
92cb4a8c6f
Reduce number of random tests in test_strtod, to avoid hogging buildbot time.
2010-02-21 14:42:27 +00:00
Mark Dickinson
45ad801ed0
Issue #7384 : skip test_curses on FreeBSD, in order to allow other buildbot tests to complete.
2010-02-21 13:37:53 +00:00
Mark Dickinson
82b34c5dbe
Issue #5211 : Fix complex type to avoid implicit calls to
...
complex.__coerce__. Thanks Meador Inge for the patch.
2010-02-21 12:57:35 +00:00
R. David Murray
51f1204590
Issue 7970: When email.Parser.Parser parses a MIME message of type
...
message/rfc822 it turns it into an object whose body consists of
a list containing a single Message object. HeaderParser, on the
other hand, just copies the body as a string. Generator.flatten
has a special handler for the message mime type that expected the
body to be the one item list. This fails if the message was parsed
by HeaderParser. So we now check to see if the body is a string
first, and if so just we just emit it.
2010-02-21 04:23:00 +00:00
Ezio Melotti
9e9af21d45
skip tests with a non-ascii cwd when the file system encoding is ascii
2010-02-20 22:34:21 +00:00
Senthil Kumaran
18d5a69669
Fix for Issue7751: urllib.urlopen("///C|/foo/bar/spam.foo")
2010-02-20 22:05:34 +00:00
Ezio Melotti
e3467d5c96
Remove e assertIs definitions and use correct assert* methods.
2010-02-20 09:40:07 +00:00
Ezio Melotti
4cc80ca921
#3426 : os.path.abspath now returns unicode when its arg is unicode.
2010-02-20 08:09:39 +00:00
Senthil Kumaran
4e78de89d0
Fix for Issue7904. urlparse.urlsplit to handle schemes in the way defined by RFC3986
2010-02-19 07:32:48 +00:00
Fred Drake
cc43b56960
- apply patch from issue 7005
...
- add corresponding documentation
2010-02-19 05:24:30 +00:00
Michael Foord
c2294dd6ba
Fix unittest.TestCase.assertDictContainsSubset so it can't die with unicode issues when constructing failure messages. Issue 7956
2010-02-18 21:37:07 +00:00
Michael Foord
225a099fe5
unittest.TestCase uses safe_repr for producing failure messages. Partial fix for issue 7956
2010-02-18 20:30:09 +00:00
Mark Dickinson
456e1652cf
Doctest fixes for decimal.py: add an integer-argument doctest for logical_invert; don't use integer literals with a leading zero.
2010-02-18 14:45:33 +00:00
Mark Dickinson
6d8effb1fc
Issue #7633 : Context method in the decimal module (with the exception
...
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted. Thanks
Juan José Conti for the patch.
2010-02-18 14:27:02 +00:00
Ezio Melotti
6f9030329c
#7941 : fix error message
2010-02-16 23:58:49 +00:00
Ezio Melotti
e511fc7979
#7930 : fix stripid
2010-02-16 23:26:09 +00:00
Mark Dickinson
876473bcc8
Check that 'd' isn't allowed as an exponent specifier in inputs to the float function.
2010-02-12 21:16:38 +00:00
Michael Foord
e5e7696458
Adding TextTestResult to unittest.__all__
2010-02-11 14:12:07 +00:00
R. David Murray
031ae6e904
Improve issue 7835 fix per MAL to handle the case that the
...
module dictionary has also been cleared.
2010-02-11 01:56:42 +00:00
R. David Murray
7c29f071d5
Issue 5754: tweak shelve doc wording to make it clearer that even when
...
writeback=True values are written to the backing store when assigned to
the shelf. Add test to confirm that this happens. Doc patch and added
test by Robert Lehmann. I also fixed the cross references to the sync
and close methods.
2010-02-11 01:38:42 +00:00
R. David Murray
63e4fd7eef
Issue 7835: Shelve's __del__ method calls its close method, and its
...
close method refers to an identifier in the global module namespace.
This means that when __del__ is called during interpreter shutdown (if,
for example, the calling program still has a pointer to the shelf),
sometimes that global identifier would wind up being None, causing
mysterious 'ignored' exceptions. This patch checks for the possible None
value first before using the global, thus avoiding the error messages.
2010-02-10 22:42:04 +00:00
Ezio Melotti
8f6a287029
#7712 : add a temp_cwd context manager to test_support and use it in regrtest to run all the tests in a temporary directory, saving the original CWD in test_support.SAVEDCWD. Thanks to Florent Xicluna who helped with the patch.
2010-02-10 21:40:33 +00:00
Michael Foord
1c3abf475e
Fix for unittest tests, to be merged to py3k
2010-02-10 15:50:58 +00:00
Michael Foord
67dfc77dfd
Remove deprecation on assert_. It is used too frequently.
2010-02-10 14:31:30 +00:00
Michael Foord
db43b5a1f5
Issue 7893 and Issue 7588
2010-02-10 14:25:12 +00:00
Antoine Pitrou
42fb6ab491
Issue #2746 : Don't escape ampersands and angle brackets ("&", "<", ">")
...
in XML processing instructions and comments. These raw characters are
allowed by the XML specification, and are necessary when outputting e.g.
PHP code in a processing instruction. Patch by Neil Muller.
2010-02-09 17:08:05 +00:00
Georg Brandl
11f5c9e001
Convert test failure from output-producing to self.fail().
2010-02-08 22:48:37 +00:00
Michael Foord
fe6349c965
Make assertMultiLineEqual the default for comparing unicode strings.
2010-02-08 22:41:16 +00:00
Georg Brandl
0c4783a33c
Fix missing string formatting placeholder.
2010-02-08 22:40:51 +00:00
Georg Brandl
e64c442ff7
Fix undefined local.
2010-02-08 22:37:52 +00:00
Georg Brandl
616e8fc5ad
Fix missing string formatting argument.
2010-02-08 22:37:20 +00:00
Ezio Melotti
cd4f657809
Fix exc_value -> exception in docstring
2010-02-08 21:52:08 +00:00
Vinay Sajip
cfc43e9435
logging: gingerly re-enabling skipped tests after improving thread sync code in configurator.
2010-02-08 21:18:15 +00:00
Vinay Sajip
9a164ac800
Issue #7857 : Another attempt to keep the buildbots happy.
2010-02-08 16:05:50 +00:00
Vinay Sajip
e1ec841086
logging: skipped listening tests because they're not working reliably.
2010-02-08 15:32:08 +00:00
Vinay Sajip
7ed8001862
Removed spurious print statement in test.
2010-02-08 06:50:14 +00:00
Georg Brandl
6eedef60a2
Fix test_fnmatch.
2010-02-08 00:04:54 +00:00
Mark Dickinson
841e7f3ae2
Skip test_strtod entirely when correctly-rounded string->float isn't implemented
2010-02-07 20:31:10 +00:00
Ronald Oussoren
dd25e86cf4
Issue 6003: ZipFile.writestr "compression_type" argument
2010-02-07 20:18:02 +00:00
Michael Foord
2bd52dcccb
assertRaises as context manager now allows you to access exception as documented
2010-02-07 18:44:12 +00:00
Georg Brandl
a4f46e1292
Remove unused imports in test modules.
2010-02-07 17:03:15 +00:00
Georg Brandl
dc3694bee0
Rename "exc_value" attribute on assertRaises context manager to "exception".
2010-02-07 17:02:22 +00:00
Antoine Pitrou
4ad752d70f
Issue #7870 : Remove duplicate test methods. Reported by Georg Brandl.
2010-02-07 16:56:23 +00:00
Mark Dickinson
1224f4afb4
Actually raise on failure, instead of doing nothing.
2010-02-07 13:09:52 +00:00
Vinay Sajip
7ce5c831cc
logging: Removed some more 1.5.2 support code.
2010-02-07 13:06:51 +00:00
Mark Dickinson
4dcba97590
Add missing global declarations for 'overflowok'; remove 'overflowrequired', which is no longer needed.
2010-02-07 13:01:56 +00:00
Vinay Sajip
64e8b970f9
Issue #7869 : logging: improved format-time diagnostics and removed some 1.5.2 support code.
2010-02-07 12:56:54 +00:00
Georg Brandl
b86d3fa43c
Remove duplicate test method.
2010-02-07 12:55:12 +00:00
Georg Brandl
308e18b595
Add a minimal test for fnmatchcase().
2010-02-07 12:34:26 +00:00
Georg Brandl
a34f87f981
Fix a redefined test method.
2010-02-07 12:27:06 +00:00
Georg Brandl
41dc63fae5
Fix two redefined test methods.
2010-02-07 12:25:50 +00:00
Georg Brandl
b3cda98dd1
Fix wrong usage of "except X, Y:".
2010-02-07 12:19:43 +00:00
Georg Brandl
7ae6018788
Fix another duplicated test method.
2010-02-07 12:16:12 +00:00
Ronald Oussoren
ab3f5cbabd
A number of APIs in macostools cannot work in 64-bit mode because they
...
use Carbon APIs that aren't available there.
This patch disables tests for the affected entrypoints in macostools and
mentions this in the documentation.
In theory it is possible to replace the implementation by code that does
work in 64-bit mode, but that would require further updates to the Carbon
wrappers because the modern APIs aren't wrapped properly.
2010-02-07 11:38:28 +00:00
Georg Brandl
b0eb4d3eb1
Use "regexp" consistently.
2010-02-07 11:34:15 +00:00
Ronald Oussoren
9341ad2200
Remove call to gestalt('sysu') from platform.py. This gestalt call is
...
not available on OSX an appearently causes problems for some users.
Fixes issue 7812
2010-02-07 11:29:31 +00:00
Vinay Sajip
657514a690
Issue #7868 : logging: added loggerClass attribute to Manager.
2010-02-07 01:37:08 +00:00
Georg Brandl
12cad204a0
Add missing import.
2010-02-06 23:58:25 +00:00
Georg Brandl
1f6176e794
Fix some name errors in Mac modules.
2010-02-06 23:54:43 +00:00
Georg Brandl
7e1902bced
Add missing import when running these tests standalone.
2010-02-06 23:54:04 +00:00
Georg Brandl
28aeb0d0ab
Add missing import when running these tests standalone.
2010-02-06 23:53:52 +00:00
Georg Brandl
cd4a21bb8e
Fix more unbound locals in code paths that do not seem to be used.
2010-02-06 23:34:10 +00:00
Georg Brandl
bd564c3c21
Fix import/access for some identifiers. _TestSharedCTypes does not seem to be executed?
2010-02-06 23:33:33 +00:00
Georg Brandl
c7ca56d213
We heard you like test failures so we put unbound locals in your test so that you can fail while you fail.
2010-02-06 23:23:45 +00:00
Georg Brandl
d10d8ee2a1
Fix various missing import/unbound name errors.
2010-02-06 23:18:00 +00:00
Georg Brandl
1a0ffe168a
Remove duplicate test method.
2010-02-06 23:12:19 +00:00
Georg Brandl
d1fa76e742
Add missing import.
2010-02-06 23:12:12 +00:00
Mark Dickinson
28d4f9e668
testCopysign was defined twice in test_math; combine the definitions
2010-02-06 23:11:25 +00:00
Georg Brandl
df8a303dff
Fix a few UnboundLocalErrors in test_long.
2010-02-06 23:08:00 +00:00
Georg Brandl
8fd107f8ea
Add missing imports.
2010-02-06 23:06:24 +00:00
Georg Brandl
7224350656
Add a missing import.
2010-02-06 23:02:29 +00:00
Georg Brandl
84fedf7f06
No need to assign the results of expressions used only for side effects.
2010-02-06 22:59:15 +00:00
Georg Brandl
7d4b759bd9
Remove unused import.
2010-02-06 22:49:47 +00:00
Georg Brandl
48e65f5f66
Fix duplicate import.
2010-02-06 22:44:17 +00:00
Benjamin Peterson
239f138aea
make waiting for the server to start robust
2010-02-06 22:08:15 +00:00
Georg Brandl
26a1f72637
Remove unused imports from test_logging.
2010-02-06 21:54:40 +00:00
Vinay Sajip
7f22443d94
Issue #7857 : Gave server thread more time to get ready, and re-enabled a skipped test.
2010-02-06 20:28:36 +00:00
Benjamin Peterson
42d5947ef5
check type_getattro for correctness in a descriptor corner case
2010-02-06 20:14:10 +00:00
Vinay Sajip
5749d88243
Issue #7857 : Tentatively re-enabling one test to see effect on buildbots.
2010-02-06 20:00:43 +00:00
Benjamin Peterson
a7be9d240a
bump version to 2.7a3
2010-02-06 16:37:32 +00:00
R. David Murray
ce6e4b0930
issue #7728 : test_timeout was using a hardcoded port, which was
...
causing buildbot failures. Changed to use test_support.bind_port.
Patch by Florent Xicluna.
2010-02-06 04:27:21 +00:00
Michael Foord
0877060f86
unittest.TestLoader creates a TestSuite before calling load_tests. Issue 7799.
2010-02-06 00:22:26 +00:00
Vinay Sajip
2373926964
test_logging: minor tweaks to timeouts, listening tests marked as skipped.
2010-02-05 23:43:11 +00:00
Michael Foord
757cc4d15f
Correction to docstring correction.
2010-02-05 23:22:37 +00:00
Michael Foord
d0edec38ce
Improving docstrings in unittest.TestCase
2010-02-05 22:55:09 +00:00
Antoine Pitrou
bb445a1f22
Issue #5677 : Explicitly forbid write operations on read-only file objects,
...
and read operations on write-only file objects. On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter. Patch by Stefan Krah.
2010-02-05 17:05:54 +00:00
Vinay Sajip
007a618a38
Issue #7857 : test_logging: listener tests disabled for now.
2010-02-05 15:40:20 +00:00
Vinay Sajip
3dd734fe03
Issue #7857 : test_logging: listener test now uses find_unused_port().
2010-02-05 14:52:05 +00:00
Benjamin Peterson
565d78586b
normalize exceptions passed to the __exit__ method #7853
...
In Python 2.x, exceptions in finally blocks are not normalized. Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.
A test for the finalization of generators containing with statements was also
added.
2010-02-05 02:12:14 +00:00
Benjamin Peterson
4a7ff1d80a
add a test for #7853 ; the exception must be normalized for with
2010-02-05 01:53:27 +00:00
Vinay Sajip
f7610b23de
Added unit test for cfg:// resolution.
2010-02-04 21:40:56 +00:00
Vinay Sajip
98ce620068
Removed spurious print statement.
2010-02-04 20:18:28 +00:00
Vinay Sajip
28c382f73a
Logging: Implemented PEP 391.
2010-02-04 18:48:53 +00:00
Brett Cannon
dc84f8fbb4
Fix a typo in a docstring introduced in r77956.
2010-02-03 22:13:44 +00:00
Brett Cannon
18e4db5ebe
Update a docstring to suggest using importlib.import_module instead of calling __import__ directly.
2010-02-03 22:11:54 +00:00
Mark Dickinson
c68e9f0d20
Fix test_inspect.py data to match recent change to inspect_fodder.py (r77942).
2010-02-03 16:50:14 +00:00
Tarek Ziadé
b8c7b017e2
leaving global attributes for backward compat
2010-02-03 15:38:12 +00:00
Ezio Melotti
dde5b94875
#7092 : Silence more py3k warnings. Patch by Florent Xicluna.
2010-02-03 05:37:26 +00:00
Tarek Ziadé
bece7f2d36
fixed a typo on distutils.sysconfig. thanks arfever
2010-02-02 22:55:00 +00:00
Tarek Ziadé
e81b0289b6
sysconfig.get_scheme_names now returns a sorted tuple
2010-02-02 22:54:28 +00:00
Tarek Ziadé
cc11817808
module reorganization + missing doctests
2010-02-02 22:50:23 +00:00
Ezio Melotti
1f517e1d53
#7092 : Silence py3k warnings in test_exceptions and test_pep352. Patch by Florent Xicluna.
2010-02-02 17:34:37 +00:00
Ezio Melotti
8d3f130d41
Fix idioms and a couple of py3k warnings. Patch by Florent Xicluna.
2010-02-02 15:57:45 +00:00
Ezio Melotti
0ac4d4c82d
Silence a couple of -3 warnings
2010-02-02 15:12:42 +00:00
Ezio Melotti
5d62cfe070
#7092 : silence py3k warnings for bsddb. Patch by Florent Xicluna.
2010-02-02 08:37:35 +00:00
Martin v. Löwis
1595f9fe9b
Merged revisions 77855-77856,77870 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r77855 | benjamin.peterson | 2010-01-30 17:32:05 +0100 (Sa, 30 Jan 2010) | 1 line
don't return node if it is not changed
........
r77856 | benjamin.peterson | 2010-01-30 17:35:29 +0100 (Sa, 30 Jan 2010) | 1 line
return None to indicate no change
........
r77870 | benjamin.peterson | 2010-01-31 02:21:26 +0100 (So, 31 Jan 2010) | 1 line
never return the original node given to transform()
........
2010-02-01 01:15:39 +00:00
Victor Stinner
b4b0a2935d
Issue #7819 : Check sys.call_tracing() arguments types.
...
py3k was already patched by issue #3661 .
2010-01-31 22:32:15 +00:00
Antoine Pitrou
f3fa074703
- Issue #6939 : Fix file I/O objects in the `io` module to keep the original
...
file position when calling `truncate()`. It would previously change the
file position to the given argument, which goes against the tradition of
ftruncate() and other truncation APIs. Patch by Pascal Chambon.
2010-01-31 22:26:04 +00:00
Benjamin Peterson
7aedb3b30e
fix windows buildbot
2010-01-31 18:02:35 +00:00
Matthias Klose
48a3c4e2e3
- Fix typo in os.execvp docstring.
2010-01-31 16:46:26 +00:00
Ezio Melotti
ef4909643d
#7092 : silence more -3 and -Wd warnings
2010-01-31 11:46:54 +00:00
Martin v. Löwis
a8e34b707c
Merged revisions 77419,77435 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r77419 | benjamin.peterson | 2010-01-10 21:39:48 +0100 (So, 10 Jan 2010) | 1 line
enclose path in quotes to handle paths with spaces correctly #7666
........
r77435 | alexandre.vassalotti | 2010-01-12 01:36:54 +0100 (Di, 12 Jan 2010) | 2 lines
Issue #1967 : Add fixer for dictionary views.
........
2010-01-30 10:56:23 +00:00
Ezio Melotti
a2d4653740
#7092 : silence py3k warnings for deprecated modules
2010-01-30 07:22:54 +00:00
R. David Murray
05b4171624
Fix typo in assertSequenceEqual docstring.
2010-01-29 19:35:39 +00:00
Mark Dickinson
36ecd676ea
Issue #7788 : Fix a crash produced by deleting a list slice with huge
...
step value. Patch by Marcin Bachry.
2010-01-29 17:11:39 +00:00
R. David Murray
b5d7400e8a
Change error report when the object passed to suite.addTest is not
...
callable to include the repr of the invalid object.
2010-01-28 21:16:33 +00:00
Benjamin Peterson
11fab6c07d
avoid a py3k warning from __hash__
2010-01-28 02:18:25 +00:00
Ezio Melotti
4611b05bd8
avoid to use zlib when the compress type is not ZIP_DEFLATED
2010-01-28 01:41:30 +00:00
Antoine Pitrou
94c33ebfa8
Issue #7610 : Reworked implementation of the internal
...
:class:`zipfile.ZipExtFile` class used to represent files stored inside
an archive. The new implementation is significantly faster and can
be wrapped in a :class:`io.BufferedReader` object for more speedups.
It also solves an issue where interleaved calls to `read()` and
`readline()` give wrong results. Patch by Nir Aides.
2010-01-27 20:59:50 +00:00
Jesse Noller
654ade3e6a
Issue #6963 : Added maxtasksperchild argument to multiprocessing.Pool
2010-01-27 03:05:57 +00:00
Benjamin Peterson
2deb5c758a
raise a clear TypeError when trying to register a non-class
2010-01-27 02:16:42 +00:00
Benjamin Peterson
17527bedad
for UserDict to be compatible with abcs, it must subclass object
2010-01-27 02:15:28 +00:00
Eric Smith
74c2577497
Added named (but not numbered) attributes to sys.getwindowsversion() test.
2010-01-27 02:06:25 +00:00
Eric Smith
59529e1ef6
Switch to test_support.get_attribute.
2010-01-27 01:21:15 +00:00
Eric Smith
514e77e0ae
Removed unneeded test.
2010-01-27 00:58:43 +00:00
Eric Smith
ee931b7253
Issue #7766 : Change sys.getwindowsversion() return value to a named tuple and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type.
2010-01-27 00:28:29 +00:00
Tarek Ziadé
92e68af56a
added local get_platform/set_platform APIs in distutils.sysconfig
2010-01-26 22:46:15 +00:00
Tarek Ziadé
0276c7ad0b
reintroduced the names in Distutils for APIs that were relocated
2010-01-26 21:21:54 +00:00
Tarek Ziadé
b28e5d7e41
fixed bdist_msi imports and added a test module for distutils.command.bdist_msi
2010-01-26 17:20:37 +00:00
Ezio Melotti
ffd849618a
#7092 : fix DeprecationWarnings for json when the tests are run with -3 -Wd.
2010-01-26 15:57:21 +00:00
Tarek Ziadé
ef97caf111
switched the call order so this call works without suffering from issue #7774
2010-01-25 23:19:56 +00:00
Benjamin Peterson
28e369a8f8
compare types with is not ==
2010-01-25 03:58:21 +00:00
Benjamin Peterson
a617e208fc
mention from_float() in error message
2010-01-25 03:52:52 +00:00
Benjamin Peterson
a43f34cc2a
fix an UnboundLocalError when the release file is empty #7773
2010-01-25 03:31:13 +00:00
Ezio Melotti
aab2401977
#7269 : fix failures in test_bsddb3. Patch by Florent Xicluna.
2010-01-24 21:47:59 +00:00
Ezio Melotti
469a05fe46
remove archaic functions from test_support
2010-01-24 20:48:35 +00:00
Ezio Melotti
b0f5adc3f4
use assert[Not]IsInstance where appropriate
2010-01-24 16:58:36 +00:00
Tarek Ziadé
f14c7fc33d
Fixed #7748 : now upload and register commands don't need to force the encoding anymore : DistributionMetada returns utf8 strings
2010-01-24 00:33:32 +00:00
Ezio Melotti
aa98058cc4
use assert[Not]In where appropriate
2010-01-23 23:04:36 +00:00
Tarek Ziadé
c64614e043
fixed the 64bits tests for get_platform() - mac osx
2010-01-23 17:52:57 +00:00
Ezio Melotti
0e4e73240a
Increased the overflow value on test_dealloc to make sure that it is big enough even for wide builds.
2010-01-23 10:43:05 +00:00
Tarek Ziadé
5633a8048f
taking sysconfig out of distutils
2010-01-23 09:23:15 +00:00
Ezio Melotti
f8a9402c97
This should fix the failure introduced in r77680. The error message is now different and it caused the test to fail. The failing test is not present in 2.5 so it is failing only on 2.6 and newer versions.
2010-01-22 16:58:28 +00:00
Mark Dickinson
a3112d1462
Use // for floor division.
2010-01-21 19:58:41 +00:00
Mark Dickinson
5a633488d4
Add two more test_strtod test values.
2010-01-21 18:32:27 +00:00
Mark Dickinson
294d6acb89
Additional testcases for strtod.
2010-01-21 17:02:53 +00:00
Mark Dickinson
4141d65fb7
Various dtoa.c cleanups. 1. Despagghetify _Py_dg_strtod parsing code
...
and exit points. 2. Simplify bigcomp comparison loop. 3. Don't set
ERANGE on _Py_dg_strtod underflow (it was set inconsistently anyway).
4. Remove unused dsign field from BCinfo struct.
2010-01-20 17:36:31 +00:00
Gregory P. Smith
8926108bfb
Revert debugprint code in r77607.
2010-01-19 08:25:26 +00:00
Gregory P. Smith
8f6f42621a
Add a pydebug mode only debug print to help debug the errors in
...
http://www.python.org/dev/buildbot/all/builders/x86%20gentoo%20trunk/builds/5700/
Will be removed shortly.
2010-01-19 08:01:00 +00:00
Benjamin Peterson
9179dab3f4
data descriptors do not override the class dictionary if __get__ is not defined
...
Adjust documentation and add a test to verify this behavior.
See http://mail.python.org/pipermail/python-dev/2010-January/095637.html for
discussion.
2010-01-18 23:07:56 +00:00
Ezio Melotti
b01f5e6f84
#7730 : remove spaces after functions names
2010-01-18 09:10:26 +00:00
Antoine Pitrou
e80a6a4ead
Issue #7561 : Operations on empty bytearrays (such as `int(bytearray())`)
...
could crash in many places because of the PyByteArray_AS_STRING() macro
returning NULL. The macro now returns a statically allocated empty
string instead.
2010-01-17 12:26:20 +00:00
Mark Dickinson
ab6ee7a042
Increase number of strtod tests slightly, to make it more likely that a memory leak is detected.
2010-01-17 11:10:03 +00:00
Mark Dickinson
d87f22cec8
Add better error reporting for MemoryErrors caused by str->float conversions.
2010-01-16 20:33:02 +00:00
Mark Dickinson
811ff822f8
Issue #7632 : Fix one more case of incorrect rounding for str -> float
...
conversion (see bug 5 in the issue tracker).
2010-01-16 17:57:49 +00:00
Antoine Pitrou
db983a7c38
Followup to #7703 : a2b_hqx() didn't follow the new buffer API (neither in trunk
...
nor in py3k). Patch by Florent Xicluna as well as additional tests.
2010-01-16 17:45:56 +00:00
R. David Murray
c755dba906
Fix issue number in comment.
2010-01-16 16:08:32 +00:00
Mark Dickinson
476279f18b
Issue #7632 : Fix a serious wrong output bug for string -> float conversion.
...
Also remove some now unused variables, and add comments clarifying the
possible outputs of the parsing section of _Py_dg_strtod. Thanks
Eric Smith for reviewing.
2010-01-16 10:44:00 +00:00
R. David Murray
ed44dfa4c7
Issue #1670765 : Prevent email.generator.Generator from re-wrapping
...
headers in multipart/signed MIME parts, which fixes one of the sources of
invalid modifications to such parts by Generator. Patch and tests by
Martin von Gagern.
2010-01-16 05:15:17 +00:00
Benjamin Peterson
667dc19130
try to fix for windows
2010-01-15 02:26:07 +00:00
Antoine Pitrou
c391ad007b
Issue #7701 : Fix crash in binascii.b2a_uu() in debug mode when given a
...
1-byte argument. Patch by Victor Stinner.
2010-01-15 00:18:00 +00:00
Brett Cannon
3ffa43db48
The silencing of DeprecationWarning was not taking -3 into consideration. Since
...
Py3K warnings are DeprecationWarning by default this was causing -3 to
essentially be a no-op. Now DeprecationWarning is only silenced if -3 is not
used.
Closes issue #7700 . Thanks Ezio Melotti and Florent Xicluna for patch help.
2010-01-14 20:00:28 +00:00
Antoine Pitrou
efdddd3370
Issue #3299 : Fix possible crash in the _sre module when given bad
...
argument values in debug mode. Patch by Victor Stinner.
2010-01-14 17:25:24 +00:00
Antoine Pitrou
fd3a60d5ef
Issue #7703 : Add support for the new buffer API to functions of the
...
binascii module. Backported from py3k by Florent Xicluna, with some
additional tests.
2010-01-14 16:27:09 +00:00
Mark Dickinson
647ed91d5c
Issue #7632 : add tests for bugs fixed so far.
2010-01-14 15:22:33 +00:00
Benjamin Peterson
7a1b435297
use more robust quoting
2010-01-14 02:40:10 +00:00
Antoine Pitrou
5f76d132a5
Issue #7625 : Add more tests that bytearray methods return new objects,
...
even if identical. Patch by Florent Xicluna (again).
2010-01-13 15:02:13 +00:00
Antoine Pitrou
5a9112c0cc
Issue #2846 : Add support for gzip.GzipFile reading zero-padded files.
...
Patch by Brian Curtin.
2010-01-13 14:32:10 +00:00
Mark Dickinson
5ff4f279e6
Issue #7632 : Fix a bug in dtoa.c that could lead to incorrectly-rounded results.
2010-01-12 22:55:51 +00:00
Mark Dickinson
8efef5ce9f
Issue #7632 : Fix a problem with _Py_dg_strtod that could lead to
...
crashes in debug builds, for certain long numeric strings
corresponding to subnormal values.
2010-01-12 22:23:56 +00:00
Antoine Pitrou
efa45f35b5
Issue #7654 : enable additional bytes/bytearray tests. Patch by Florent Xicluna.
2010-01-12 22:02:10 +00:00
Ezio Melotti
b5689de044
#5827 : make sure that normpath preserves unicode
2010-01-12 03:32:05 +00:00
Alexandre Vassalotti
58a96efde5
Fixed repr of dictionary views.
2010-01-12 01:34:43 +00:00
Tarek Ziadé
ae7731af45
module cleanup
2010-01-11 23:41:32 +00:00
Alexandre Vassalotti
69eb51697c
Issue #1967 : Backport dictionary views.
2010-01-11 23:17:10 +00:00
Tarek Ziadé
dc0f487c3b
Fixed #5372 : .o files are now always rebuilt because file age test don't work in some case
2010-01-11 22:50:29 +00:00
Alexandre Vassalotti
b646547bb4
Issue #2333 : Backport set and dict comprehensions syntax.
2010-01-11 22:36:12 +00:00
Benjamin Peterson
e822ab0166
fix test_popen when the path to python has spaces #7671
2010-01-10 20:42:03 +00:00
Senthil Kumaran
2e3da14d8b
Fixed issue7648 - test_urllib2 fails on Windows if not run from C:
2010-01-10 17:35:05 +00:00
Martin v. Löwis
9d87323445
Update root certificate to CAcert.
2010-01-10 10:29:54 +00:00
Brett Cannon
6fdd3dcb6a
DeprecationWarning is now silent by default.
...
This was originally suggested by Guido, discussed on the stdlib-sig mailing
list, and given the OK by Guido directly to me. What this change essentially
means is that Python has taken a policy of silencing warnings that are only
of interest to developers by default. This should prevent users from seeing
warnings which are triggered by an application being run against a new
interpreter before the app developer has a chance to update their code.
Closes issue #7319 . Thanks to Antoine Pitrou, Ezio Melotti, and Brian Curtin
for helping with the issue.
2010-01-10 02:56:19 +00:00
Alexandre Vassalotti
ee936a2130
Issue #2335 : Backport set literals syntax from Python 3.x.
2010-01-09 23:35:54 +00:00
Mark Dickinson
e365613528
Issue #7532 : Add additional slicing test cases for new- and old-style
...
classes. Patch by Florent Xicluna.
2010-01-09 18:50:50 +00:00
Benjamin Peterson
aa7e51f006
bump version to 2.7a2
2010-01-09 16:34:06 +00:00
Tarek Ziadé
c25417f644
Fixed #7617 : all flavors of gcc should be recognized now
2010-01-08 23:42:23 +00:00
Antoine Pitrou
5b77d6dfa3
Remove obsolete warning filters in regrtest.py (from issue #7092 -- patch by
...
Florent Xicluna).
2010-01-08 19:39:04 +00:00
Senthil Kumaran
7a2ee0b460
Fix for Issue7026. For the Error - RuntimeError: dictionary changed size during iteration
2010-01-08 19:20:25 +00:00
Antoine Pitrou
8015725d4f
Issue #7092 : Remove py3k warning when importing cPickle. 2to3 handles
...
renaming of `cPickle` to `pickle`. The warning was annoying since there's
no alternative to cPickle if you care about performance. Patch by Florent
Xicluna.
2010-01-08 19:20:17 +00:00
Senthil Kumaran
ce8e33a095
Reverting the Revision: 77368. I committed Flox's big patch for tests by
...
mistake. ( It may come in for sure tough)
2010-01-08 19:04:16 +00:00
Senthil Kumaran
3ddc435af6
Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox
2010-01-08 18:41:40 +00:00
Mark Dickinson
3194d1454c
Backport some float repr tests that were missed in issue 7117.
2010-01-08 16:53:56 +00:00
Antoine Pitrou
0d423b870b
Issue #7455 : Fix possible crash in cPickle on invalid input. Patch by
...
Florent Xicluna.
2010-01-07 17:46:49 +00:00
Georg Brandl
8904053003
#5991 : let completion for the "help" command include help topics.
...
This also simplifies the Cmd.get_names() method implementation; it was written
at a time where dir() didn't consider base class attributes.
2010-01-06 18:02:16 +00:00
Georg Brandl
5089a38af2
Small fixes to test_cmd: fix signature of do_shell, remove duplicate import, add option to run the custom Cmd class.
2010-01-06 17:43:06 +00:00
Mark Dickinson
202eb9094c
Add missing docstring for Context.divmod. Thanks Juan José Conti.
2010-01-06 16:20:22 +00:00
Benjamin Peterson
2b6e4bc3ad
add a test about hashing array.array
2010-01-05 00:04:19 +00:00
Antoine Pitrou
af45b11527
Kill a couple of "<>"
2010-01-04 23:28:16 +00:00
Antoine Pitrou
b9d4963a98
Issue #7092 : Fix the DeprecationWarnings emitted by the standard library
...
when using the -3 flag. Patch by Florent Xicluna.
2010-01-04 23:22:44 +00:00
Benjamin Peterson
ecdae19fbe
do correct lookup of the __complex__ method
2010-01-04 00:43:01 +00:00
Antoine Pitrou
673ddf9907
Issue #7471 : Improve the performance of GzipFile's buffering mechanism,
...
and make it implement the `io.BufferedIOBase` ABC to allow for further
speedups by wrapping it in an `io.BufferedReader`. Patch by Nir Aides.
2010-01-03 22:29:56 +00:00
Gregory P. Smith
49d709c921
Fix testSourceAddress to not test the host, it wasn't passing on some platforms.
2010-01-03 15:05:52 +00:00
Gregory P. Smith
9d3252154f
issue3972: HTTPConnection and HTTPSConnection now support a
...
source_address parameter.
Also cleans up an annotation in the socket documentation.
2010-01-03 02:06:07 +00:00
Gregory P. Smith
79a3eb1058
Adds an optional source_address parameter to socket.create_connection().
...
For use by issue3972.
2010-01-03 01:29:44 +00:00
Gregory P. Smith
6dcdcde2a8
Import all implementations of the hash algorithms (OpenSSL & builtin) and run
...
the test suite across all that are available. Warns about extension modules
that could not be imported when python was compiled with Py_DEBUG.
That warning could be made fatal but I didn't want to do that initially as
I suspect non setup.py based build processes (windows, any others?) won't
compile them all conditionally based on the Py_DEBUG setting today.
2010-01-03 00:19:04 +00:00
Gregory P. Smith
443ec6875f
Issue #3745 : Undo the requirement for new buffer API only objects to be passed
...
to hashlib functions in python 2.x. The module now uses the 's*' for argument
parsing which auto encodes unicode objects to the system default encoding for
us.
2010-01-02 22:28:48 +00:00
Antoine Pitrou
b538d546da
Remove silly conditional.
2010-01-02 21:53:44 +00:00
Antoine Pitrou
83f86e8e98
Add tests for issue #7458 : str.rfind() would crash when called with an invalid
...
start value. The offending code itself was removed as part of #7462 .
This patch by Victor Stinner.
2010-01-02 21:47:10 +00:00
Antoine Pitrou
5b7139aab4
Issue #7462 : Implement the stringlib fast search algorithm for the `rfind`,
...
`rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.
2010-01-02 21:12:58 +00:00
Georg Brandl
36f4214255
Fix casing.
2010-01-02 12:35:01 +00:00
Benjamin Peterson
1a635e4663
remove use of deprecated os.popen #7619
2010-01-02 02:43:04 +00:00
Mark Dickinson
1b34d2552c
Issue #5080 : turn the DeprecationWarning from float arguments passed
...
to integer PyArg_Parse* format codes into a TypeError. Add a
DeprecationWarning for floats passed with the 'L' format code, which
didn't previously have a warning.
2010-01-01 17:27:30 +00:00
Georg Brandl
8cdc9bc901
More yearly updates.
2010-01-01 13:07:05 +00:00
Ezio Melotti
763f1e8d32
indentation and further alignment with py3k
2009-12-31 13:27:41 +00:00
Ezio Melotti
6d6b53cab8
cleanup and refactoring
2009-12-31 13:00:43 +00:00
Benjamin Peterson
df6f963f15
Merged revisions 77158 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r77158 | benjamin.peterson | 2009-12-30 13:41:03 -0600 (Wed, 30 Dec 2009) | 1 line
clean up logging's global state after the test finishes
........
2009-12-30 19:44:23 +00:00
Benjamin Peterson
0f02d3933b
check if the attribute is set before deleting it with T_OBJECT_EX ( fixes #7604 )
...
Also, add a note to the docs about the better behavior of T_OBJECT_EX as
compared to T_OBJECT.
2009-12-30 19:34:10 +00:00
Mark Dickinson
99d652ef66
Issue #7534 : Fix handling of nans, infinities, and negative zero in **
...
operator, on IEEE 754 platforms. Thanks Marcos Donolo for original patch.
2009-12-30 12:12:23 +00:00
Ezio Melotti
569e61f351
#5511 : Added the ability to use ZipFile as a context manager. Patch by Brian Curtin.
2009-12-30 06:14:51 +00:00
Amaury Forgeot d'Arc
8645a5c81f
#7413 : Passing '\0' as the separator to datetime.datetime.isoformat()
...
used to drop the time part of the result.
2009-12-29 22:03:38 +00:00
Mark Dickinson
8e3e1d6016
Issue #7575 : An overflow test for math.expm1 was failing on OS X 10.4/Intel,
...
due to a defect in the platform's implementation of expm1. Since the issue
is of low severity, and appears to be fixed in OS X 10.5 and 10.6, it doesn't
seem worth working around, so I'm just weakening the relevant test so that
it passes on 10.4.
2009-12-29 20:51:24 +00:00
Benjamin Peterson
b598393bcb
enable test_main.py
2009-12-29 00:09:33 +00:00
Benjamin Peterson
abb4274499
Merged revisions 76871-76872,77093-77095,77097-77101 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r76871 | benjamin.peterson | 2009-12-17 20:49:21 -0600 (Thu, 17 Dec 2009) | 1 line
handle unencodable diffs gracefully #5093
........
r76872 | benjamin.peterson | 2009-12-17 20:51:37 -0600 (Thu, 17 Dec 2009) | 1 line
fix emacs header
........
r77093 | benjamin.peterson | 2009-12-28 14:43:32 -0600 (Mon, 28 Dec 2009) | 7 lines
replace callable(x) with isinstance(x, collections.Callable) #7006
This is a more accurate translation than hasattr(x, '__call__') which failed in
the case that somebody had put __call__ in the instance dictionary.
Patch mostly by Joe Amenta.
........
r77094 | benjamin.peterson | 2009-12-28 14:45:13 -0600 (Mon, 28 Dec 2009) | 2 lines
deuglify imports
........
r77095 | benjamin.peterson | 2009-12-28 14:49:23 -0600 (Mon, 28 Dec 2009) | 1 line
remove unused flag
........
r77097 | benjamin.peterson | 2009-12-28 16:12:13 -0600 (Mon, 28 Dec 2009) | 2 lines
clean up imports and whitespace
........
r77098 | benjamin.peterson | 2009-12-28 16:43:35 -0600 (Mon, 28 Dec 2009) | 1 line
*** empty log message ***
........
r77099 | benjamin.peterson | 2009-12-28 16:45:10 -0600 (Mon, 28 Dec 2009) | 1 line
revert unintended change
........
r77100 | benjamin.peterson | 2009-12-28 16:53:21 -0600 (Mon, 28 Dec 2009) | 1 line
revert unintended changes
........
r77101 | benjamin.peterson | 2009-12-28 17:46:02 -0600 (Mon, 28 Dec 2009) | 1 line
normalize whitespace
........
2009-12-28 23:50:41 +00:00
Georg Brandl
740cdc3a9f
#7033 : add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring.
2009-12-28 08:34:58 +00:00
Georg Brandl
02e7dfde63
#7381 : consistency update, and backport avoiding ``None >= 0`` check from py3k.
2009-12-28 08:09:32 +00:00
Mark Dickinson
e079636853
Use a more idiomatic check in check_truediv.
2009-12-27 21:31:50 +00:00
Mark Dickinson
4c96035f33
Use ldexp(q, exp) instead of q*2.**exp in true division test, to avoid bogus failures on platforms with broken pow (e.g., Ubuntu/ia64).
2009-12-27 16:16:02 +00:00
Mark Dickinson
4657283647
Issue #1811 : Improve accuracy and consistency of true division for integers.
2009-12-27 14:55:57 +00:00
Senthil Kumaran
13c2ef92f8
Fix for issue5625 - test_urllib2 fails - urlopen error file not on local host.
...
This is on hosts with multiple ip addresses.
2009-12-27 09:11:09 +00:00
Ezio Melotti
f84caf4eda
#6108 : unicode(exception) and str(exception) should return the same message
2009-12-24 22:25:17 +00:00
Mark Dickinson
db69f01ea9
Issue #7568 : typo in docstring. Thanks Mike Putnam.
2009-12-24 16:06:58 +00:00
Benjamin Peterson
27cae34bd0
allow Process name to be unicode #7571
2009-12-24 15:19:40 +00:00
Ronald Oussoren
ca8e7ec216
Unittests and news items for the patch in r77026.
2009-12-24 14:50:35 +00:00
Ronald Oussoren
92919a66d2
Issue #6834 : replace the implementation for the 'python' and 'pythonw' executables on OSX.
...
The previous implementation used execv(2) to run the real interpreter, which means that
you cannot use the arch(1) tool to select the architecture you want to use for a
universal build because that only affects the python/pythonw wrapper and not the actual
interpreter.
The new version uses posix_spawnv with a number of OSX-specific options that ensure that
the real interpreter is started using the same CPU architecture as the wrapper, and that
means that 'arch -ppc python' now actually works.
I've also changed the way that the wrapper looks for the framework: it is now linked to
the framework rather than hardcoding the framework path. This should make it easier to
provide pythonw support in tools like virtualenv.
2009-12-24 13:30:58 +00:00
Ronald Oussoren
728cc6110f
On OSX the output of "uname -m" always reflects the 32-bit architecture
...
for the machine ("i386" or "ppc"), even if the executable is
64-bit.
This patchs ensures that the distutils platform architecture
represents the architecture for the executable when running a
64-bit only executable on OSX.
2009-12-24 13:06:39 +00:00
Benjamin Peterson
3293593b54
fix alleged refleak
2009-12-24 01:09:53 +00:00
Gregory P. Smith
9f12d468f4
Fix possible integer overflow in lchown and fchown functions. For issue1747858.
2009-12-23 09:31:11 +00:00
Tarek Ziadé
3efd767336
backported r76993 and r76994 so the trunk behaves the same way with MSVC Manifest files editing
2009-12-21 23:31:55 +00:00
Mark Dickinson
2ba1e9ceb8
Issue #7553 : test_long_future wasn't testing properly. Thanks Florent Xicluna
...
for bug report and patch.
2009-12-21 16:29:21 +00:00
R. David Murray
08dca0d6da
Remove a leftover from a previous iteration of the issue 7376 patch.
2009-12-21 12:45:41 +00:00
Tarek Ziadé
2b66da7d15
massive import cleaning in Distutils
2009-12-21 01:22:46 +00:00
Tarek Ziadé
2421d56e02
Fixed #7552 : fixed distutils.command.upload failure on very long passwords
2009-12-20 23:23:34 +00:00
Mark Dickinson
603ae9e371
Issue #7554 : Various fixups in test_cmath.py: remove code duplication,
...
use new-style formatting. Thanks Florent Xicluna for the patch.
2009-12-20 20:34:44 +00:00
Mark Dickinson
ed284991e1
Silence -3 warnings. Thanks Florent Xicluna.
2009-12-20 20:23:01 +00:00
Mark Dickinson
3e0bafef25
Fix for consistency with py3k keyword-only version of assertAlmostEqual
2009-12-20 19:52:36 +00:00
Mark Dickinson
1d2ae215aa
Issue #7554 : Fix incorrect usage of rAssertAlmostEqual. Thanks Florent Xicluna.
2009-12-20 19:45:37 +00:00
R. David Murray
77e48ba993
Issue #7376 : When called with no arguments doctest was running a
...
self-test. Because of a change to the way tracebacks are printed,
this self-test was failing. The test is run (and passes) during normal
regression testing. So instead of running the failing self-test this
patch makes doctest emit a usage message. This is better behavior anyway
since passing in arguments is the real reason to run doctest as a command.
Bug discovery and initial patch by Florent Xicluna.
2009-12-20 16:46:06 +00:00
R. David Murray
97138117b2
Fix comment typo.
2009-12-20 16:24:46 +00:00
Mark Dickinson
b5e348b305
Add missing tests for PyArg_Parse* with format 'h'
2009-12-20 15:57:56 +00:00
Georg Brandl
6ab5d083f2
#7381 : subprocess documentation and library docstring consistency fixes.
2009-12-20 14:33:20 +00:00
Senthil Kumaran
7713acf201
Fix for issue 7291 - urllib2 cannot handle https with proxy requiring auth
...
Refactored HTTPHandler tests and added testcase for proxy authorization.
2009-12-20 06:05:13 +00:00
Antoine Pitrou
98a24def03
Remove superfetatory paragraph (left there by mistake).
2009-12-19 21:06:36 +00:00
Antoine Pitrou
e812d29b52
Issue #7545 : improve documentation of the `buffering` argument in io.open().
2009-12-19 21:01:10 +00:00
Mark Dickinson
5ff37ae14b
Issue #3366 : Add error function and complementary error function to
...
math module.
2009-12-19 11:07:23 +00:00
Mark Dickinson
9cae178f21
Issue #3366 : Add expm1 function to math module. Thanks Eric Smith for
...
testing on Windows.
2009-12-16 20:13:40 +00:00
R. David Murray
98e3df38fd
Issue #7396 : fix -s, which was broken by the -j enhancement.
2009-12-16 11:49:46 +00:00
Benjamin Peterson
36902988a6
remove lib2to3 resource
2009-12-16 03:28:52 +00:00
Tarek Ziadé
c0680e2d4b
cleaned up the module (PEP 8 + old fashion test removal)
2009-12-15 06:29:19 +00:00
R. David Murray
c7298ff0fa
Issue #7498 : make test_multiprocessing use test_support.find_unused_port
...
instead of a hard coded port number in test_rapid_restart.
2009-12-14 21:57:39 +00:00
R. David Murray
0a0a1a842c
Issue #1680159 : unicode coercion during an 'in' operation was masking
...
any errors that might occur during coercion of the left operand and
turning them into a TypeError with a message text that was confusing in
the given context. This patch lets any errors through, as was already
done during coercion of the right hand side.
2009-12-14 16:28:26 +00:00
Benjamin Peterson
ddd392cbb9
accept None as the same as having passed no argument in file types #7349
...
This is for consistency with imitation file objects like StringIO and BytesIO.
This commit also adds a few tests, where they were lacking for concerned
methods.
2009-12-13 19:19:07 +00:00
Ezio Melotti
e304852e21
#7342 : make sure that the datetime object in test_fraction always has a number of microseconds != 0
2009-12-13 18:54:53 +00:00
Benjamin Peterson
414721614f
make StringIO like other file objects in that readline(-1) has no effect #7348
2009-12-13 17:29:16 +00:00
Benjamin Peterson
4895af4ef1
fix the ignoring of __cmp__ method on metaclasses #7491
2009-12-13 16:36:53 +00:00