Commit Graph

54912 Commits

Author SHA1 Message Date
Ezio Melotti 660a949720 #14236: merge with 3.2. 2012-04-29 08:24:02 +03:00
Ezio Melotti e990092fd0 #14236: mention Unicode whitespace in \s documentation. 2012-04-29 08:23:25 +03:00
Senthil Kumaran 1aacba497b Fix Issue6085 - SimpleHTTPServer address_string to return client ip instead of client hostname 2012-04-29 12:51:54 +08:00
Ezio Melotti 0ce1649674 #14461: merge with 3.2. 2012-04-29 07:35:22 +03:00
Ezio Melotti 0a6b5419b0 #14461: fix wording. 2012-04-29 07:34:46 +03:00
Senthil Kumaran 4b7698c468 issue14427 - Document Request.get_header and Request.header_items 2012-04-29 11:51:56 +08:00
Senthil Kumaran 8dc500476a issue14427 - Document Request.get_header and Request.header_items 2012-04-29 11:50:39 +08:00
Senthil Kumaran 150c365430 httplib - minor update to check empty response 2012-04-29 10:40:23 +08:00
Senthil Kumaran 7e70a5c169 httplib - minor update to check empty response 2012-04-29 10:39:49 +08:00
Senthil Kumaran 889ad16e54 httplib test for early eof response. related to Issue13684 2012-04-29 10:21:26 +08:00
Senthil Kumaran 9c29f86a81 httplib test for early eof response. related to Issue13684 2012-04-29 10:20:46 +08:00
Ezio Melotti e240947cc0 #14155: merge note about \b from 3.2. 2012-04-29 04:53:20 +03:00
Ezio Melotti 285e51b7e0 #14155: add a note about \b. 2012-04-29 04:52:30 +03:00
Victor Stinner fe98e2fc83 Issue #14428: Use the new time.perf_counter() and time.process_time() functions
* Replace "time.clock on windows, or time.time" with time.perf_counter()
 * profile module: only use time.process_time() instead of trying different
   functions providing the process time
 * timeit module: use time.perf_counter() by default, time.time() and
   time.clock() can still be used using --time and --clock options
 * pybench program: use time.perf_counter() by default, add support for
   the new time.process_time() and time.perf_counter() functions, but stay
   backward compatible. Use also time.get_clock_info() to display information
   of the timer.
2012-04-29 03:01:20 +02:00
Victor Stinner 47620a6611 Close #14309: Deprecate time.clock()
Use time.perf_counter() or time.process_time() instead.
2012-04-29 02:52:39 +02:00
Victor Stinner ec89539ccc Issue #14428, #14397: Implement the PEP 418
* Rename time.steady() to time.monotonic()
 * On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of
   QueryPerformanceCounter()
 * time.monotonic() uses CLOCK_HIGHRES if available
 * Add time.get_clock_info(), time.perf_counter() and time.process_time()
   functions
2012-04-29 02:41:27 +02:00
Victor Stinner ca6e40f12a Time doc: documentation that the CLOCK_* constants and clock_*() functions are
not always available.
2012-04-28 23:47:33 +02:00
Sandro Tosi 4aff7ed332 Issue #14448: merge with 3.2 2012-04-28 11:19:59 +02:00
Sandro Tosi 100b889ccd Issue #14448: add reference to IANA timezone database; thanks to Georg/Nick suggestions 2012-04-28 11:19:37 +02:00
Victor Stinner b11d91d969 Fix my previous commit: bool is a long, restore the specical case for bool 2012-04-28 00:25:34 +02:00
Antoine Pitrou 92ff4e196b Issue #14666: stop multiprocessing's resource-sharing thread after the tests are done.
Also, block delivery of signals to that thread. Patch by Richard Oudkerk.

This will hopefully fix sporadic freezes on the FreeBSD 9.0 buildbot.
2012-04-27 23:51:03 +02:00
Victor Stinner d0880d57b0 Simplify and optimize formatlong()
* Remove _PyBytes_FormatLong(): inline it into formatlong()
 * the input type is always a long, so remove the code for bool
 * don't duplicate the string if the length does not change
 * Use PyUnicode_DATA() instead of _PyUnicode_AsString()
2012-04-27 23:40:13 +02:00
Brett Cannon 19b409a341 merge 2012-04-27 17:27:33 -04:00
Brett Cannon efad00d520 Issue #14646: __import__() now sets __loader__ if need be.
importlib.util.module_for_loader also will set __loader__ along with
__package__. This is in conjunction to a forthcoming update to PEP 302
which will make these two attributes required for loaders to set.
2012-04-27 17:27:14 -04:00
Victor Stinner 94d558b063 Optimize _PyUnicode_FindMaxChar() find pure ASCII strings 2012-04-27 22:26:58 +02:00
Brett Cannon fea73efc9e Issue #14605: Don't error out if get_importer() returns None. 2012-04-27 15:45:15 -04:00
Brett Cannon 6d3b3218be merge 2012-04-27 15:31:45 -04:00
Brett Cannon aa93642a35 Issue #14605: Use None in sys.path_importer_cache to represent no
finder instead of using some (now non-existent) implicit finder.
2012-04-27 15:30:58 -04:00
Benjamin Peterson 64acccf46d decref cached keys on type deallocation (#13903) 2012-04-27 15:07:36 -04:00
Brett Cannon 9e66ac683c merge 2012-04-27 14:02:33 -04:00
Brett Cannon ce418b448f Issue #14605: Stop having implicit entries for sys.meta_path.
ImportWarning is raised if sys.meta_path is found to be empty.
2012-04-27 14:01:58 -04:00
Brett Cannon 3c6ea1c14d Issue #14605: Insert to the front of sys.meta_path, don't append. 2012-04-27 13:52:55 -04:00
Brett Cannon c8287efed3 Invalidate finder caches after creating a new script. 2012-04-27 13:52:03 -04:00
Benjamin Peterson 0e1a5b49cf use wfile api 2012-04-27 11:56:30 -04:00
Martin v. Loewis cfc1cc2996 Issue #14642: Add "hg touch" extension, and "make touch" target. 2012-04-27 16:10:21 +02:00
Victor Stinner 8f825060f1 Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)
* In debug mode, fill the string data with invalid characters
 * Simplify also reference counting in PyCodec_BackslashReplaceErrors()
   and PyCodec_XMLCharRefReplaceError()
2012-04-27 13:55:39 +02:00
Jesus Cea 990eff0776 Backing out 86dc014cdd74. Not ready yet 2012-04-26 17:05:31 +02:00
Jesus Cea 2b47f0a23f Close #10142: Support for SEEK_HOLE/SEEK_DATA 2012-04-26 16:39:35 +02:00
Brian Curtin 790a9b4c19 Add a missing close paren 2012-04-25 23:38:05 -05:00
Benjamin Peterson 9fa47ebafe merge heads 2012-04-26 00:27:06 -04:00
Benjamin Peterson 1138944888 only incref when using borrowing functions 2012-04-26 00:26:37 -04:00
Brett Cannon e0d88a173c Issue #14605: Make explicit the entries on sys.path_hooks that used to
be implicit.

Added a warning for when sys.path_hooks is found to be empty. Also
changed the meaning of None in sys.path_importer_cache to represent
trying sys.path_hooks again (an interpretation of previous semantics).
Also added a warning for when None was found.

The long-term goal is for None in sys.path_importer_cache to represent
the same as imp.NullImporter: no finder found for that sys.path entry.
2012-04-25 20:54:04 -04:00
Brett Cannon 8f79dd5d7c Silence DeprecationWarning for cgi.escape() usage in test_cgi. 2012-04-25 20:49:19 -04:00
Brett Cannon f96bb2f9af Update importlib.h 2012-04-25 20:18:55 -04:00
Brett Cannon 5a5d6a1033 Merge 2012-04-25 20:18:24 -04:00
Victor Stinner 718fbf078c _PyUnicode_CheckConsistency() ensures that the unicode string ends with a
null character
2012-04-26 00:39:37 +02:00
Victor Stinner 3065093bb3 long_to_decimal_string() and _PyLong_Format() check the consistency of newly
created strings using _PyUnicode_CheckConsistency() in debug mode
2012-04-26 00:37:21 +02:00
Marc-Andre Lemburg aed97733df Issue #14605 and #14642: Issue a warning in case Python\importlib.h needs to
be rebuilt, but there's no Python interpreter around to freeze the bootstrap
script.

Forgot to include Makefile.pre.in in changeset 76549:acfdf46b8de1.
2012-04-25 19:45:11 +02:00
Brian Curtin ae7758457f Fix #3561. Add an option to place the Python installation into the Windows Path environment variable. 2012-04-25 08:12:37 -05:00
Antoine Pitrou f99983dacb Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a test class that doesn't inherit from TestCase (i.e. a mixin). 2012-04-25 14:58:17 +02:00