Commit graph

6913 commits

Author SHA1 Message Date
Victor Stinner
2b9af63b4f Try to fix test_tarfile on AMD64 debian parallel 3.x
tarinfo.mtime is an int, whereas getmtime() is a float and it might be
different by something like 3 µs.
2010-10-23 01:15:30 +00:00
Antoine Pitrou
ff150f2921 Revert r85797 (and r85798): it broke the Windows buildbots because of
test_multiprocessing's misbehaviour.
2010-10-22 21:41:05 +00:00
Antoine Pitrou
7eecffd05d Issue #9935: Speed up pickling of instances of user-defined classes. 2010-10-22 19:43:59 +00:00
Antoine Pitrou
eb585adbde Fix test_ssl on Ubuntu buildbot with patched OpenSSL 2010-10-22 18:24:20 +00:00
Antoine Pitrou
d532321f7b Issue #5639: Add a *server_hostname* argument to SSLContext.wrap_socket
in order to support the TLS SNI extension.  `HTTPSConnection` and
`urlopen()` also use this argument, so that HTTPS virtual hosts are now
supported.
2010-10-22 18:19:07 +00:00
Georg Brandl
83938437cb #10166: rewrite self-recursion to iteration in pstats.Stats.add(). Also add a unittest and a stats test file. 2010-10-22 06:28:01 +00:00
Antoine Pitrou
9583cac633 Issue #10089: Add support for arbitrary -X options on the command-line.
They can be retrieved through a new attribute `sys._xoptions`.
2010-10-21 13:42:28 +00:00
Georg Brandl
50de5f56a9 #10159: sort completion matches before comparing to dir() result. 2010-10-21 07:40:03 +00:00
Victor Stinner
f933e1ab6f Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead of
the locale encoding. If the LANG (and LC_ALL and LC_CTYPE) environment variable
is not set, the locale encoding is ISO-8859-1, whereas most programs (including
Python) expect UTF-8. Python already uses UTF-8 for the filesystem encoding and
to encode command line arguments on this OS.
2010-10-20 22:58:25 +00:00
Victor Stinner
073f759d65 Move non-ascii test from test_run_code() to a new function: test_non_ascii() 2010-10-20 21:56:55 +00:00
Victor Stinner
f6211eda71 Move test_undecodable_code() from test_sys to test_cmd_line 2010-10-20 21:52:33 +00:00
Victor Stinner
6722b5f7f1 test_zipimport_support: use ascii() on bytes output to avoid BytesWarning
The test failed with python -bb.
2010-10-20 21:48:35 +00:00
Georg Brandl
9450cc056a Fix r85728: use "" to mean the system default locale, which should work on more systems. 2010-10-20 06:50:19 +00:00
Vinay Sajip
6dbed2e8b3 logging: Allowed filters to be just callables. 2010-10-19 20:53:01 +00:00
Vinay Sajip
6fac817136 logging: Added tests for _logRecordClass changes. 2010-10-19 20:44:14 +00:00
Georg Brandl
7004bd1a3d #10092: Properly reset locale in Locale*Calendar classes. The context manager was buggy because setlocale() returns the *new* locale, not the old. Also add a test for this. 2010-10-19 18:54:25 +00:00
Victor Stinner
9a90900da5 PyUnicode_FromFormatV(): Fix %A format
It was not completly implemented. Add a test.
2010-10-18 20:59:24 +00:00
Hirokazu Yamamoto
b08820ad40 Issue #5117: Case normalization was needed on ntpath.relpath(). And
fixed root directory issue on posixpath.relpath(). (Ported working fixes
from ntpath)
2010-10-18 12:13:18 +00:00
R. David Murray
a90032a3fb #1343: Add short_empty_elements option to XMLGenerator.
Patch and tests by Neil Muller.
2010-10-17 22:46:45 +00:00
Victor Stinner
6fb457526c test_httpservers: Python CGI scripts have to be encoded to utf-8
And not the locale encoding. With this commit, the test finally pass on Windows
with a non-ascii path :-)
2010-10-17 20:17:41 +00:00
Victor Stinner
3218c31429 test_httpservers: Fix skip test check, the python executable path have to be
encodable to utf-8, not to the file1 encoding.
2010-10-17 20:13:36 +00:00
Victor Stinner
0b0ca0c37e test_httpservers: skip CGI tests if Python executable path is not encodable 2010-10-17 19:46:36 +00:00
Senthil Kumaran
ee2538beef Fix Issue10119 - test_urllibnet failure when using support.transient_internet. 2010-10-17 10:52:12 +00:00
Gregory P. Smith
feedda2bab Avoid hanging the test on netbsd5. 2010-10-17 03:09:12 +00:00
Gregory P. Smith
0f61dd0787 skip test_itimer_virtual on NetBSD to prevent the test suite from hanging. 2010-10-17 02:57:19 +00:00
Victor Stinner
e3874ed7dd test_cmd_line_script: format paths with ascii() instead of repr()
Fix the test if the native filesystem encoding is not utf-8 (eg. cp1250 on
Windows).
2010-10-17 01:41:09 +00:00
Benjamin Peterson
ca9f128583 use assertion methods 2010-10-17 01:30:26 +00:00
Benjamin Peterson
cb17094dcd disable the garbage collector while collecting traces, so that __del__s don't get caught 2010-10-17 01:29:11 +00:00
Benjamin Peterson
fc49f2a973 remove rather pointless test 2010-10-17 01:25:19 +00:00
Gregory P. Smith
b603d03f15 fix for netbsd. 2010-10-17 00:17:24 +00:00
Victor Stinner
f6782ac0b6 test_subprocess: use surrogateescape error handler to write shell scripts
test_args_string() and test_call_string() create shell scripts including the
path to the Python executable: use surrogateescape to encode paths including
surrogate characters.
2010-10-16 23:46:43 +00:00
Victor Stinner
9d396399da Issue #10123: Don't use non-ascii filenames in test_doctest tests. Add a
new test specific to unicode (non-ascii name and filename).
2010-10-16 21:54:59 +00:00
Benjamin Peterson
230b20684f don't identify the toplevel namespace by name #9997 2010-10-16 03:45:45 +00:00
Barry Warsaw
8cf4eae522 First (uncontroversial) part of issue 9807.
* Expose the build flags to Python as sys.abiflags
* Shared library libpythonX.Y<abiflags>.so
* python-config --abiflags
* Make two distutils tests that failed with --enable-shared (even before this
  patch) succeed.
* Fix a few small style issues.
2010-10-16 01:04:07 +00:00
Georg Brandl
b9cd72a9f7 #5762: fix handling of empty namespace in minidom, which would result in AttributeError on toxml(). 2010-10-15 17:58:45 +00:00
Alexander Belopolsky
e8f583244a Issue #9308: Removed redundant coding cookies. Added tests for
importing encoded modules that do not depend on specific stdlib
modules being encoded in a certain way.
2010-10-15 16:28:20 +00:00
Georg Brandl
1f7fffb308 #2830: add html.escape() helper and move cgi.escape() uses in the standard library to it. It defaults to quote=True and also escapes single quotes, which makes casual use safer. The cgi.escape() interface is not touched, but emits a (silent) PendingDeprecationWarning. 2010-10-15 15:57:45 +00:00
Georg Brandl
91d2a3fb0e #5355 followup: add unit test for new dictionaries, and provide submodules from xml.parsers.expat as advertised. 2010-10-15 15:25:23 +00:00
Brian Curtin
f668df5fa7 Fix #10098. Fix sporadic test_os failures.
Amaury noticed that we're not waiting for the subprocess to be ready --
it should be checking for 1, not 0.
2010-10-15 14:21:06 +00:00
Antoine Pitrou
ba8071241b Revert debug printout 2010-10-15 13:52:53 +00:00
Antoine Pitrou
fe9791365d Enable debug output at the start of the regression suite instead.
Sorry for the ephemeral inconvenience.
2010-10-15 13:47:00 +00:00
Antoine Pitrou
f64317e05f Temporary debug printout for buildbots 2010-10-15 13:35:51 +00:00
Antoine Pitrou
92f60ed82a More proper closing of files 2010-10-14 22:11:44 +00:00
Florent Xicluna
35049443dc Add test case for issue #9409, non-ascii char in doctest. It passes in 3.2 but needs fixing in 2.7. 2010-10-14 21:35:58 +00:00
Antoine Pitrou
b86680e299 Explicitly close some files (from issue #10093) 2010-10-14 21:15:17 +00:00
Florent Xicluna
d9f57630fe Fix the regex to match all kind of filenames, for interactive debugging in doctests. (issue #9409) 2010-10-14 20:56:20 +00:00
Antoine Pitrou
d778e568ba Increase timeouts in test_ftplib (for very slow buildbots) 2010-10-14 20:35:26 +00:00
Antoine Pitrou
8c8f1ac46c Oops 2010-10-14 18:32:54 +00:00
Antoine Pitrou
b3a88b5c42 Really fix bug 2010-10-14 18:31:39 +00:00
Barry Warsaw
270800c801 Fix issue 10094, by narrowing down the test for PROXY environment variables.
Ubuntu 10.10 introduced $UBUNTU_MENUPROXY into the default user environment,
and that's what's tripping up the code.
2010-10-14 18:10:34 +00:00