Commit graph

92765 commits

Author SHA1 Message Date
Guido van Rossum
030f489df7 Issue #25441: asyncio: Raise error from drain() when socket is closed. (Merge 3.4->3.5) 2015-10-19 11:54:04 -07:00
Guido van Rossum
c44ecdf687 Issue #25441: asyncio: Raise error from drain() when socket is closed. 2015-10-19 11:49:30 -07:00
doko@ubuntu.com
10ef6bd471 - Issue #25440: Fix output of python-config --extension-suffix. 2015-10-19 14:15:27 +02:00
doko@ubuntu.com
12a72b06c7 - Issue #25440: Fix output of python-config --extension-suffix. 2015-10-19 14:13:35 +02:00
doko@ubuntu.com
2bf91bf46c - Issue #25440: Fix output of python-config --extension-suffix. 2015-10-19 14:07:57 +02:00
Berker Peksag
8b880c7412 Fix another typo noticed by SilentGhost 2015-10-19 00:56:59 +03:00
Berker Peksag
ad56c922b0 Fix another typo noticed by SilentGhost 2015-10-19 00:56:39 +03:00
Berker Peksag
65a73cd8be Issue #25434: Fix typo in whatsnew/3.5rst
Patch by Louis Sautier.
2015-10-18 20:22:38 +03:00
Berker Peksag
5783ee12bd Issue #25434: Fix typo in whatsnew/3.5rst
Patch by Louis Sautier.
2015-10-18 20:22:15 +03:00
Serhiy Storchaka
3e9f87782e Issue #25410: Cleaned up and fixed minor bugs in C implementation of OrderedDict. 2015-10-18 09:54:42 +03:00
Serhiy Storchaka
8003bafd7f Issue #25410: Cleaned up and fixed minor bugs in C implementation of OrderedDict. 2015-10-18 09:53:17 +03:00
Vinay Sajip
03de71d136 Closes #25411: Merged fix from 3.5. 2015-10-17 16:24:23 +01:00
Vinay Sajip
3f445f799a Closes #25411: Merged fix from 3.4. 2015-10-17 16:17:52 +01:00
Vinay Sajip
277640af0f Closes #25411: Improved Unicode support in SMTPHandler. 2015-10-17 16:13:10 +01:00
Vinay Sajip
d469cff021 Merged cookbook update from 3.5. 2015-10-17 13:59:41 +01:00
Vinay Sajip
a83a0e2316 Merged cookbook update from 3.4. 2015-10-17 13:59:12 +01:00
Vinay Sajip
4de9dae57d Added entry to logging cookbook. 2015-10-17 13:58:19 +01:00
Raymond Hettinger
20151f50f6 Issue #25414: Remove unnecessary tests that can never succeed. 2015-10-16 22:47:29 -07:00
Eric V. Smith
6731774216 Issue 25422: Add tests for multi-line string tokenization. Also remove truncated tokens. 2015-10-16 20:45:53 -04:00
Brett Cannon
9b63868f77 Issue #25154: Deprecate the pyvenv script.
This was done so as to move users to `python3 -m venv` which prevents
confusion over which Python interpreter will be used in the virtual
environment when more than one is installed.
2015-10-16 15:14:27 -07:00
Brett Cannon
c0d91aff9a Upgrade the imp module's deprecation to DeprecationWarning. 2015-10-16 12:21:37 -07:00
Brett Cannon
aa15ea4b4e Merge for issue #25407 2015-10-16 12:09:56 -07:00
Brett Cannon
5ad5a7d31f Issue #25407: Drop the mention of the formatter module being removed
in Python 3.6.

The new PEP 4 policy of any module existing in both 2.7 and 3.5
applies here, hence the module will be with us for a bit longer.
2015-10-16 12:09:33 -07:00
Berker Peksag
83356f7a3f Issue #25418: Fix markup in object.__hash__ documentation
Patch by TAKASE Arihiro.
2015-10-16 11:23:31 +03:00
Berker Peksag
85d5d902ce Issue #25418: Fix markup in object.__hash__ documentation
Patch by TAKASE Arihiro.
2015-10-16 11:23:11 +03:00
Berker Peksag
edb9111d41 Issue #25418: Fix markup in object.__hash__ documentation
Patch by TAKASE Arihiro.
2015-10-16 11:22:50 +03:00
Raymond Hettinger
1eca237c2f Remove old Todo entry that isn't going to happen. 2015-10-15 23:25:53 -07:00
Raymond Hettinger
a4b13d0020 Rewrap comment. 2015-10-15 08:05:31 -07:00
Raymond Hettinger
bc00341105 Use unsigned division 2015-10-14 23:33:23 -07:00
Raymond Hettinger
1286d14500 Improve variable names and constant expressions 2015-10-14 23:16:57 -07:00
Steve Dower
b8c1309cba Merge from 3.5 2015-10-14 10:41:52 -07:00
Steve Dower
148827c32a Enabled --pgo option for building 64-bit PGO enabled releases. 2015-10-14 10:40:09 -07:00
Steve Dower
bc94fd7b49 Issue #25164: Changes default all-users install directory to match per-user directory. 2015-10-14 10:36:36 -07:00
Victor Stinner
91108f049f Issue #25210: Change error message of do_richcompare()
Don't add parenthesis to type names. Add also quotes around the type names.

Before:

  TypeError: unorderable types: int() < NoneType()

After:

  TypeError: '<' not supported between instances of 'int' and 'NoneType'
2015-10-14 18:25:31 +02:00
Serhiy Storchaka
dbb98c1443 Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
that caused segmentation fault or hang in iterating after moving several
items to the start of ordered dict.
2015-10-14 19:22:44 +03:00
Serhiy Storchaka
992ec46acc Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
that caused segmentation fault or hang in iterating after moving several
items to the start of ordered dict.
2015-10-14 19:21:24 +03:00
Victor Stinner
83ff8a6832 test_bytes: new try to fix test on '%p' formatter on Windows 2015-10-14 15:28:59 +02:00
Victor Stinner
f9c9a3fedf Refactor binascii.rledecode_hqx()
Rewrite the code to handle the output buffer.
2015-10-14 15:20:07 +02:00
Victor Stinner
1bfe930585 Issue #25384: Fix binascii.rledecode_hqx()
Fix usage of _PyBytesWriter API. Use the new _PyBytesWriter_Resize() function
instead of _PyBytesWriter_Prepare().
2015-10-14 15:02:35 +02:00
Victor Stinner
c3d2bc19e4 Use _PyBytesWriter in _PyBytes_FromIterator() 2015-10-14 14:15:49 +02:00
Victor Stinner
c5c3ba4bec Add _PyBytesWriter_Resize() function
This function gives a control to the buffer size without using min_size.
2015-10-14 13:56:47 +02:00
Victor Stinner
3c50ce39bf Factorize _PyBytes_FromList() and _PyBytes_FromTuple() code using a C macro 2015-10-14 13:50:40 +02:00
Victor Stinner
f2eafa323b Split PyBytes_FromObject() into subfunctions 2015-10-14 13:44:29 +02:00
Victor Stinner
2ec8063cc9 Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPI
* Don't overallocate by 400% when recode is needed: only overallocate on demand
  using _PyBytesWriter.
* Use _PyLong_DigitValue to convert hexadecimal digit to int
* Create _PyBytes_DecodeEscapeRecode() subfunction
2015-10-14 13:32:13 +02:00
Victor Stinner
1285e5c805 Fix compiler warnings (uninitialized variables), false alarms in fact 2015-10-14 12:10:20 +02:00
Victor Stinner
f6358a7e4c _PyBytesWriter_Alloc(): only use 10 bytes of the small buffer in debug mode to
enhance code to detect buffer under- and overflow.
2015-10-14 12:02:39 +02:00
Victor Stinner
f091033b14 Issue #25401: Remove now unused hex_digit_to_int() function 2015-10-14 11:59:46 +02:00
Victor Stinner
2bf8993db9 Optimize bytes.fromhex() and bytearray.fromhex()
Issue #25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now
between 2x and 3.5x faster. Changes:

* Use a fast-path working on a char* string for ASCII string
* Use a slow-path for non-ASCII string
* Replace slow hex_digit_to_int() function with a O(1) lookup in
  _PyLong_DigitValue precomputed table
* Use _PyBytesWriter API to handle the buffer
* Add unit tests to check the error position in error messages
2015-10-14 11:25:33 +02:00
Victor Stinner
ebcf9edc05 Document latest optimizations using _PyBytesWriter 2015-10-14 10:10:00 +02:00
Victor Stinner
772b2b09f2 Optimize bytearray % args
Issue #25399: Don't create temporary bytes objects: modify _PyBytes_Format() to
create work directly on bytearray objects.

* Rename _PyBytes_Format() to _PyBytes_FormatEx() just in case if something
  outside CPython uses it
* _PyBytes_FormatEx() now uses (char*, Py_ssize_t) for the input string, so
  bytearray_format() doesn't need tot create a temporary input bytes object
* Add use_bytearray parameter to _PyBytes_FormatEx() which is passed to
  _PyBytesWriter, to create a bytearray buffer instead of a bytes buffer

Most formatting operations are now between 2.5 and 5 times faster.
2015-10-14 09:56:53 +02:00