Commit Graph

18826 Commits

Author SHA1 Message Date
Martin Panter 46f50726a0 Issue #27076: Doc, comment and tests spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Serhiy Storchaka f60bf5f7d6 Issue #27097: Python interpreter is now about 7% faster due to optimized
instruction decoding.  Based on patch by Demur Rumed.
2016-05-25 20:02:01 +03:00
Steve Dower 80ac11d01e Issue #23026: winreg.QueryValueEx() now return an integer for REG_QWORD type. (Patch by hakril) 2016-05-24 15:42:04 -07:00
Serhiy Storchaka b0f80b0312 Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode.
Patch by Demur Rumed.
2016-05-24 09:15:14 +03:00
Paul Moore 835416cf7c Issue #27064: The py.exe launcher now defaults to Python 3.
The Windows launcher ``py.exe`` no longer prefers an installed
Python 2 version over Python 3 by default when used interactively.
2016-05-22 12:28:41 +01:00
Martin Panter 7f3d16f8f5 Extra NEWS formatting fix for 3.6 2016-05-22 03:10:11 +00:00
Martin Panter f4af15b3b3 Merge NEWS formatting from 3.5 2016-05-22 03:05:44 +00:00
Martin Panter 4e52558fb1 Fix minor inconsistencies with Issue #N references in NEWS and HISTORY 2016-05-22 03:01:52 +00:00
Serhiy Storchaka 2a95219bc4 Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
format unit.
2016-05-20 22:31:50 +03:00
Serhiy Storchaka 13e602ea0f Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
format unit.
2016-05-20 22:31:14 +03:00
Victor Stinner 6d81a2136d regrtest doesn't ignore -j1 anymore
* regrtest now uses subprocesses when the -j1 command line option
  is used: each test file runs in a fresh child process. Before, the -j1 option
  was ignored.
* Tools/buildbot/test.bat script now uses -j1 by default to run
  each test file in fresh child process.
2016-05-20 13:15:55 +02:00
Victor Stinner 5a48e21ff1 subprocess now emits a ResourceWarning warning
Issue #26741: subprocess.Popen destructor now emits a ResourceWarning warning
if the child process is still running.
2016-05-20 12:11:15 +02:00
Victor Stinner 19ed27ec2b Optimize pickle.load() and pickle.loads()
Issue #27056: Optimize pickle.load() and pickle.loads(), up to 10% faster to
deserialize a lot of small objects.
2016-05-20 11:42:37 +02:00
Guido van Rossum 03e6061956 Back out pathlib.Path.path attr. (Merge 3.5->3.6) 2016-05-19 13:11:17 -07:00
Guido van Rossum 387e6e3817 Back out pathlib.Path.path attr. (Merge 3.4->3.5) 2016-05-19 13:10:20 -07:00
Guido van Rossum 3d4d01f614 Back out 7e9605697dfc, 2e3c31ab586a, 759b2cecc289.
These added a path attribute to pathlib.Path objects, and docs.
Instead, we're going to use PEP 519.

(Starting in the 3.4 branch and merging forward from there since that's what I did originally.)
2016-05-19 13:00:21 -07:00
Steve Dower 7fa6378747 Issue #27053: Updates make_zip.py to correctly generate library ZIP file. 2016-05-19 10:47:55 -07:00
Steve Dower d8bf09c6cd Issue #27053: Updates make_zip.py to correctly generate library ZIP file. 2016-05-19 10:47:47 -07:00
Victor Stinner 4a3443be43 Merge 3.5 (issue #27057) 2016-05-19 16:48:06 +02:00
Victor Stinner 3116cc44af Fix os.set_inheritable() on Android
Issue #27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
SELinux and fails with EACCESS. The function now falls back to fcntl().

Patch written by Michał Bednarski.
2016-05-19 16:46:18 +02:00
Guido van Rossum c41c70fd9b Fix #27014 -- infinite recursion using typing.py. (Merge 3.5 -> 3.6.) 2016-05-18 08:36:16 -07:00
Guido van Rossum 1cea70f08c Fix #27014 -- infinite recursion using typing.py. 2016-05-18 08:35:00 -07:00
Martin Panter 9ef6b7fbde Issue #23275: Don’t think this made it into alpha 1 2016-05-18 07:19:32 +00:00
Berker Peksag 094c9c921c Issue #23275: Allow () = iterable assignment syntax
Documentation updates by Martin Panter.
2016-05-18 08:44:29 +03:00
Ned Deily 4284ffd2f8 Merge 3.6.0a1 updates 2016-05-17 17:09:48 -04:00
Ned Deily 786ed5537c Post-release cleanup: 3.6.0a1 -> 3.6.0a2 2016-05-17 16:55:41 -04:00
Benjamin Peterson 5b2b3aae2a merge 3.5 (#26991) 2016-05-16 22:53:44 -07:00
Benjamin Peterson ad887cf7d1 fix possible refleak in MAKE_FUNCTION (closes #26991)
Patch by Xiang Zhang.
2016-05-16 22:52:40 -07:00
Ned Deily cec00a7d87 Version bump for 3.6.0a1 2016-05-16 16:03:51 -04:00
Yury Selivanov 82d9a2e1fe Merge heads 2016-05-16 15:40:38 -04:00
Yury Selivanov 8ace2c66d3 Merge 3.5 (Issue #27041) 2016-05-16 15:39:39 -04:00
Yury Selivanov 7661db6228 Issue #27041: asyncio: Add loop.create_future method 2016-05-16 15:38:39 -04:00
Serhiy Storchaka 2e208b7d62 Issue #27031: Removed dummy methods in Tkinter widget classes: tk_menuBar()
and tk_bindForTraversal().
2016-05-16 22:35:46 +03:00
Yury Selivanov 7c3ac2d1f8 Merge 3.5 (issue #27040) 2016-05-16 15:32:26 -04:00
Serhiy Storchaka 4b23494ded Issue #27039: Fixed bytearray.remove() for values greater than 127.
Based on patch by Joe Jevnik.
2016-05-16 22:24:03 +03:00
Yury Selivanov 7ed7ce6ee7 Issue #27040: Add loop.get_exception_handler method 2016-05-16 15:20:38 -04:00
Serhiy Storchaka 7bf36dace8 Issue #27039: Fixed bytearray.remove() for values greater than 127.
Patch by Joe Jevnik.
2016-05-16 22:15:38 +03:00
Martin Panter 0b39a556e8 Issue #14132, Issue #17214: Merge two redirect handling fixes from 3.5 2016-05-16 07:45:28 +00:00
Serhiy Storchaka cbcc2fd641 Issue #27033: The default value of the decode_data parameter for
smtpd.SMTPChannel and smtpd.SMTPServer constructors is changed to False.
2016-05-16 09:36:31 +03:00
Serhiy Storchaka 98019e1cf6 Issue #27034: Removed deprecated class asynchat.fifo. 2016-05-16 09:10:43 +03:00
Robert Collins c85dd85f1a Issue #26807: mock_open 'files' no longer error on readline at end of file.
Patch from Yolanda Robla.
2016-05-16 15:22:45 +12:00
Robert Collins 9549a3e3d4 Issue #26807: mock_open 'files' no longer error on readline at end of file.
Patch from Yolanda Robla.
2016-05-16 15:22:01 +12:00
Martin Panter e6f060903c Issue #17214: Percent-encode non-ASCII bytes in redirect targets
Some servers send Location header fields with non-ASCII bytes, but "http.
client" requires the request target to be ASCII-encodable, otherwise a
UnicodeEncodeError is raised. Based on patch by Christian Heimes.

Python 2 does not suffer any problem because it allows non-ASCII bytes in the
HTTP request target.
2016-05-16 01:14:20 +00:00
Martin Panter ce6e06874b Issue #14132: Fix redirect handling when target is just a query string 2016-05-16 01:07:13 +00:00
Martin Panter f0dbf7a6ab Issue #26870: Add readline.set_auto_history(), originally by Tyler Crompton 2016-05-15 01:26:25 +00:00
Yury Selivanov 059320bab8 Merge 3.5 (issue #26848) 2016-05-13 15:39:09 -04:00
Yury Selivanov 7657f6ba21 Issue #26848: Fix asyncio/subprocess.communicate() to handle empty input. 2016-05-13 15:35:28 -04:00
Serhiy Storchaka 18ee29d0b8 Issue #26039: zipfile.ZipFile.open() can now be used to write data into a ZIP
file, as well as for extracting data.  Patch by Thomas Kluyver.
2016-05-13 13:52:49 +03:00
Senthil Kumaran 5d1110a952 merge from 3.5
Issue #26892: Honor debuglevel flag in urllib.request.HTTPHandler.

Patch contributed by Chi Hsuan Yen.
2016-05-13 01:35:29 -07:00
Senthil Kumaran 9642eedc0a Issue #26892: Honor debuglevel flag in urllib.request.HTTPHandler.
Patch contributed by Chi Hsuan Yen.
2016-05-13 01:32:42 -07:00
Martin Panter f94ec1bd83 Issue #22274: Merge stderr=STDOUT fix from 3.5 2016-05-13 07:45:21 +00:00
Martin Panter c76358924f Issue #22274: Redirect stderr=STDOUT when stdout not redirected, by Akira Li 2016-05-13 01:54:44 +00:00
Serhiy Storchaka ea36c941a1 Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses. 2016-05-12 10:37:58 +03:00
Serhiy Storchaka 9de7efe5ab Removed duplicated NEWS entity for issue #26881. 2016-05-11 22:25:05 +03:00
Steven D'Aprano 3414e4a34f NEWS message for issue #26977. 2016-05-11 12:41:19 +10:00
Eric Snow 228ab1ff6b Issue #21099: Switch applicable importlib tests to use PEP 451 API. 2016-05-10 16:21:03 -06:00
Serhiy Storchaka 1f364438ad Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses. 2016-05-12 10:39:32 +03:00
Serhiy Storchaka 25885d1dc5 Issue #27005: Optimized the float.fromhex() class method for exact float. 2016-05-12 10:21:14 +03:00
Serhiy Storchaka 871639a6d5 Merge 3.5. 2016-05-11 22:25:31 +03:00
Steven D'Aprano 441581a79f Update NEWS. 2016-05-11 13:01:42 +10:00
Steven D'Aprano 6494449a98 Merge NEWS update from 3.5 for issue #26977. 2016-05-11 12:46:40 +10:00
Eric Snow d65018b17c Fixes #19711: Add tests for reloading namespace packages. 2016-05-10 15:29:05 -06:00
Serhiy Storchaka 6a8af9ab36 Issue #25745: Fixed leaking a userptr in curses panel destructor. 2016-05-09 00:14:22 +03:00
Serhiy Storchaka df40b62390 Issue #25745: Fixed leaking a userptr in curses panel destructor. 2016-05-09 00:11:59 +03:00
Serhiy Storchaka 3e99fdeed5 Issue #26881: The modulefinder module now supports extended opcode arguments. 2016-05-08 23:44:54 +03:00
Serhiy Storchaka 02d9f5e5b2 Issue #26881: The modulefinder module now supports extended opcode arguments. 2016-05-08 23:43:50 +03:00
Serhiy Storchaka ce41287e99 Issue #18531: Single var-keyword argument of dict subtype was passed
unscathed to the C-defined function.  Now it is converted to exact dict.
2016-05-08 23:36:44 +03:00
Serhiy Storchaka dea76376cb Issue #23815: Fixed crashes related to directly created instances of types in
_tkinter and curses.panel modules.
2016-05-08 20:46:55 +03:00
Serhiy Storchaka e3f1b0911e Issue #23815: Fixed crashes related to directly created instances of types in
_tkinter and curses.panel modules.
2016-05-08 20:46:22 +03:00
Martin Panter 1ce738e08f Merge typo fixes from 3.5 2016-05-08 14:02:35 +00:00
Martin Panter f0564164ba Fix typos in comments, documentation and test method names 2016-05-08 13:48:10 +00:00
Serhiy Storchaka 17e22959a4 Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
Patch by Georg Brandl.
2016-05-07 15:43:59 +03:00
Serhiy Storchaka 21eb48764c Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
Patch by Georg Brandl.
2016-05-07 15:41:09 +03:00
Serhiy Storchaka 1acbf853c8 Issue #26736: Used HTTPS for external links in the documentation if possible. 2016-05-07 10:49:58 +03:00
Serhiy Storchaka 6dff0205b7 Issue #26736: Used HTTPS for external links in the documentation if possible. 2016-05-07 10:49:07 +03:00
Raymond Hettinger 584e8aedc3 Issue 26915: Add identity checks to the collections ABC __contains__ methods. 2016-05-05 11:14:06 +03:00
Serhiy Storchaka fcce462e9c Issue #26811: gc.get_objects() no longer contains a broken tuple with NULL
pointer.
2016-05-04 21:42:52 +03:00
Serhiy Storchaka 7822f151b6 Issue #26811: gc.get_objects() no longer contains a broken tuple with NULL
pointer.
2016-05-04 21:42:05 +03:00
Jason R. Coombs ad039f7548 Issue #20120: Merge with 3.5 2016-05-04 12:00:32 -04:00
Jason R. Coombs 422cf2b4ad Issue #20120: Use RawConfigParser for .pypirc parsing, removing support for interpolation unintentionally added with move to Python 3. Behavior no longer does any interpolation in .pypirc files, matching behavior in Python 2.7 and Setuptools 19.0. 2016-05-04 11:57:32 -04:00
Serhiy Storchaka 45cdcd93c9 Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
instead of silently return incorrect result.
2016-05-04 11:27:17 +03:00
Serhiy Storchaka 290fed43d9 Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
instead of silently return incorrect result.
2016-05-04 11:26:42 +03:00
Serhiy Storchaka c2f7d87897 Issue #26932: Fixed support of RTLD_* constants defined as enum values,
not via macros (in particular on Android).  Patch by Chi Hsuan Yen.
2016-05-04 09:44:44 +03:00
Serhiy Storchaka 47d1d7f48a Issue #26711: Fixed the comparison of plistlib.Data with other types. 2016-05-01 13:36:42 +03:00
Serhiy Storchaka dd1bcdf618 Issue #26711: Fixed the comparison of plistlib.Data with other types. 2016-05-01 13:36:16 +03:00
Meador Inge f1e2671fdf Issue #24114: Fix an uninitialized variable in `ctypes.util`.
The bug only occurs on SunOS when the ctypes implementation searches
for the `crle` program.  Patch by Xiang Zhang.  Tested on SunOS by
Kees Bos.
2016-04-30 22:17:22 -05:00
Meador Inge 8988ebf2a7 Issue #24114: Fix an uninitialized variable in `ctypes.util`.
The bug only occurs on SunOS when the ctypes implementation searches
for the `crle` program.  Patch by Xiang Zhang.  Tested on SunOS by
Kees Bos.
2016-04-30 21:56:59 -05:00
Martin Panter 51b697b7f3 Issue #26864: Merge no_proxy fixes from 3.5 2016-04-30 01:30:57 +00:00
Martin Panter aa27982ffc Issue #26864: Fix case insensitivity and suffix comparison with no_proxy
Patch by Xiang Zhang.
2016-04-30 01:03:40 +00:00
Berker Peksag 3a31cca4ab Issue #24902: Print server URL on http.server startup
Initial patch by Felix Kaiser.
2016-04-29 16:48:11 +03:00
Serhiy Storchaka b275210a3b Issue #25788: fileinput.hook_encoded() now supports an "errors" argument
for passing to open.  Original patch by Joseph Hackman.
2016-04-27 23:13:46 +03:00
Serhiy Storchaka cd9b5c2f40 Issue #26634: recursive_repr() now sets __qualname__ of wrapper.
Patch by Xiang Zhang.
2016-04-26 09:31:11 +03:00
Serhiy Storchaka b3b366d803 Issue #26634: recursive_repr() now sets __qualname__ of wrapper.
Patch by Xiang Zhang.
2016-04-26 09:30:44 +03:00
Senthil Kumaran 0996fa3bd8 merge 3.5
Issue #26804: urllib.request will prefer lower_case proxy environment variables
over UPPER_CASE or Mixed_Case ones.

Patch contributed by Hans-Peter Jansen. Reviewed by Martin Panter and Senthil Kumaran.
2016-04-25 08:18:07 -07:00
Senthil Kumaran a7c0ff2f0b Issue #26804: urllib.request will prefer lower_case proxy environment variables
over UPPER_CASE or Mixed_Case ones.

Patch contributed by Hans-Peter Jansen. Reviewed by Martin Panter and Senthil Kumaran.
2016-04-25 08:16:23 -07:00
Serhiy Storchaka 81e7f94076 Merge 3.5 2016-04-25 08:58:59 +03:00
Serhiy Storchaka 685fbed7f9 Issue #26837: assertSequenceEqual() now correctly outputs non-stringified
differing items (like bytes in the -b mode).  This affects assertListEqual()
and assertTupleEqual().
2016-04-25 08:58:25 +03:00
Berker Peksag e50d8465ab Issue #26041: Remove "will be removed in Python 3.7" from description messages
We will keep platform.dist() and platform.linux_distribution() to make porting
from Python 2 easier.

Patch by Kumaripaba Miyurusara Athukorala.
2016-04-24 03:32:50 +03:00
Berker Peksag 8d8221f0d6 Issue #26041: Remove "will be removed in Python 3.7" from description messages
We will keep platform.dist() and platform.linux_distribution() to make porting
from Python 2 easier.

Patch by Kumaripaba Miyurusara Athukorala.
2016-04-24 03:32:24 +03:00
Serhiy Storchaka 745145a7da Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
silently ignore keyword arguments.
2016-04-23 10:53:43 +03:00
Serhiy Storchaka c2a2a751cf Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
silently ignore keyword arguments.
2016-04-23 10:51:39 +03:00
Serhiy Storchaka 8b9eefc363 Issue #26733: Disassembling a class now disassembles class and static methods.
Patch by Xiang Zhang.
2016-04-23 09:24:29 +03:00
Serhiy Storchaka 585c93daea Issue #26733: Disassembling a class now disassembles class and static methods.
Patch by Xiang Zhang.
2016-04-23 09:23:52 +03:00
Martin Panter da28494d0a Issue #22359: Merge cross-compilation fix from 3.5 2016-04-23 01:18:54 +00:00
Martin Panter 1046d5c653 Issue #22359: Disable running cross-compiled _freeze_importlib and pgen
Patch by Xavier de Gaye.
2016-04-23 00:58:44 +00:00
Victor Stinner f5c4b99034 PyMem_Malloc() now uses the fast pymalloc allocator
Issue #26249: PyMem_Malloc() allocator family now uses the pymalloc allocator
rather than system malloc(). Applications calling PyMem_Malloc() without
holding the GIL can now crash: use PYTHONMALLOC=debug environment variable to
validate the usage of memory allocators in your application.
2016-04-22 16:26:23 +02:00
Victor Stinner b4faa8ef93 Merge 3.5 2016-04-20 18:23:59 +02:00
Victor Stinner d7a71224d8 Issue #26799: Fix typo in Misc/NEWS 2016-04-20 18:23:49 +02:00
Victor Stinner c88390f02d Merge 3.5: Issue #26799 2016-04-20 18:12:38 +02:00
Victor Stinner 4e75ca87e3 python-gdb.py: get C types at runtime
Issue #26799: Fix python-gdb.py: don't get once C types when the Python code
is loaded, but get C types on demande. The C types can change if
python-gdb.py is loaded before the Python executable.

Patch written by Thomas Ilsche.
2016-04-20 18:07:21 +02:00
Victor Stinner a2bf3060d0 Issue #21668: Add also Chi Hsuan Yen to Misc/ACKS 2016-04-20 10:02:04 +02:00
Victor Stinner 61f68dbd17 Issue #21668: Fix author of the patch.
Sorry, it was hard to retrieve the original author of the patch in this issue
with a long history and many authors.
2016-04-20 09:58:12 +02:00
Martin Panter abe4d52a1a Merge doc and comment fixes from 3.5 2016-04-19 23:23:16 +00:00
Victor Stinner 0b2e98d53d Optimize func(*tuple) function call
Issue #26802: Optimize function calls only using unpacking like "func(*tuple)"
(no other positional argument, no keyword): avoid copying the tuple.

Patch written by Joe Jevnik.
2016-04-19 22:54:37 +02:00
Victor Stinner 5bfe0da808 Merge 3.5: issue #26801 2016-04-19 22:29:11 +02:00
Victor Stinner 119ebb70e9 Fix shutil.get_terminal_size() error handling
Issue #26801: Fix error handling in shutil.get_terminal_size(), catch
AttributeError instead of NameError. Patch written by Emanuel Barry.

test_shutil: skip the functional test using "stty size" command if
os.get_terminal_size() is missing.
2016-04-19 22:24:56 +02:00
Victor Stinner 1fa5a38e92 Merge 3.5: Issue #21668 2016-04-19 15:58:33 +02:00
Victor Stinner def8072c34 setup.py: add missing libm dependency
Issue #21668: Link audioop, _datetime, _ctypes_test modules to libm, except on
Mac OS X. Patch written by Xavier de Gaye.
2016-04-19 15:58:11 +02:00
Lars Gustäbel 7c3e6848f2 Issue #24838: Merge tarfile fix from 3.5. 2016-04-19 08:53:14 +02:00
Lars Gustäbel 0f450abec4 Issue #24838: tarfile's ustar and gnu formats now correctly calculate name and
link field limits for multibyte character encodings like utf-8.
2016-04-19 08:43:17 +02:00
Martin Panter 8f26565ba9 Fix spelling (inital), grammar (may translates) in documentation, comments 2016-04-19 04:03:41 +00:00
Martin Panter 791ac54a44 Issue #26657: Merge http.server fix from 3.5 2016-04-18 07:16:17 +00:00
Martin Panter d274b3f1f1 Issue #26657: Fix Windows directory traversal vulnerability with http.server
Based on patch by Philipp Hagemeister.  This fixes a regression caused by
revision f4377699fd47.
2016-04-18 03:45:18 +00:00
Serhiy Storchaka b6a9c9761c Issue #26778: Fixed "a/an/and" typos in code comment, documentation and error
messages.
2016-04-17 09:39:28 +03:00
Serhiy Storchaka 6a7b3a77b4 Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
Martin Panter d77133b4ce Issue #26717: Merge wsgiref fix from 3.5 2016-04-17 02:36:50 +00:00
Martin Panter 50dd1f7dd6 Issue #26717: Stop encoding Latin-1-ized WSGI paths with UTF-8
Patch by Anthony Sottile.
2016-04-17 02:17:03 +00:00
Martin Panter 528619b6c3 Issue #26782: Add STARTUPINFO to subprocess.__all__ on Windows 2016-04-16 23:42:37 +00:00
Benjamin Peterson 259d247b31 merge 3.5 (#26659) 2016-04-16 14:54:27 -07:00
Benjamin Peterson 2b601d3905 add gc support to slice (closes #26659) 2016-04-16 14:47:12 -07:00
Gregory P. Smith 79a12a2aa5 Issue #25702: A --with-lto configure option has been added that will
enable link time optimizations at build time during a make profile-opt.
2016-04-15 16:58:51 -07:00
Gregory P. Smith d82da9f7f2 Issue #25702: A --with-lto configure option has been added that will
enable link time optimizations at build time during a make profile-opt.
2016-04-15 16:57:04 -07:00
Martin Panter cda80940ed Issue #15984: Merge PyUnicode doc from 3.5 2016-04-15 02:27:11 +00:00
Martin Panter 6245cb3c01 Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
This affects documentation, code comments, and a debugging messages.
2016-04-15 02:14:19 +00:00
Serhiy Storchaka 131b8f8eee Issue #26718: super.__init__ no longer leaks memory if called multiple times.
NOTE: A direct call of super.__init__ is not endorsed!
2016-04-13 15:28:53 +03:00
Serhiy Storchaka 3d7497608b Issue #26718: super.__init__ no longer leaks memory if called multiple times.
NOTE: A direct call of super.__init__ is not endorsed!
2016-04-13 15:27:33 +03:00
Steve Dower a4d41b3a3e Closes #26624: Adds validation of ucrtbase[d].dll version with warning for old versions. 2016-04-12 20:11:45 -07:00
Steve Dower a7a222fde7 Closes #26624: Adds validation of ucrtbase[d].dll version with warning for old versions. 2016-04-12 20:11:25 -07:00
Martin Panter 0cab9c1eba Issue #26404: Add context manager to socketserver, by Aviv Palivoda 2016-04-13 00:36:52 +00:00
Victor Stinner 7258176c68 Merge 3.5 (os.urandom) 2016-04-12 22:38:22 +02:00
Victor Stinner 9d24271d86 Fix os.urandom() on Solaris 11.3
Issue #26735: Fix os.urandom() on Solaris 11.3 and newer when reading more than
1,024 bytes: call getrandom() multiple times with a limit of 1024 bytes per
call.
2016-04-12 22:28:49 +02:00
Martin Panter da3bb38452 Issue #26585: Eliminate _quote_html() and use html.escape(quote=False)
Patch by Xiang Zhang.
2016-04-11 00:40:08 +00:00
Martin Panter 50ab1a3694 Issue #26685: Raise OSError if closing a socket fails 2016-04-11 00:38:12 +00:00
Serhiy Storchaka 403002723f Issue #25339: PYTHONIOENCODING now has priority over locale in setting the
error handler for stdin and stdout.
2016-04-10 14:35:21 +03:00
Serhiy Storchaka fc43511867 Issue #25339: PYTHONIOENCODING now has priority over locale in setting the
error handler for stdin and stdout.
2016-04-10 14:34:13 +03:00
Berker Peksag 734423b87b Issue #16329: Add .webm to mimetypes.types_map
Patch by Giampaolo Rodola'.
2016-04-09 08:00:53 +03:00
Berker Peksag d7fdc86153 Issue #16329: Add .webm to mimetypes.types_map
Patch by Giampaolo Rodola'.
2016-04-09 08:00:20 +03:00
Berker Peksag ba22cf8bdc Issue #13952: Add .csv to mimetypes.types_map
Patch by Geoff Wilson.
2016-04-09 07:53:00 +03:00
Berker Peksag a2d7cf087f Issue #13952: Add .csv to mimetypes.types_map
Patch by Geoff Wilson.
2016-04-09 07:52:05 +03:00
Brett Cannon 5f0507d8ab Issue #26587: Allow .pth files to specify file paths as well as
directories.

Thanks to Wolfgang Langner for the bug report and initial version of
the patch.
2016-04-08 15:04:28 -07:00
Brett Cannon 9e080e0e74 Issue #25609: Introduce contextlib.AbstractContextManager and
typing.ContextManager.
2016-04-08 12:15:27 -07:00
Serhiy Storchaka c5b5ba9bda Issue #26709: Fixed Y2038 problem in loading binary PLists. 2016-04-08 15:00:33 +03:00
Serhiy Storchaka 94ad49fabc Issue #26709: Fixed Y2038 problem in loading binary PLists. 2016-04-08 15:00:02 +03:00
Martin Panter b15c304984 Issue #6953: Merge readline doc from 3.5 2016-04-05 10:17:38 +00:00
Martin Panter 0f7673943a Issue #6953: Rearrange and expand Readline module documentation
* Group functions into six new subsections
* Document the underlying Readline function or variable accessed
* get_history_length() returns the history file limit
* clear_history() is conditionally compiled in
* Clarify zero and one bases for history item indexes
* parse_and_bind() uses its argument directly as an init line
* Change "command line" to "line buffer" for consistency
* read_init_file() also executes the file
* read_history_file() replaces the previous history
* write_history_file() overwrites any existing file
* Differentiate history file lines from history list items, which could be
  multi-line
* Add more information about completion, also addressing Issue #10796
* libedit (Editline) may be used on any platform; detection is OS X specific
2016-04-05 07:37:22 +00:00
Martin Panter c86c91aab0 Merge typo fixes from 3.5 2016-04-05 06:20:32 +00:00
Martin Panter cc71a795df Fix typos in documentation and comments 2016-04-05 06:19:42 +00:00
Martin Panter a3506005b3 Issue #23735: Merge Readline resize handling from 3.5 2016-04-03 03:19:27 +00:00
Martin Panter 5dbbf1abba Issue #23735: Add SIGWINCH handler for Readline 6.3+ support, by Eric Price 2016-04-03 02:54:58 +00:00
Martin Panter 519f91215b Issue #25951: Fix SSLSocket.sendall() to return None, by Aviv Palivoda 2016-04-03 02:12:54 +00:00
Martin Panter b93e4b2480 Issue #26586: Merge excessive HTTP header handling from 3.5 2016-04-03 01:28:49 +00:00
Martin Panter acc03195b0 Issue #26586: Handle excessive header fields in http.server, by Xiang Zhang 2016-04-03 00:45:46 +00:00
Martin Panter dcfebb32e2 Issue #26676: Add missing XMLPullParser to ElementTree.__all__ 2016-04-01 06:55:55 +00:00
Martin Panter 047f3b7376 Issue #22854: Merge UnsupportedOperation fixes from 3.5 2016-03-31 08:25:59 +00:00
Martin Panter 754aab28ed Issue #22854: Clarify documentation about UnsupportedOperation and add tests
Also change BufferedReader.writable() and BufferedWriter.readable() to always
return False.
2016-03-31 07:21:56 +00:00
Serhiy Storchaka ab0d198c7a Issue #26492: Exhausted iterator of array.array now conforms with the behavior
of iterators of other mutable sequences: it lefts exhausted even if iterated
array is extended.
2016-03-30 21:11:16 +03:00
Serhiy Storchaka ab479c49d3 Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
2016-03-30 20:41:15 +03:00
Serhiy Storchaka fbb1c5ee06 Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
2016-03-30 20:40:02 +03:00
Victor Stinner 9759dd3343 Issue #26295: When using "python3 -m test --testdir=TESTDIR", regrtest doesn't
add "test." prefix to test module names.

regrtest also prepends testdir to sys.path.
2016-03-30 02:32:52 +02:00
Victor Stinner b1511f789e doctest now supports packages
Issue #26641: doctest.DocFileTest and doctest.testfile() now support packages
(module splitted into multiple directories) for the package parameter.
2016-03-30 01:29:05 +02:00
Martin Panter ef4bb1e994 Issue #23804: Merge SSL zero read fix from 3.5 2016-03-28 01:09:13 +00:00
Martin Panter f6b1d66a3c Issue #23804: Fix SSL recv/read(0) to not return 1024 bytes 2016-03-28 00:22:09 +00:00
Berker Peksag 5a6c018b57 Issue #25195: Fix a regression in mock.MagicMock
_Call is a subclass of tuple (changeset 3603bae63c13 only works
for classes) so we need to implement __ne__ ourselves.

Patch by Andrew Plummer.
2016-03-28 00:30:40 +03:00
Berker Peksag ce913877e4 Issue #25195: Fix a regression in mock.MagicMock
_Call is a subclass of tuple (changeset 3603bae63c13 only works
for classes) so we need to implement __ne__ ourselves.

Patch by Andrew Plummer.
2016-03-28 00:30:02 +03:00
Martin Panter afd465d497 Issue #26644: Merge SSL negative read fix from 3.5 2016-03-27 10:40:22 +00:00
Martin Panter 5503d4731e Issue #26644: Raise ValueError for negative SSLSocket.recv() and read() 2016-03-27 05:35:19 +00:00
Martin Panter 3840b2ac67 Issue #25940: Use internal local server more in test_ssl
Move many tests from NetworkedTests and NetworkedBIOTests to a new Simple-
BackgroundTests class, using the existing ThreadedEchoServer and SIGNED_
CERTFILE infrastructure.

For tests that cause the server to crash by rejecting its certificate,
separate them into independent test methods.

Added custom root certificate to capath with the following commands:

cp Lib/test/{pycacert.pem,capath/}
# Edit copy to remove part before certificate
c_rehash -v Lib/test/capath/
c_rehash -v -old Lib/test/capath/
# Note the generated file names
cp Lib/test/capath/{pycacert.pem,b1930218.0}
mv Lib/test/capath/{pycacert.pem,ceff1710.0}

Change to pure PEM version of SIGNING_CA because PEM_cert_to_DER_cert() does
not like the extra text at the start.

Moved test_connect_ex_error() into BasicSocketTests and rewrote it to connect
to a reserved localhost port.

NetworkedTests.test_get_server_certificate_ipv6() split out because it needs
to connect to an IPv6 DNS address.

The only reference left to self-signed.pythontest.net is test_timeout_
connect_ex(), which needs a remote server to reliably time out the
connection, but does not rely on the server running SSL.

Made ThreadedEchoServer call unwrap() by default when it sees the client has
shut the connection down, so that the client can cleanly call unwrap().
2016-03-27 01:53:46 +00:00
Alexander Belopolsky 16b698b095 merge 2016-03-25 15:46:55 -04:00
Alexander Belopolsky 1dcf4f9ee5 Issue#26616:Fixed a bug in datetime.astimezone() method. 2016-03-25 15:42:59 -04:00
Zachary Ware 4a2e663f99 Fix a few typos 2016-03-24 22:45:00 -05:00
Victor Stinner 4f17426437 Fix bug in __import__ during Python shutdown
Issue #26637: The importlib module now emits an ImportError rather than a
TypeError if __import__() is tried during the Python shutdown process but
sys.path is already cleared (set to None).
2016-03-25 00:40:59 +01:00
Victor Stinner e091d32a7a Merge 3.5
Issue #21925: warnings.formatwarning() now catches exceptions when calling
linecache.getline() and tracemalloc.get_object_traceback() to be able to log
ResourceWarning emitted late during the Python shutdown process.
2016-03-25 00:33:12 +01:00
Victor Stinner 27461683a9 warnings.formatwarning(): catch exceptions
Issue #21925: warnings.formatwarning() now catches exceptions on
linecache.getline(...) to be able to log ResourceWarning emitted late during
the Python shutdown process.
2016-03-25 00:30:32 +01:00
Victor Stinner 404cdc5a92 faulthandler: add Windows exception handler
Issue #23848: On Windows, faulthandler.enable() now also installs an exception
handler to dump the traceback of all Python threads on any Windows exception,
not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT).
2016-03-23 10:39:17 +01:00
Victor Stinner 10b73e1748 Add C functions _PyTraceMalloc_Track()
Issue #26530:

* Add C functions _PyTraceMalloc_Track() and _PyTraceMalloc_Untrack() to track
  memory blocks using the tracemalloc module.
* Add _PyTraceMalloc_GetTraceback() to get the traceback of an object.
2016-03-22 13:39:05 +01:00
Victor Stinner e492ae50e2 tracemalloc now supports domains
Issue #26588:

* The _tracemalloc now supports tracing memory allocations of multiple address
  spaces (domains).
* Add domain parameter to tracemalloc_add_trace() and
  tracemalloc_remove_trace().
* tracemalloc_add_trace() now starts by removing the previous trace, if any.
* _tracemalloc._get_traces() now returns a list of (domain, size,
  traceback_frames): the domain is new.
* Add tracemalloc.DomainFilter
* tracemalloc.Filter: add an optional domain parameter to the constructor and a
  domain attribute
* Sublte change: use Py_uintptr_t rather than void* in the traces key.
* Add tracemalloc_config.use_domain, currently hardcoded to 1
2016-03-22 12:58:23 +01:00
Martin Panter 0b2d71bc70 Issue #24266: Merge readline Ctrl+C handling from 3.5 2016-03-22 09:28:58 +00:00
Martin Panter d6990d221b Issue #24266: Cancel history search mode with Ctrl+C in Readline 7 2016-03-22 07:24:05 +00:00
Benjamin Peterson 2efdc8c7c1 merge 3.5 (#17167) 2016-03-21 22:31:31 -07:00
Benjamin Peterson e46487b133 merge 3.4 (#17167) 2016-03-21 22:31:24 -07:00
Benjamin Peterson b9869dfe35 remove useless $ keyword (closes #17167) 2016-03-21 22:31:02 -07:00
Serhiy Storchaka e431d3c9aa Issue #26581: Use the first coding cookie on a line, not the last one. 2016-03-20 23:36:29 +02:00
Victor Stinner 19a8e844e4 Add socket finalizer
Issue #26590: Implement a safe finalizer for the _socket.socket type. It now
releases the GIL to close the socket. Use PyErr_ResourceWarning() to raise the
ResourceWarning to pass the socket object to the warning logger, to get the
traceback where the socket was created (allocated).
2016-03-21 16:36:48 +01:00
Victor Stinner fac395681f Optimize bytes.replace(b'', b'.')
Issue #26574: Optimize bytes.replace(b'', b'.') and
bytearray.replace(b'', b'.'): up to 80% faster. Patch written by Josh Snider.
2016-03-21 10:38:58 +01:00
Berker Peksag 1cd4ff6284 Issue #26560: Avoid potential ValueError in BaseHandler.start_response
Initial patch by Peter Inglesby.
2016-03-19 09:04:59 +02:00
Serhiy Storchaka a051bf3afb Issue #26581: Use the first coding cookie on a line, not the last one. 2016-03-20 23:47:48 +02:00
Berker Peksag 3c3d7f4b99 Issue #18787: spwd.getspnam() now raises a PermissionError if the user
doesn't have privileges.
2016-03-19 11:44:17 +02:00
Berker Peksag cf934a1c9b Issue #26560: Avoid potential ValueError in BaseHandler.start_response
Initial patch by Peter Inglesby.
2016-03-19 09:05:59 +02:00
Victor Stinner 914cde89d4 On ResourceWarning, log traceback where the object was allocated
Issue #26567:

* Add a new function PyErr_ResourceWarning() function to pass the destroyed
  object
* Add a source attribute to warnings.WarningMessage
* Add warnings._showwarnmsg() which uses tracemalloc to get the traceback where
  source object was allocated.
2016-03-19 01:03:51 +01:00
Ezio Melotti 6840632ef2 #26250: merge with 3.5. 2016-03-18 20:11:30 +02:00
Ezio Melotti 62564dbb4b #26250: document the sqlite3.Cursor.connection attribute. Initial patches by Aviv Palivoda and Varpu Rantala. 2016-03-18 20:10:36 +02:00
Brett Cannon 32cba67b9f Merge for issue #26271 2016-03-18 10:30:21 -07:00
Brett Cannon e4044bfe63 Issue #26271: Fix the Freeze tool to use variables passed in from the
configure script related to compiler flags.

Thanks to Daniel Shaulov for the bug report and patch.
2016-03-18 10:29:43 -07:00
Steve Dower 3ca3342307 Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store is empty. Patch by Baji. 2016-03-17 15:02:53 -07:00
Steve Dower 8dd7aebc23 Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store is empty. Patch by Baji. 2016-03-17 15:02:39 -07:00
Ned Deily c9188000d7 Issue #26583: merge from 3.5 2016-03-17 17:56:42 -04:00
Ned Deily 1c80b152bd Issue #26583: Skip test_timestamp_overflow in test_import if bytecode
files cannot be written.
2016-03-17 17:53:52 -04:00
Victor Stinner ec748c47ac Merge 3.5 2016-03-17 09:11:54 +01:00
Martin Panter 499d3654a8 Issue #17603: Merge configure.ac fix from 3.5 2016-03-18 03:03:10 +00:00
Martin Panter d887d1f365 Issue #17603: Check for st_blocks field without requiring fileblocks.o 2016-03-18 02:36:41 +00:00
Victor Stinner 5c13aa1562 Fix pyclbr to support importing packages
Issue #26569: Fix pyclbr.readmodule() and pyclbr.readmodule_ex() to support
importing packages.
2016-03-17 09:06:41 +01:00
Martin Panter ce911c3fed Issue #26499: Fixes to HTTPResponse.readline() and read1(), by Silent Ghost 2016-03-17 06:42:48 +00:00
Victor Stinner ad524375af Fail if PyMem_Malloc() is called without holding the GIL
Issue #26563: Debug hooks on Python memory allocators now raise a fatal error
if functions of the PyMem_Malloc() family are called without holding the GIL.
2016-03-16 12:12:53 +01:00
Martin Panter 32f2eb4941 Issue #21042: Revert Linux find_library() to return just filename
This reverts most of revision 3092cf163eb4. The change worked on x86
architectures, but did not work on ARM, probably due to extra ABI flags in
the ldconfig output.
2016-03-17 07:50:22 +00:00
Martin Panter ec195fba5b Issue #26499: Merge HTTPResponse fix from 3.5 2016-03-17 07:05:34 +00:00
Victor Stinner 0611c26a58 On memory error, dump the memory block traceback
Issue #26564: _PyObject_DebugDumpAddress() now dumps the traceback where a
memory block was allocated on memory block. Use the tracemalloc module to get
the traceback.
2016-03-15 22:22:13 +01:00
Antoine Pitrou 58f2bd86fb Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) was untested. 2016-03-15 10:52:51 +01:00
Antoine Pitrou 62b6a0d70c Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) was untested. 2016-03-15 10:48:28 +01:00
Robert Collins bfef0be420 #25320: Handle sockets in directories unittest discovery is scanning.
Patch from Victor van den Elzen.
2016-03-15 13:33:28 +13:00
Robert Collins ecd5383891 #25320: Handle sockets in directories unittest discovery is scanning.
Patch from Victor van den Elzen.
2016-03-15 13:29:17 +13:00
Victor Stinner c4aec3628b Check the GIL in PyObject_Malloc()
Issue #26558: The debug hook of PyObject_Malloc() now checks that the GIL is
held when the function is called.
2016-03-14 22:26:53 +01:00
Victor Stinner 34be807ca4 Add PYTHONMALLOC env var
Issue #26516:

* Add PYTHONMALLOC environment variable to set the Python memory
  allocators and/or install debug hooks.
* PyMem_SetupDebugHooks() can now also be used on Python compiled in release
  mode.
* The PYTHONMALLOCSTATS environment variable can now also be used on Python
  compiled in release mode. It now has no effect if set to an empty string.
* In debug mode, debug hooks are now also installed on Python memory allocators
  when Python is configured without pymalloc.
2016-03-14 12:04:26 +01:00
Berker Peksag 0647ef05eb Issue #16181: cookiejar.http2time() now returns None if year is higher than datetime.MAXYEAR 2016-03-14 05:48:28 +02:00
Berker Peksag 20be53e5b5 Issue #16181: cookiejar.http2time() now returns None if year is higher than datetime.MAXYEAR 2016-03-14 05:48:02 +02:00
Ezio Melotti 4c9375b65f #24918: merge with 3.5. 2016-03-13 11:41:45 +02:00
Ezio Melotti f2b9a39813 #24918: fix CSS for code blocks when a side box is present. Patch by Manvi B. 2016-03-13 11:41:05 +02:00
Ezio Melotti 0ce835fc7e #25687: merge with 3.5. 2016-03-13 09:40:55 +02:00
Ezio Melotti 8dea74f12a #25687: clarify that errors in tearDown increase the total number of reported errors. Initial patch by HyeSoo Park. 2016-03-13 09:40:09 +02:00
Steve Dower 8d9bcb5d62 Issue #26079: Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern Thiel. 2016-03-12 08:39:07 -08:00
Steve Dower d3722e7b6f Issue #26079: Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern Thiel. 2016-03-12 08:38:55 -08:00
Steve Dower 6d6b986d90 Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt. 2016-03-12 08:26:29 -08:00
Steve Dower d669b6bd0a Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt. 2016-03-12 08:25:22 -08:00
Steve Dower 11b3918164 Issue #26513: Fixes platform module detection of Windows Server 2016-03-12 08:07:34 -08:00
Steve Dower 126c9c17ef Issue #26513: Fixes platform module detection of Windows Server 2016-03-12 08:06:23 -08:00
Serhiy Storchaka 6e4150f36b Issue #23718: Fixed parsing time in week 0 before Jan 1. Original patch by
Tamás Bence Gedai.
2016-03-12 10:53:09 +02:00
Serhiy Storchaka 8a7240eeed Issue #23718: Fixed parsing time in week 0 before Jan 1. Original patch by
Tamás Bence Gedai.
2016-03-12 10:51:16 +02:00
Victor Stinner 2c2a4e63d7 Add Mock.assert_called()
Issue #26323: Add assert_called() and assert_called_once() methods to
unittest.mock.Mock.
2016-03-11 22:17:48 +01:00
Berker Peksag d0e9b6919f Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise
NotImplementedError instead of ImportError.
2016-03-11 23:08:11 +02:00
Berker Peksag 04d4229719 Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise
NotImplementedError instead of ImportError.
2016-03-11 23:07:27 +02:00
Serhiy Storchaka 2d68f18656 Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets. 2016-03-09 10:52:08 +02:00
Martin Panter b9f3114d42 Issue #21042: Return full path in ctypes.util.find_library() on Linux
Patch by Tamás Bence Gedai.
2016-03-10 01:06:23 +00:00
Serhiy Storchaka 42a4366ad5 Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
Added few missed tests for configure options.
2016-03-09 10:33:51 +02:00
Steve Dower 43cbd05b6c Issue #26465: Update Windows builds to use OpenSSL 1.0.2g. 2016-03-08 10:29:24 -08:00
Steve Dower 947f411b0d Issue #26465: Update Windows builds to use OpenSSL 1.0.2g. 2016-03-08 10:26:52 -08:00
Serhiy Storchaka 674e2d0ea0 Issue #15068: Got rid of excessive buffering in fileinput.
The bufsize parameter is now deprecated and ignored.
2016-03-08 18:35:19 +02:00
Serhiy Storchaka cc2dbc5844 Issue #15068: Got rid of excessive buffering in the fileinput module.
The bufsize parameter is no longer used.
2016-03-08 18:28:36 +02:00
Ned Deily 3a5e1afb92 Issue #26465: merge from 3.5 2016-03-08 01:11:14 -05:00
Ned Deily f4d97ce100 Issue #26465: Update OS X installer build to use OpenSSL 1.0.2g. 2016-03-08 01:09:08 -05:00
Ned Deily 686905fe13 Issue #24324: merge from 3.5 2016-03-08 00:40:12 -05:00
Ned Deily bec699e40d Issue #24324: Do not enable unreachable code warnings when using
gcc as the option does not work correctly in older versions of gcc
and has been silently removed as of gcc-4.5.
2016-03-08 00:28:37 -05:00
Ned Deily 8cd8883d27 Issue #26505: merge from 3.5 2016-03-07 14:52:46 -05:00
Ned Deily adbf8cecbe Issue #26505: Fix typos in getaddrinfo license text.
Patch by Alex Willmer.
2016-03-07 14:51:59 -05:00
Alexander Belopolsky a2998a63c8 Closes #19475: Added timespec to the datetime.isoformat() method.
Added an optional argument timespec to the datetime isoformat() method
to choose the precision of the time component.

Original patch by Alessandro Cucci.
2016-03-06 14:58:43 -05:00
Berker Peksag d07a1cb53b Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py
Patch by Guo Ci Teo.
2016-03-06 16:50:44 +02:00
Berker Peksag d66dd5ce68 Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py
Patch by Guo Ci Teo.
2016-03-06 16:50:15 +02:00
Berker Peksag 48238c7e37 Issue #2202: Fix UnboundLocalError in AbstractDigestAuthHandler.get_algorithm_impls
Raise ValueError if algorithm is not MD5 or SHA.

Initial patch by Mathieu Dupuy.
2016-03-06 16:17:47 +02:00
Berker Peksag e88dd1c32c Issue #2202: Fix UnboundLocalError in AbstractDigestAuthHandler.get_algorithm_impls
Raise ValueError if algorithm is not MD5 or SHA.

Initial patch by Mathieu Dupuy.
2016-03-06 16:16:40 +02:00
Serhiy Storchaka 818e18dd94 Issue #26167: Minimized overhead in copy.copy() and copy.deepcopy().
Optimized copying and deepcopying bytearrays, NotImplemented, slices,
short lists, tuples, dicts, sets.
2016-03-06 14:56:57 +02:00
Serhiy Storchaka de128e19e2 Issue #26015: Added new tests for pickling iterators of mutable sequences. 2016-03-06 14:12:04 +02:00
Serhiy Storchaka aabafe7bc2 Issue #26015: Added new tests for pickling iterators of mutable sequences. 2016-03-06 14:10:24 +02:00
Serhiy Storchaka 5608411a96 Issue #25718: Fixed pickling and copying the accumulate() iterator with total is None. 2016-03-06 14:02:26 +02:00
Serhiy Storchaka d55162517d Issue #25718: Fixed pickling and copying the accumulate() iterator with total is None. 2016-03-06 14:00:45 +02:00
Serhiy Storchaka b6bfce6c0b Issue #26475: Fixed debugging output for regular expressions with the (?x) flag. 2016-03-06 09:17:39 +02:00
Serhiy Storchaka a01a144aab Issue #26475: Fixed debugging output for regular expressions with the (?x) flag. 2016-03-06 09:15:47 +02:00
Serhiy Storchaka a0d416f0d1 Issue #26482: Allowed pickling recursive dequeues. 2016-03-06 08:55:21 +02:00
Benjamin Peterson 0f04bc7959 merge 3.5 (closes #26478) 2016-03-03 22:10:52 -08:00
Benjamin Peterson cfc2a1fc70 merge 3.4 (closes #26478) 2016-03-03 22:08:01 -08:00
Benjamin Peterson f11b25b081 properly use the ObjArgs variant of CallMethod in dictview binary operations (closes #26478) 2016-03-03 22:05:36 -08:00
Berker Peksag 6282e656e9 Issue #26335: Make mmap.write() return the number of bytes written like
other write methods.

Patch by Jakub Stasiak.
2016-03-02 19:30:18 +02:00
Victor Stinner 3d9d77a3dc Merge 3.5 2016-03-01 21:30:50 +01:00
Victor Stinner 6c9aa8f2bf Fix str.translate()
Issue #26464: Fix str.translate() when string is ASCII and first replacements
removes character, but next replacement uses a non-ASCII character or a string
longer than 1 character. Regression introduced in Python 3.5.0.
2016-03-01 21:30:30 +01:00
Serhiy Storchaka 42e49ac0da Issue #26457: Fixed the subnets() methods in IP network classes for the case
when resulting prefix length is equal to maximal prefix length.
Based on patch by Xiang Zhang.
2016-03-01 10:26:10 +02:00
Serhiy Storchaka bb0dbd583b Issue #26457: Fixed the subnets() methods in IP network classes for the case
when resulting prefix length is equal to maximal prefix length.
Based on patch by Xiang Zhang.
2016-03-01 10:25:45 +02:00
Martin Panter 93088d1b03 Issue #26385: Merge NamedTemporaryFile fix from 3.5 2016-02-29 11:25:09 +00:00
Martin Panter 7869a22779 Issue #26385: Cleanup NamedTemporaryFile if open() fails, by SilentGhost 2016-02-28 05:22:20 +00:00
Martin Panter 8cacc63002 Issue #22836: Merge exception reporting from 3.5 2016-02-28 03:29:51 +00:00
Martin Panter 3263f6874a Issue #22836: Keep exception reports sensible despite errors 2016-02-28 03:16:11 +00:00
Ezio Melotti b8d75035f2 #26246: merge with 3.5. 2016-02-27 08:42:14 +02:00
Ezio Melotti 738f88f688 #26246: merge with 3.4. 2016-02-27 08:41:16 +02:00
Ezio Melotti 90ba2ca68a #26246: update copybutton.js after JQuery update. Patch by Liang-Bo Wang. 2016-02-27 08:39:36 +02:00
Georg Brandl 3902d62c4e merge with 3.5 2016-02-26 19:37:52 +01:00
Georg Brandl 5d94134040 Closes #25910: fix dead and permanently redirected links in the docs. Thanks to SilentGhost for the patch. 2016-02-26 19:37:12 +01:00
Martin Panter 6e132254a9 Issue #26402: Merge XML-RPC client fix from 3.5 2016-02-25 12:13:50 +00:00
Martin Panter eae3336e42 Issue #26402: Fix XML-RPC client retrying after server disconnection
This is a regression introduced in 3.5 by revision eba80326ba53. Fix by Jelte
Fennema, test case by me.
2016-02-25 11:53:40 +00:00
Ned Deily b8da1a4fee Issue #25136: merge from 3.5 2016-02-25 00:59:16 +11:00
Ned Deily 020250f91f Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
As of Xcode 7, SDKs for Apple platforms now include textual-format stub
libraries whose file names have a .tbd extension rather than the
standard OS X .dylib extension.  The Apple compiler tool chain handles
these stub libraries transparently and the installed system shared libraries
are still .dylibs.  However, the new stub libraries cause problems for
third-party programs that support building with Apple SDKs and make
build-time decisions based on the presence or paths of system-supplied
shared libraries in the SDK.  In particular, building Python itself with
an SDK fails to find system-supplied libraries during setup.py's build of
standard library extension modules.  The solution is to have
find_library_file() in Distutils search for .tbd files, along with
the existing types (.a, .so, and .dylib).  Patch by Tim Smith.
2016-02-25 00:56:38 +11:00
Jason R. Coombs b118870490 Issue #26302: merge from 3.5 2016-02-24 08:50:59 -05:00
Serhiy Storchaka 6c783ac15d Issue #25913: Leading <~ is optional now in base64.a85decode() with adobe=True.
Patch by Swati Jaiswal.
2016-02-24 12:08:11 +02:00
Serhiy Storchaka 205e75bb62 Issue #25913: Leading <~ is optional now in base64.a85decode() with adobe=True.
Patch by Swati Jaiswal.
2016-02-24 12:05:50 +02:00
Ned Deily 3d2778c8da Issue #26406: merge from 3.5 2016-02-23 22:10:06 +11:00
Ned Deily e1d4e58777 Issue #26406: Avoid unnecessary serialization of getaddrinfo(3) calls on
current versions of OpenBSD and NetBSD.  Patch by A. Jesse Jiryu Davis.
2016-02-23 22:05:29 +11:00
Zachary Ware 72f2ef4137 Issue #26268: Merge with 3.5 2016-02-22 04:16:33 -06:00
Zachary Ware 6fe57ad229 Issue #26268: Update Windows builds to use OpenSSL 1.0.2f 2016-02-22 04:08:51 -06:00
Zachary Ware 16f164e9b8 Issue #26268: Update the prepare_ssl.py script
It can now handle OpenSSL versions 1.0.2e and greater, which don't
include include files in include/.

Note that sources prepared by this script no longer support the old
project files for 2.7; you now have to have Perl available to use
the old build_ssl.py script with sources from svn.python.org.
2016-02-22 04:02:30 -06:00
Brett Cannon ccd6c593ef Fix some typos in the NEWS file 2016-02-21 09:21:35 -08:00
Brett Cannon 31feb71f80 Fix some typos in the NEWS file 2016-02-21 09:20:51 -08:00
Martin Panter d9108d1253 Issue #23430: Stop socketserver from catching SystemExit etc from handlers
Also make handle_error() consistently output to stderr, and fix the
documentation.
2016-02-21 08:49:56 +00:00
Brett Cannon e5f4d3c246 Merge for issue #26186 2016-02-20 18:37:04 -08:00
Brett Cannon 558823a0cf Issue #26186: Remove an invalid type check in
importlib.util.LazyLoader.

The class was checking its argument as to whether its implementation
of create_module() came directly from importlib.abc.Loader. The
problem is that the classes coming from imoprtlib.machinery do not
directly inherit from the ABC as they come from _frozen_importlib.
Because the documentation has always said that create_module() was
ignored, the check has simply been removed.
2016-02-20 18:35:41 -08:00
Brett Cannon 0911c0d271 Merge for issue #26367 2016-02-20 12:59:36 -08:00
Brett Cannon 4f38cb41fe Issue #26367: Have importlib.__init__() raise RuntimeError when
'level' is specified but no __package__.

This brings the function inline with builtins.__import__(). Thanks to
Manuel Jacob for the patch.
2016-02-20 12:52:06 -08:00
Martin Panter a2b64e630e Issue #26309: Merge socketserver fix from 3.5 2016-02-18 11:01:32 +00:00
Martin Panter c12fef9aa3 Issue #26309: Shut down socketserver request if verify_request() is false
Patch by Aviv Palivoda.
2016-02-18 10:43:55 +00:00
Benjamin Peterson 4a180a693f merge 3.5 (closes #25939) 2016-02-17 22:18:35 -08:00
Benjamin Peterson 1378f7ca68 merge 3.4 (closes #25939) 2016-02-17 22:18:20 -08:00
Benjamin Peterson 9491272751 open the cert store readonly
Patch from Chi Hsuan Yen.
2016-02-17 22:13:19 -08:00
Ned Deily 00538ffe3a Issue #25924: merge with 3.5 2016-02-15 16:57:04 +11:00
Ned Deily 47299fd39c Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X
versions 10.5 or higher.  Original patch by A. Jesse Jiryu Davis.
2016-02-15 16:54:08 +11:00
Ned Deily 44f9bc959f Issue #26268: merge from 3.5 2016-02-15 16:47:03 +11:00
Ned Deily 203ce927f5 Issue #26268: Update OS X 10.5+ installer build to use OpenSSL 1.0.2f. 2016-02-15 16:44:38 +11:00
Martin Panter 8a5e69ca8c Issue #26316: Merge Arg Clinic fix from 3.5 2016-02-14 03:25:48 +00:00
Martin Panter 4177e7c38e Issue #26316: Fix variable name typo in Argument Clinic 2016-02-14 03:23:13 +00:00
Yury Selivanov 3e48b38dff Merge 3.5 (issue #25887) 2016-02-13 18:00:31 -05:00
Yury Selivanov 77c96813ab Issue #25887: Raise a RuntimeError when a coroutine is awaited more than once. 2016-02-13 17:59:05 -05:00
Yury Selivanov e0b23095ee Issues #26289 and #26315: Optimize floor/modulo div for single-digit longs
Microbenchmarks show 2-2.5x improvement.  Built-in 'divmod' function
is now also ~10% faster.

-m timeit -s "x=22331" "x//2;x//-3;x//4;x//5;x//-6;x//7;x//8;x//-99;x//100;"
with patch: 0.321          without patch: 0.633

-m timeit -s "x=22331" "x%2;x%3;x%-4;x%5;x%6;x%-7;x%8;x%99;x%-100;"
with patch: 0.224          without patch: 0.66

Big thanks to Serhiy Storchaka, Mark Dickinson and Victor Stinner for
thorow code reviews and algorithms improvements.
2016-02-11 10:26:27 -05:00
Serhiy Storchaka 7c90a82a01 Issue #25995: os.walk() no longer uses FDs proportional to the tree depth.
Different solution from 3.5.
2016-02-11 13:31:00 +02:00
Serhiy Storchaka 06c45e6e9c Issue #25995: os.walk() no longer uses FDs proportional to the tree depth. 2016-02-11 13:29:28 +02:00
Serhiy Storchaka ffe96ae10b Issue #25994: Added the close() method and the support of the context manager
protocol for the os.scandir() iterator.
2016-02-11 13:21:30 +02:00
Serhiy Storchaka 2feb642585 Issue #26325: Added test.support.check_no_resource_warning() to check that
no ResourceWarning is emitted.
2016-02-11 13:12:19 +02:00
Serhiy Storchaka 94a619d48b Issue #26325: Added test.support.check_no_resource_warning() to check that
no ResourceWarning is emitted.
2016-02-11 13:11:44 +02:00
Serhiy Storchaka a9725f86a9 Issue #26312: SystemError is now raised in all programming bugs with using
PyArg_ParseTupleAndKeywords().  RuntimeError did raised before in some
programming bugs.
2016-02-11 12:41:40 +02:00
Charles-François Natali 78f55ffc63 Issue #23992: multiprocessing: make MapResult not fail-fast upon exception. 2016-02-10 22:58:18 +00:00
Martin Panter 3008b1c4bb Issue #26304: Merge doc wording from 3.5 2016-02-10 05:44:56 +00:00
Martin Panter c04fb56e36 Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similar
The original form is incorrect grammar and feels awkward, even though the
meaning is clear.
2016-02-10 05:44:01 +00:00
Martin Panter 7e3a91a5fc Issue #26136: Upgrade the generator_stop warning to DeprecationWarning
Patch by Anish Shah.
2016-02-10 04:40:48 +00:00
Martin Panter 1fe0d13d12 Issue #26243: zlib.compress() keyword argument support by Aviv Palivoda 2016-02-10 10:06:36 +00:00
Martin Panter 96a4f07107 Issues #26310, #26311: Fix typos in the documentation and code comments 2016-02-10 01:17:51 +00:00
Martin Panter 263c448a2e Issues #26310, 26311: Merge typo fixes from 3.5 2016-02-10 01:18:36 +00:00
Victor Stinner 15a3095d64 compiler: don't emit SyntaxWarning on const stmt
Issue #26204: the compiler doesn't emit SyntaxWarning warnings anymore when
constant statements are ignored.
2016-02-08 22:45:06 +01:00
Victor Stinner a2724095cd compiler now ignores constant statements
The compile ignores constant statements and emit a SyntaxWarning warning.

Don't emit the warning for string statement because triple quoted string is a
common syntax for multiline comments.

Don't emit the warning on ellipis neither: 'def f(): ...' is a legit syntax for
abstract functions.

Changes:

* test_ast: ignore SyntaxWarning when compiling test statements. Modify
  test_load_const() to use assignment expressions rather than constant
  expression.
* test_code: add more kinds of constant statements, ignore SyntaxWarning when
  testing that the compiler removes constant statements.
* test_grammar: ignore SyntaxWarning on the statement "1"
2016-02-08 18:17:58 +01:00
Serhiy Storchaka fd625c39d0 Issue #26117: The os.scandir() iterator now closes file descriptor not only
when the iteration is finished, but when it was failed with error.
2016-02-08 17:57:22 +02:00
Serhiy Storchaka 988b9bcd88 Issue #26117: The os.scandir() iterator now closes file descriptor not only
when the iteration is finished, but when it was failed with error.
2016-02-08 17:56:36 +02:00
Serhiy Storchaka d2962f145a Issue #25949: __dict__ for an OrderedDict instance is now created only when
needed.
2016-02-08 16:39:05 +02:00
Serhiy Storchaka 79ad897052 Issue #25911: Restored support of bytes paths in os.walk() on Windows. 2016-02-08 16:24:15 +02:00
Martin Panter 192697e33b Issue #26045: Merge http.client error addition from 3.5 2016-02-09 11:57:11 +00:00
Martin Panter 44391481d7 Issue #26045: Add UTF-8 suggestion to error in http.client
Based on patch by Guido van Rossum.
2016-02-09 10:20:52 +00:00
Serhiy Storchaka 5f6a0b4eb2 Issue #25911: Restored support of bytes paths in os.walk() on Windows. 2016-02-08 16:23:28 +02:00
Serhiy Storchaka 4cd63ef67a Issue #26198: ValueError is now raised instead of TypeError on buffer
overflow in parsing "es#" and "et#" format units.  SystemError is now raised
instead of TypeError on programmical error in parsing format string.
2016-02-08 01:22:47 +02:00
Serhiy Storchaka 503f908090 Issue #26039: Added zipfile.ZipInfo.from_file() and zipinfo.ZipInfo.is_dir().
Patch by Thomas Kluyver.
2016-02-08 00:02:25 +02:00
Anish Shah 102d813b55 Issue #26302: Correctly identify comma as an invalid character for a cookie (correcting regression in Python 3.5). 2016-02-07 05:36:00 +05:00
Yury Selivanov 186c30b7ae Issue #26288: Optimize PyLong_AsDouble. 2016-02-05 19:40:01 -05:00
Martin Panter a3643c280f Issue #12923: Merge FancyURLopener fix from 3.5 2016-02-06 01:08:40 +00:00
Yury Selivanov aecef0d2d5 Merge 3.5 (issue #25660) 2016-02-04 01:24:56 -05:00
Yury Selivanov a7eae4016e Issue #25660: Fix TAB key behaviour in REPL. 2016-02-04 01:23:05 -05:00
Martin Panter a03702252f Issue #12923: Reset FancyURLopener's redirect counter even on exception
Based on patches by Brian Brazil and Daniel Rocco.
2016-02-04 06:01:35 +00:00
Martin Panter 63d096ddab Issue #24421: Compile _math.c separately to avoid race condition 2016-02-03 05:19:44 +00:00
Serhiy Storchaka 65aaef423b Issue #25945: Fixed bugs in functools.partial.
Fixed a crash when unpickle the functools.partial object with wrong state.
Fixed a leak in failed functools.partial constructor.
"args" and "keywords" attributes of functools.partial have now always types
tuple and dict correspondingly.
2016-02-02 18:45:47 +02:00
Martin Panter 8254f793c0 Issue #26244: Merge zlib documentation from 3.5 2016-02-03 07:52:06 +00:00
Martin Panter 567d513b9b Issue #26244: Clarify default zlib compression level in documentation
Based on patch by Aviv Palivoda.
2016-02-03 07:06:33 +00:00
Martin Panter c9deece272 Issue #24421: Compile _math.c separately to avoid race condition 2016-02-03 05:19:44 +00:00
Serhiy Storchaka 3874128519 Issue #25945: Fixed bugs in functools.partial.
Fixed a crash when unpickle the functools.partial object with wrong state.
Fixed a leak in failed functools.partial constructor.
"args" and "keywords" attributes of functools.partial have now always types
tuple and dict correspondingly.
2016-02-02 18:45:17 +02:00
Raymond Hettinger b00da57561 Issue #26194: Inserting into a full deque to raise an IndexError 2016-02-01 21:19:22 -08:00
Raymond Hettinger ce5179fcba Issue #23601: Use small object allocator for dict key objects 2016-01-31 08:56:21 -08:00
Berker Peksag 396cbd6dfd Issue #23076: Path.glob() now raises a ValueError if it's called with an
invalid pattern.

Patch by Thomas Nyberg.
2016-01-30 17:51:35 +02:00
Berker Peksag 4a208e448e Issue #23076: Path.glob() now raises a ValueError if it's called with an
invalid pattern.

Patch by Thomas Nyberg.
2016-01-30 17:50:48 +02:00
Martin Panter cca32995b3 Issue #4806: Merge * unpacking fix from 3.5 2016-01-31 06:33:16 +00:00
Martin Panter b5944220ab Issue #4806: Avoid masking original TypeError in call with * unpacking
Based on patch by Hagen Fürstenau and Daniel Urban.
2016-01-31 06:30:56 +00:00
Serhiy Storchaka 2552c2d6f7 Issue #26202: copy.deepcopy() now correctly copies range() objects with
non-atomic attributes.
2016-01-28 21:43:51 +02:00
Serhiy Storchaka 0a20bbf669 Issue #26202: copy.deepcopy() now correctly copies range() objects with
non-atomic attributes.
2016-01-28 21:43:35 +02:00
Serhiy Storchaka 8abaa9ab34 Issue #19883: Fixed possible integer overflows in zipimport. 2016-01-28 21:32:39 +02:00
Serhiy Storchaka d5db57396b Issue #19883: Fixed possible integer overflows in zipimport. 2016-01-28 21:30:16 +02:00
Victor Stinner c8d2fb4112 Merge 3.5: Issue #26227 2016-01-28 15:44:10 +01:00
Victor Stinner 7240030c52 Windows: Decode hostname from ANSI code page
Issue #26227: On Windows, getnameinfo(), gethostbyaddr() and gethostbyname_ex()
functions of the socket module now decode the hostname from the ANSI code page
rather than UTF-8.
2016-01-28 15:41:01 +01:00
Martin Panter 9d48869fcc Issue #19023: Merge ctypes doc and tests from 3.5 2016-01-29 10:25:40 +00:00
Martin Panter 34360c8e09 Issue #19023: Document ctypes array and pointer classes
Also add some more tests. Based on patch by Sye van der Veen.
2016-01-29 10:12:19 +00:00
Raymond Hettinger 3743432302 Issue #26194: Fix undefined behavior for deque.insert() when len(d) == maxlen 2016-01-26 21:44:16 -08:00
Victor Stinner f2c1aa1661 Add ast.Constant
Issue #26146: Add a new kind of AST node: ast.Constant. It can be used by
external AST optimizers, but the compiler does not emit directly such node.

An optimizer can replace the following AST nodes with ast.Constant:

* ast.NameConstant: None, False, True
* ast.Num: int, float, complex
* ast.Str: str
* ast.Bytes: bytes
* ast.Tuple if items are constants too: tuple
* frozenset

Update code to accept ast.Constant instead of ast.Num and/or ast.Str:

* compiler
* docstrings
* ast.literal_eval()
* Tools/parser/unparse.py
2016-01-26 00:40:57 +01:00
Brett Cannon 9fa812668f Issue #18018: Raise an ImportError if a relative import is attempted
with no known parent package.

Previously SystemError was raised if the parent package didn't exist
(e.g., __package__ was set to '').
Thanks to Florent Xicluna and Yongzhi Pan for reporting the issue.
2016-01-22 16:39:02 -08:00
Brett Cannon 849113af6b Issue #25791: Warn when __package__ != __spec__.parent.
In a previous change, __spec__.parent was prioritized over
__package__. That is a backwards-compatibility break, but we do
eventually want __spec__ to be the ground truth for module details. So
this change reverts the change in semantics and instead raises an
ImportWarning when __package__ != __spec__.parent to give people time
to adjust to using spec objects.
2016-01-22 15:25:50 -08:00
Victor Stinner 3cdd5fb970 code_richcompare() now uses the constants types
Issue #25843: When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.

Add a new _PyCode_ConstantKey() private function.
2016-01-22 12:33:12 +01:00
Victor Stinner efb2413ce8 code_richcompare() now uses the constants types
Issue #25843: When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.

Add a new _PyCode_ConstantKey() private function.
2016-01-22 12:33:12 +01:00
Victor Stinner e3560a7dc9 site: error on sitecustomize import error
Issue #26099: The site module now writes an error into stderr if sitecustomize
module can be imported but executing the module raise an ImportError. Same
change for usercustomize.
2016-01-22 12:22:07 +01:00
Victor Stinner 875dde4387 Merge 3.5 (doc) 2016-01-21 08:58:44 +01:00
Victor Stinner d99cd333fe Issue #26106: doc: Move text of licenses to parsed literal block
This change helps to ignore text of PSF, BEOPEN.com and CNRI licenses when
translating the documentation. Patch written by Julien Palard who is
translating Python 3.5 doc to french. Text of other licenses already used
preformatted format.
2016-01-21 08:56:00 +01:00
Benjamin Peterson 2b0b5ac5a0 merge 3.5 (#26171) 2016-01-20 22:25:40 -08:00
Benjamin Peterson 47b8ba22e3 merge 3.4 (#26171) 2016-01-20 22:25:06 -08:00
Benjamin Peterson c4032da201 prevent buffer overflow in get_data (closes #26171) 2016-01-20 22:23:44 -08:00
Victor Stinner f3914eb16d co_lnotab supports negative line number delta
Issue #26107: The format of the co_lnotab attribute of code objects changes to
support negative line number delta.

Changes:

* assemble_lnotab(): if line number delta is less than -128 or greater than
  127, emit multiple (offset_delta, lineno_delta) in co_lnotab
* update functions decoding co_lnotab to use signed 8-bit integers

  - dis.findlinestarts()
  - PyCode_Addr2Line()
  - _PyCode_CheckLineNumber()
  - frame_setlineno()

* update lnotab_notes.txt
* increase importlib MAGIC_NUMBER to 3361
* document the change in What's New in Python 3.6
* cleanup also PyCode_Optimize() to use better variable names
2016-01-20 12:16:21 +01:00
Victor Stinner b56837a033 Merge 3.5
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function.
2016-01-20 11:19:46 +01:00
Victor Stinner bfd316e750 Add _PyThreadState_UncheckedGet()
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which
gets the current thread state, but don't call Py_FatalError() if it is NULL.

Python 3.5.1 removed the _PyThreadState_Current symbol from the Python C API to
no more expose complex and private atomic types. Atomic types depends on the
compiler or can even depend on compiler options. The new function
_PyThreadState_UncheckedGet() allows to get the variable value without having
to care of the exact implementation of atomic types.

Changes:

* Replace direct usage of the _PyThreadState_Current variable with a call to
  _PyThreadState_UncheckedGet().
* In pystate.c, replace direct usage of the _PyThreadState_Current variable
  with the PyThreadState_GET() macro for readability.
* Document also PyThreadState_Get() in pystate.h
2016-01-20 11:12:38 +01:00
Serhiy Storchaka 5ccbf79eae Issue #26147: xmlrpc now works with strings not encodable with used
non-UTF-8 encoding.
2016-01-20 10:41:33 +02:00
Serhiy Storchaka aebb6d3682 Issue #26147: xmlrpc now works with strings not encodable with used
non-UTF-8 encoding.
2016-01-20 10:34:27 +02:00
Serhiy Storchaka 4918b47c64 Issue #25935: Garbage collector now breaks reference loops with OrderedDict. 2016-01-19 14:48:42 +02:00
Serhiy Storchaka d205d0145c Issue #25935: Garbage collector now breaks reference loops with OrderedDict. 2016-01-19 14:46:25 +02:00
Serhiy Storchaka 47670ebb0c Issue #16620: Fixed AttributeError in msilib.Directory.glob(). 2016-01-19 14:06:13 +02:00
Serhiy Storchaka e914cd1308 Issue #16620: Fixed AttributeError in msilib.Directory.glob(). 2016-01-19 13:55:36 +02:00
Benjamin Peterson 2c028492d4 merge 3.5 (#25731) 2016-01-18 21:18:35 -08:00
Benjamin Peterson 9ad11544bf set tp_new from the class in the hierarchy that actually owns the descriptor (closes #25731)
Debugging by Eryk Sun.
2016-01-18 21:11:18 -08:00
Serhiy Storchaka 905a97d4c2 Issue #26013: Added compatibility with broken protocol 2 pickles created
in old Python 3 versions (3.4.3 and lower).
2016-01-18 21:36:03 +02:00
Serhiy Storchaka 111c7b9011 Issue #26013: Added compatibility with broken protocol 2 pickles created
in old Python 3 versions (3.4.3 and lower).
2016-01-18 21:35:22 +02:00
Serhiy Storchaka 9cc4ed5c7a Issue #26129: Deprecated accepting non-integers in grp.getgrgid(). 2016-01-18 18:49:57 +02:00
Steve Dower 709c2aeba6 Issue #26071: bdist_wininst created binaries fail to start and find 32bit Python 2016-01-16 13:55:05 -08:00
Steve Dower 332334f1ab Issue #26071: bdist_wininst created binaries fail to start and find 32bit Python 2016-01-16 13:54:53 -08:00
Steve Dower ca9aab19ab Issue #26073: Update the list of magic numbers in launcher 2016-01-16 13:48:31 -08:00
Steve Dower 87fb7f64d8 Issue #26073: Update the list of magic numbers in launcher 2016-01-16 13:48:06 -08:00
Steve Dower c3cd76a2a1 Issue #26065: Excludes venv from library when generating embeddable distro. 2016-01-16 13:45:32 -08:00
Steve Dower 10cabcbe14 Issue #26065: Excludes venv from library when generating embeddable distro. 2016-01-16 13:44:43 -08:00
Steve Dower d8ce735e82 Issue #25850: Use cross-compilation by default for 64-bit Windows. 2016-01-16 12:40:19 -08:00
Steve Dower 1d329413fc Issue #25850: Use cross-compilation by default for 64-bit Windows. 2016-01-16 12:39:10 -08:00
Martin Panter e8afd01db8 Issue #23883: Update news 2016-01-16 07:01:46 +00:00