Commit Graph

17079 Commits

Author SHA1 Message Date
Andrew Kuchling 6ce8d17d02 Merge from 3.3 2013-06-22 14:57:45 -04:00
Andrew Kuchling 9290dd14b0 #18113: avoid segfault if Py_XDECREF triggers code that calls set_panel_userptr again
Problem noted & original patch by Serhiy Storchaka; I tweaked the patch a bit.
2013-06-22 14:50:56 -04:00
Christian Heimes 6ade516510 BSD: block devices are gone
http://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html
2013-06-22 14:48:42 +02:00
Christian Heimes 45d9493ee9 BSD: block devices are gone
http://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html
2013-06-22 14:48:32 +02:00
Christian Heimes 79278bd8f6 Fix test_stat on BSD, /dev/da0 and /dev/ad0 are links 2013-06-21 18:53:27 +02:00
Christian Heimes 60a95933cb Fix test_stat on BSD, /dev/da0 and /dev/ad0 are links 2013-06-21 18:53:13 +02:00
Christian Heimes 085e1c6e6c Add tests for untested features of the 'stat' module (part of issue #11016) 2013-06-21 18:26:05 +02:00
Christian Heimes f678b3131e Add tests for untested features of the 'stat' module (part of issue #11016) 2013-06-21 18:25:56 +02:00
Serhiy Storchaka 10dc0eb5a4 Issue #18202: Fix minor bugs and cleanup test_source_encoding.py. 2013-06-19 10:29:58 +03:00
Serhiy Storchaka 0a3cdf063c Issue #18202: Fix minor bugs and cleanup test_coding.py. 2013-06-19 10:23:35 +03:00
Victor Stinner e08d4881f8 (Merge 3.3) test_faulthandler: use _sigsegv() instead of _read_null()
faulthandler._read_null() is not reliable: it does not crash on AIX.
2013-06-17 23:39:06 +02:00
Victor Stinner 5678539500 test_faulthandler: use _sigsegv() instead of _read_null()
faulthandler._read_null() is not reliable: it does not crash on AIX.
2013-06-17 23:37:59 +02:00
Victor Stinner 3f41c64ba0 (Merge 3.3) Issue #18238: Skip test_signal.test_sigwaitinfo_interrupted() on AIX
sigwaitinfo() can be interrupted on Linux (raises InterruptedError), but not on
AIX.
2013-06-17 21:52:24 +02:00
Victor Stinner 91f9bdd773 Issue #18238: Skip test_signal.test_sigwaitinfo_interrupted() on AIX
sigwaitinfo() can be interrupted on Linux (raises InterruptedError), but not on
AIX.
2013-06-17 21:51:56 +02:00
Victor Stinner 546ccf090e Issue #18228: Use locale.setlocale(name, None) instead of
locale.getlocale(name) in test.regrtest.saved_test_environment

locale.getlocale() parses the locale, which is useless for
saved_test_environment.
2013-06-17 21:28:14 +02:00
Victor Stinner d9ccf7fe22 Issue #18228: Fix locale test of test.regrtest.saved_test_environment
Skip LC_ALL becore getlocale(locale.LC_ALL) always fail, and catch also
ValueError.
2013-06-17 20:40:05 +02:00
Victor Stinner a222de1a23 (Merge 3.3) regrtest.py: Fix another typo in the usage of the faulthandler module 2013-06-17 20:35:42 +02:00
Victor Stinner 934676afba regrtest.py: Fix another typo in the usage of the faulthandler module 2013-06-17 20:35:08 +02:00
Victor Stinner 4a704d2341 (Merge 3.3) regrtest.py: Fix typo in the usage of the faulthandler module 2013-06-17 20:28:02 +02:00
Victor Stinner 4de701b728 regrtest.py: Fix typo in the usage of the faulthandler module 2013-06-17 20:27:10 +02:00
Christian Heimes 9ce4f36aa1 merge heads 2013-06-17 15:45:11 +02:00
Christian Heimes 9a5395ae2b Issue #18147: Add diagnostic functions to ssl.SSLContext().
get_ca_list() lists all loaded CA certificates and cert_store_stats() returns
amount of loaded X.509 certs, X.509 CA certs and CRLs.
2013-06-17 15:44:12 +02:00
Serhiy Storchaka a5f004fe7d Merge heads 2013-06-17 16:38:00 +03:00
Serhiy Storchaka 774bed7e60 Issue #18167: cgi.FieldStorage no more fails to handle multipart/form-data
when \r\n appears at end of 65535 bytes without other newlines.
2013-06-17 16:36:20 +03:00
Serhiy Storchaka c7bfe0e42e Issue #18167: cgi.FieldStorage no more fails to handle multipart/form-data
when \r\n appears at end of 65535 bytes without other newlines.
2013-06-17 16:34:41 +03:00
Christian Heimes 9424bb4aea Issue #18207: Fix test_ssl for some versions of OpenSSL that ignore seconds
in ASN1_TIME fields.
2013-06-17 15:32:57 +02:00
Serhiy Storchaka 78be6e8aa3 Issue #18223: Refactor test_tarfile.
* Use mixins for generating tests for different compression types.
* Make test_tarfile discoverable.
* Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue.
* Add explicit test skips instead of reporting skipped tests as passed.
* Wrap long lines.
* Correct a comment for test_hardlink_extraction1.
* Add support.requires_gzip.
* Replace ImportError by  ModuleNotFoundError.

and some other minor enhancements.
2013-06-17 16:11:06 +03:00
Serhiy Storchaka 8b56292079 Issue #18223: Refactor test_tarfile.
* Use mixins for generating tests for different compression types.
* Make test_tarfile discoverable.
* Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue.
* Add explicit test skips instead of reporting skipped tests as passed.
* Wrap long lines.
* Correct a comment for test_hardlink_extraction1.
* Add support.requires_gzip.

and some other minor enhancements.
2013-06-17 15:38:50 +03:00
Brett Cannon f24fecd4ac Issue #18076: Introduce imoportlib.util.decode_source().
The helper function makes it easier to implement
imoprtlib.abc.InspectLoader.get_source() by making that function
require just the raw bytes for source code and handling all other
details.
2013-06-16 18:37:53 -04:00
Brett Cannon 6d26eba186 Check that warnings.showwarning() is not changed. 2013-06-16 15:20:48 -04:00
Brett Cannon 13d8ff9c5b Issues #18058, 18057: Make importlib._bootstrap.NamespaceLoader
conform the the InspectLoader ABC. Perk of this is that runpy/-m can
now work with namespace packages.
2013-06-16 14:56:58 -04:00
Brett Cannon e4f41deccf Issue #17177: The imp module is pending deprecation.
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
2013-06-16 13:13:40 -04:00
Brett Cannon 39295e7a55 Stop using the deprecated unittest.TestCase.assertRaisesRegexp() 2013-06-16 11:37:57 -04:00
Brett Cannon 2f9f056db1 Make test_builtin work when executed directly 2013-06-15 23:24:11 -04:00
Brett Cannon ef888024d8 Issue #17177: stop using imp in test_importlib 2013-06-15 18:39:21 -04:00
Brett Cannon b57a085c74 Issue #17177: Stop using imp in zipfile 2013-06-15 17:32:30 -04:00
Brett Cannon 9529fbfd36 Issue #17177: Stop using imp in a bunch of tests 2013-06-15 17:11:25 -04:00
Andrew Kuchling 8a2a902f88 Merge with 3.3 2013-06-15 15:10:08 -04:00
Brett Cannon df960682a5 Issue #17177: Stop using imp with py_compile 2013-06-15 14:07:21 -04:00
Andrew Kuchling 53e5ea7951 #18113: Objects associated to a curses.panel object with set_userptr() were leaked.
Reported by Atsuo Ishimoto.
2013-06-15 14:04:04 -04:00
Brett Cannon 7822e123c4 Issue #17177: stop using imp for compileall. 2013-06-14 23:04:02 -04:00
Brett Cannon 0b16b0d3f0 make test more robust under Windows 2013-06-14 22:50:57 -04:00
Brett Cannon a3c96154d2 Issue #17907: touch up the code for imp.new_module(). 2013-06-14 22:26:30 -04:00
Ethan Furman 6b3d64ab5d Closes issue 17947. Adds PEP-0435 (Adding an Enum type to the Python standard library).
Missing files added.
News entry added.
2013-06-14 16:55:46 -07:00
Brett Cannon 05a647deed Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document the
deprecation of imp.get_magic().
2013-06-14 19:02:34 -04:00
Brett Cannon 8c18da20f9 merge 2013-06-14 18:33:21 -04:00
Brett Cannon 33915eba7c Issue #17222: Raise FileExistsError when py_compile.compile would
overwrite a symlink or non-regular file with a regular file.
2013-06-14 18:33:00 -04:00
Ned Deily 7bff3cbe3d Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache.
Patch by Mark Levitt
2013-06-14 15:19:11 -07:00
Brett Cannon 3fe35e6503 Issue #18193: Add importlib.reload(), documenting (but not
implementing in code) the deprecation of imp.reload().

Thanks to Berker Peksag for the patch.
2013-06-14 15:04:26 -04:00
Brett Cannon 6f1057605b Remove a dead import line.
Noticed by Serhly Storchaka.
2013-06-14 10:42:48 -04:00
Brett Cannon 58f2efb968 Move test_pep352 over to unittest.main() 2013-06-13 21:18:43 -04:00
Serhiy Storchaka 9702a17a6a Issue #18048: Merge test_pep263.py and test_coding.py into test_source_encoding.py. 2013-06-13 10:08:00 +03:00
Serhiy Storchaka 07c805d0fc Issue #18048: Rename test_coding.py to test_source_encoding.py. 2013-06-13 09:50:42 +03:00
Serhiy Storchaka 29f2d73068 Issue #18048: Rename test_pep263.py to test_source_encoding.py. 2013-06-13 09:48:15 +03:00
Brett Cannon e5b25df16d Issue #15767: Add an explicit test for raising ModuleNotFoundError
when None in sys.modules.
2013-06-12 23:38:50 -04:00
Brett Cannon 3e9a9ae09d Update various test modules to use unittest.main() for test discovery
instead of manually listing tests for test.support.run_unittest().
2013-06-12 21:25:59 -04:00
Brett Cannon e382b5868a Partially revert changeset #281857369a78 to make sure threads are
reaped in all situations.
2013-06-12 21:25:23 -04:00
Brett Cannon c9a1bfed5d Move test___all__ over to unittest.main() and use ModuleNotFoundError 2013-06-12 20:12:30 -04:00
Brett Cannon 603dcf2714 Spruce up test_xmlrpc by using ModuleNotFoundError and moving to
unittest.main().
2013-06-12 20:04:19 -04:00
Brett Cannon d5b4e1d891 Move test_zipfile to unittest.main() 2013-06-12 19:57:19 -04:00
Brett Cannon b1611e2772 Issue #15767: Introduce ModuleNotFoundError, a subclass of
ImportError.

The exception is raised by import when a module could not be found.
Technically this is defined as no viable loader could be found for the
specified module. This includes ``from ... import`` statements so that
the module usage is consistent for all situations where import
couldn't find what was requested.

This should allow for the common idiom of::

  try:
    import something
  except ImportError:
    pass

to be updated to using ModuleNotFoundError and not accidentally mask
ImportError messages that should propagate (e.g. issues with a
loader).

This work was driven by the fact that the ``from ... import``
statement needed to be able to tell the difference between an
ImportError that simply couldn't find a module (and thus silence the
exception so that ceval can raise it) and an ImportError that
represented an actual problem.
2013-06-12 16:59:46 -04:00
Brett Cannon 638ce0779b Move code from test_importhooks into test_zipimport. 2013-06-12 15:57:01 -04:00
Serhiy Storchaka f15ffe0ee5 Add tests for issue #18183. 2013-06-12 09:28:20 +03:00
Serhiy Storchaka 31b1c8bbde Add tests for issue #18183. 2013-06-12 09:20:44 +03:00
Brett Cannon 68133fdcbe Issue #18158: delete test_importhooks. Redundant in the face of
test_importlib.
2013-06-11 17:12:30 -04:00
Benjamin Peterson 3164f5d565 merge 3.3 (#18183) 2013-06-10 09:24:01 -07:00
Benjamin Peterson 7e30373126 remove MAX_MAXCHAR because it's unsafe for computing maximum codepoitn value (see #18183) 2013-06-10 09:19:46 -07:00
Richard Oudkerk a35a128acc Merge. 2013-06-10 16:31:39 +01:00
Richard Oudkerk 0e547b66dc Issue #18174: Fix fd leaks in tests. 2013-06-10 16:29:19 +01:00
Ronald Oussoren 36451f076b (3.3->default) Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
2013-06-10 10:37:12 +02:00
Ronald Oussoren a822d36675 Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
2013-06-10 10:36:28 +02:00
Christian Heimes 46bebee25f Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store. 2013-06-09 19:03:31 +02:00
Christian Heimes 6d7ad13a45 Issue #18143: Implement ssl.get_default_verify_paths() in order to debug
the default locations for cafile and capath.
2013-06-09 18:02:55 +02:00
Serhiy Storchaka 9670543a00 Issue #18038: SyntaxError raised during compilation sources with illegal
encoding now always contains an encoding name.
2013-06-09 16:53:55 +03:00
Serhiy Storchaka 3af14aaba5 Issue #18038: SyntaxError raised during compilation sources with illegal
encoding now always contains an encoding name.
2013-06-09 16:51:52 +03:00
Ezio Melotti f103d55b2a #17691: merge with 3.3. 2013-06-09 00:10:04 +03:00
Ezio Melotti 28b0d9d13e #17691: test_univnewlines now works with unittest test discovery. Patch by Zachary Ware. 2013-06-09 00:07:06 +03:00
Łukasz Langa 7f7a67aac8 Fixed #18150: duplicate test inside TestSingleDispatch
Thanks to Vajrasky Kok for the patch
2013-06-07 22:25:27 +02:00
Brett Cannon 997487d5d7 Issue #7732: Move an imp.find_module test from test_import to
test_imp.
2013-06-07 13:26:53 -04:00
Vinay Sajip 30298b468b Closes #11959: SMTPServer and SMTPChannel now take an optional map, use of which avoids affecting global state. 2013-06-07 15:21:41 +01:00
Łukasz Langa 6f69251980 Add reference implementation for PEP 443
PEP accepted: http://mail.python.org/pipermail/python-dev/2013-June/126734.html
2013-06-05 12:20:24 +02:00
Serhiy Storchaka 7d15b54f37 Issue #18094: test_uuid no more reports skipped tests as passed. 2013-05-31 22:31:02 +03:00
Stefan Krah 891ca9e06a Backport bff16086f03b and bcaaaa00425b. 2013-05-29 19:14:17 +02:00
Stefan Krah 6edda14b29 Issue #17768: Support newline fill character in decimal.py and NUL fill
character in _decimal.c.
2013-05-29 15:45:38 +02:00
Senthil Kumaran c70a6ae49b #17403: urllib.parse.robotparser normalizes the urls before adding to ruleline.
This helps in handling certain types invalid urls in a conservative manner.
2013-05-29 05:54:31 -07:00
Terry Jan Reedy eb4c9c77b8 Issue #15392: Do not run tests if threading/_thread not available. Otherwise
touchup test_idle. Rename README.txt.
2013-05-28 22:21:53 -04:00
Serhiy Storchaka 37a79a12d1 Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw
stream's read() returns more bytes than requested.
2013-05-28 16:24:45 +03:00
Serhiy Storchaka 12516e2c1b Issue #17746: Skip test_shutil.test_non_matching_mode when run as root or
on unsuitable platform/environment.
2013-05-28 15:50:15 +03:00
Serhiy Storchaka ea2b490f3d Issue #18011: base64.b32decode() now raises a binascii.Error if there are
non-alphabet characters present in the input string to conform a docstring.
Updated the module documentation.
2013-05-28 15:27:29 +03:00
Jason R. Coombs b501b565c6 Use simple call to os.symlink for broken link (intended for previous commit) 2013-05-27 23:52:43 -04:00
Jason R. Coombs 3a09286790 Issue #13772: Restored directory detection of targets in `os.symlink` on Windows, which was temporarily removed in Python 3.2.3 due to an incomplete implementation. The implementation now works even if the symlink is created in a location other than the current directory. 2013-05-27 23:21:28 -04:00
Terry Jan Reedy db4e5c53c9 Issue #15392: Create a unittest framework for IDLE.
Preliminary patch by Rajagopalasarma Jayakrishnan.
2013-05-27 21:32:03 -04:00
Antoine Pitrou 80bc00f582 Issue #18063: fix some struct specifications in the tests for sys.getsizeof(). 2013-05-25 23:47:29 +02:00
Eli Bendersky 4ace240fe5 Clean-up duplicated code in tests 2013-05-25 07:12:14 -07:00
Eli Bendersky 6dc32b34dd Issue #13612: handle unknown encodings without a buffer overflow.
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.

Based on a patch by Serhiy Storchaka.
2013-05-25 05:25:48 -07:00
Antoine Pitrou 6b5a38c728 Fix test_bad_address on Ubuntu 13.04 2013-05-25 13:08:13 +02:00
Ronald Oussoren 27a4ac535f Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:47:37 +02:00
Benjamin Peterson 6724612755 add test for inequality 2013-05-22 13:27:25 -07:00
Serhiy Storchaka 66d53fa9ad Issue #16986: ElementTree now correctly parses a string input not only when
an internal XML encoding is UTF-8 or US-ASCII.
2013-05-22 17:07:51 +03:00
Benjamin Peterson 611d901289 add recursive repr test 2013-05-19 19:39:38 -07:00
Antoine Pitrou dc49b2b88c Try to make test more reliable (saw some sporadic failures on buildbots) 2013-05-19 15:55:40 +02:00
Antoine Pitrou 916fc7bf28 Issue #11995: test_pydoc doesn't import all sys.path modules anymore. 2013-05-19 15:44:54 +02:00
Eli Bendersky 08231a9c6a Issue #17901: fix TreeBuilder construction for an explicit element_factory=None
Based on report and patch by Aaron Oakley.
2013-05-18 15:47:16 -07:00
Richard Oudkerk 90a24270f8 Close file before reopening to keep Windows happy in test_sax. 2013-05-18 18:11:30 +01:00
Antoine Pitrou 636f93c63b Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099). 2013-05-18 17:56:42 +02:00
Benjamin Peterson d2b58a9880 only recursively expand in the format spec (closes #17644) 2013-05-17 17:34:30 -05:00
Benjamin Peterson 5cfbd2642c frozen modules now apparently have empty __path__ 2013-05-31 22:18:26 -07:00
Brett Cannon 3e0651b5fa Issue #18065: For frozen packages set __path__ to [].
Previously __path__ was set to [__name__], but that could lead to bad
results if someone managed to circumvent the frozen importer and
somehow ended up with a finder that thought __name__ was a legit
directory/location.
2013-05-31 23:18:39 -04:00
Brett Cannon 0dbb4c7f13 Issues #18088, 18089: Introduce
importlib.abc.Loader.init_module_attrs() and implement
importlib.abc.InspectLoader.load_module().

The importlib.abc.Loader.init_module_attrs() method sets the various
attributes on the module being loaded. It is done unconditionally to
support reloading. Typically people used
importlib.util.module_for_loader, but since that's a decorator there
was no way to override it's actions, so init_module_attrs() came into
existence to allow for overriding. This is also why module_for_loader
is now pending deprecation (having its other use replaced by
importlib.util.module_to_load).

All of this allowed for importlib.abc.InspectLoader.load_module() to
be implemented. At this point you can now implement a loader with
nothing more than get_code() (which only requires get_source();
package support requires is_package()). Thanks to init_module_attrs()
the implementation of load_module() is basically a context manager
containing 2 methods calls, a call to exec(), and a return statement.
2013-05-31 18:56:47 -04:00
Brett Cannon b60a43eabf Add a reset_name argument to importlib.util.module_to_load in order to
control whether to reset the module's __name__ attribute in case a
reload is being done.
2013-05-31 18:11:17 -04:00
Serhiy Storchaka c7a2825681 Issue #18094: test_uuid no more reports skipped tests as passed. 2013-05-31 22:34:00 +03:00
Brett Cannon 357c9fb055 Rename importlib.util.ModuleManager to module_to_load so that the name
explains better what the context manager is providing.
2013-05-30 17:31:47 -04:00
Stefan Krah 2e537f9edc test_decimal: add __sizeof__() tests for code coverage. 2013-05-29 18:50:06 +02:00
Stefan Krah 8d90e383a3 Merge 3.3. 2013-05-29 15:47:24 +02:00
Senthil Kumaran 6b3026ce72 merge from 3.3
#17403: urllib.parse.robotparser normalizes the urls before adding to
ruleline. This helps in handling certain types invalid urls in a conservative
manner. Patch contributed by Mher Movsisyan.
2013-05-29 05:57:21 -07:00
Terry Jan Reedy 7b503965a0 Merge with 3.3 2013-05-28 22:22:14 -04:00
Brett Cannon 3dc48d6f69 Issue #18070: importlib.util.module_for_loader() now sets __loader__
and __package__ unconditionally in order to do the right thing for
reloading.
2013-05-28 18:35:54 -04:00
Brett Cannon a3687f0d68 Introduce importlib.util.ModuleManager which is a context manager to
handle providing (and cleaning up if needed) the module to be loaded.

A future commit will use the context manager in
Lib/importlib/_bootstrap.py and thus why the code is placed there
instead of in Lib/importlib/util.py.
2013-05-28 17:29:34 -04:00
Serhiy Storchaka 281945f427 Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw
stream's read() returns more bytes than requested.
2013-05-28 16:27:08 +03:00
Serhiy Storchaka 5758fa78d0 Issue #17746: Skip test_shutil.test_non_matching_mode when run as root or
on unsuitable platform/environment.
2013-05-28 15:53:46 +03:00
Serhiy Storchaka 77a3ad743f Issue #18011: base64.b32decode() now raises a binascii.Error if there are
non-alphabet characters present in the input string to conform a docstring.
Updated the module documentation.
2013-05-28 15:30:38 +03:00
Jason R. Coombs fb1141cd55 Merge with 3.3 2013-05-27 23:53:02 -04:00
Jason R. Coombs 8f1a8e32b1 Merge with 3.3 2013-05-27 23:26:36 -04:00
Terry Jan Reedy 667a03b292 Merge with 3.3 2013-05-27 21:33:40 -04:00
Brett Cannon 3b62ca88e4 Issue #18072: Implement get_code() for importlib.abc.InspectLoader and
ExecutionLoader.
2013-05-27 21:11:04 -04:00
Brett Cannon 9ffe85e1e8 Move importlib.abc.SourceLoader.source_to_code() to InspectLoader.
While the previous location was fine, it makes more sense to have the
method higher up in the inheritance chain, especially at a point where
get_source() is defined which is the earliest source_to_code() could
programmatically be used in the inheritance tree in importlib.abc.
2013-05-26 16:45:10 -04:00
Antoine Pitrou 1256f1f438 Issue #18063: fix some struct specifications in the tests for sys.getsizeof(). 2013-05-25 23:48:15 +02:00
Łukasz Langa eadd8cf507 Fix #16832 - expose cache validity checking support in ABCMeta 2013-05-25 18:41:50 +02:00
Eli Bendersky 8be90396f2 Clean-up duplicated code in tests 2013-05-25 07:12:38 -07:00
Eli Bendersky 7b3022f24f Issue #13612: handle unknown encodings without a buffer overflow.
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.

Based on a patch by Serhiy Storchaka.
2013-05-25 05:27:10 -07:00
Antoine Pitrou 765f3cce48 Fix test_bad_address on Ubuntu 13.04 2013-05-25 13:08:34 +02:00
Vinay Sajip 3b84eae03e Closes #18046: Simplified logging internals relating to levels and their names. Thanks to Alex Gaynor for the patch. 2013-05-25 03:20:34 -07:00
Senthil Kumaran 8307075ce8 Fix #17272 - Make Request.full_url and Request.get_full_url return same result under all circumstances.
Document the change of Request.full_url to a property.
2013-05-24 09:14:12 -07:00
Ronald Oussoren dc3e6cc452 (3.3->default) Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:51:21 +02:00
Benjamin Peterson 965efe9e5e merge 3.3 2013-05-22 13:27:32 -07:00
Serhiy Storchaka 447b6e3c6e Issue #16986: ElementTree now correctly parses a string input not only when
an internal XML encoding is UTF-8 or US-ASCII.
2013-05-22 17:21:06 +03:00
Serhiy Storchaka 3ee6dabf5b Issue #17900: Allowed pickling of recursive OrderedDicts. Decreased pickled
size and pickling time.
2013-05-21 12:47:57 +03:00
Charles-François Natali b10c71daa2 Backed out changeset c0f2b038fc12 2013-05-21 10:45:46 +02:00
Charles-François Natali c7c333d25d Issue #17683: socket module: return AF_UNIX addresses in Linux abstract
namespace as string.
2013-05-21 09:49:18 +02:00
Charles-Francois Natali d66b10e165 Issue #17684: Fix some test_socket failures due to limited FD passing support
on OS-X. Patch by Jeff Ramnani.
2013-05-20 19:08:19 +02:00
Charles-Francois Natali 44feda3cd0 Issue #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
initial patch by Trent Nelson.
2013-05-20 14:40:46 +02:00
Benjamin Peterson d2cef8a204 merge 3.3 2013-05-19 19:39:46 -07:00
Eli Bendersky e26fa1bdcb Add some testing to verify which module was imported in ET tests.
This is useful when mucking with import_fresh_module to either force or block
importing of the _elementtree accelerator. These tests in place provide an
immediate indication whether the accelerator was actually imported and overrode
the classes it should have.
2013-05-19 17:49:54 -07:00
Eli Bendersky c4e98a6a9b Cleanup more old ET library leftovers 2013-05-19 09:24:43 -07:00
Eli Bendersky 46955b2d30 Issue #17988: remove unused alias for Element and rename the used one
Renaming to _Element_Py for clarity and moving it to a more logical location.
_ElementInterface OTOH is unused and is therefore removed.

Close #17988
2013-05-19 09:20:50 -07:00
Eli Bendersky 3a4fbd8241 _elementtree.XMLParser._setevents should support any sequence, not just tuples
Also clean up some code around this
2013-05-19 09:01:49 -07:00
Antoine Pitrou 5b6616dee3 Try to make test more reliable (saw some sporadic failures on buildbots) 2013-05-19 15:55:59 +02:00
Antoine Pitrou c52d113e28 Issue #11995: test_pydoc doesn't import all sys.path modules anymore. 2013-05-19 15:46:37 +02:00
Eli Bendersky 20c1cdd64a Issue #17901: fix TreeBuilder construction for an explicit element_factory=None
Based on report and patch by Aaron Oakley.
2013-05-18 15:47:58 -07:00
Vinay Sajip 10e8c49a11 Re-enabled skipped test. 2013-05-18 10:19:54 -07:00