Commit Graph

17793 Commits

Author SHA1 Message Date
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 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 aabafe7bc2 Issue #26015: Added new tests for pickling iterators of mutable sequences. 2016-03-06 14:10:24 +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 a01a144aab Issue #26475: Fixed debugging output for regular expressions with the (?x) flag. 2016-03-06 09:15:47 +02: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
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 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 7869a22779 Issue #26385: Cleanup NamedTemporaryFile if open() fails, by SilentGhost 2016-02-28 05:22:20 +00:00
Martin Panter 3263f6874a Issue #22836: Keep exception reports sensible despite errors 2016-02-28 03:16:11 +00: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 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
Benjamin Peterson 9491272751 open the cert store readonly
Patch from Chi Hsuan Yen.
2016-02-17 22:13:19 -08:00
Martin Panter 63d096ddab Issue #24421: Compile _math.c separately to avoid race condition 2016-02-03 05:19:44 +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 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
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
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 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 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 31feb71f80 Fix some typos in the NEWS file 2016-02-21 09:20:51 -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 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 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 1378f7ca68 merge 3.4 (closes #25939) 2016-02-17 22:18:20 -08: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 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 4177e7c38e Issue #26316: Fix variable name typo in Argument Clinic 2016-02-14 03:23:13 +00: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
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 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
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 96a4f07107 Issues #26310, #26311: Fix typos in the documentation and code comments 2016-02-10 01:17:51 +00: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 5f6a0b4eb2 Issue #25911: Restored support of bytes paths in os.walk() on Windows. 2016-02-08 16:23:28 +02: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
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
Yury Selivanov a7eae4016e Issue #25660: Fix TAB key behaviour in REPL. 2016-02-04 01:23:05 -05: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
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
Raymond Hettinger b00da57561 Issue #26194: Inserting into a full deque to raise an IndexError 2016-02-01 21:19:22 -08: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 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 0a20bbf669 Issue #26202: copy.deepcopy() now correctly copies range() objects with
non-atomic attributes.
2016-01-28 21:43:35 +02:00
Serhiy Storchaka d5db57396b Issue #19883: Fixed possible integer overflows in zipimport. 2016-01-28 21:30:16 +02: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 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 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 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 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 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 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 d205d0145c Issue #25935: Garbage collector now breaks reference loops with OrderedDict. 2016-01-19 14:46:25 +02:00
Serhiy Storchaka e914cd1308 Issue #16620: Fixed AttributeError in msilib.Directory.glob(). 2016-01-19 13:55:36 +02: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 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
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 87fb7f64d8 Issue #26073: Update the list of magic numbers in launcher 2016-01-16 13:48:06 -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 1d329413fc Issue #25850: Use cross-compilation by default for 64-bit Windows. 2016-01-16 12:39:10 -08:00
Brett Cannon 56aae8f304 Issue #17633: Improve support for namespace packages with zipimport.
Previously zipimport mistakenly limited namespace support to only the
top-level of the zipfile when it should have supported an arbitrary
depth.

Thanks to Phil Connel for the bug report and initial patch and Mike
Romberg for the final patch.
2016-01-15 11:22:19 -08:00
Martin Panter 17cbee49d6 Issue #25940: Merge self-signed.pythontest.net testing from 3.4 into 3.5 2016-01-14 13:22:29 +00:00
Martin Panter 514bb0711f Issue #25940: Merge self-signed.pythontest.net testing from 3.3 into 3.4 2016-01-14 12:46:49 +00:00
Martin Panter 73f55076f6 Issue #25940: Merge self-signed.pythontest.net testing from 3.2 into 3.3 2016-01-14 12:21:02 +00:00
Martin Panter 3d81d93f34 Issue #25940: Use self-signed.pythontest.net in SSL tests
This is instead of svn.python.org, whose certificate recently expired, and
whose new certificate uses a different root certificate.

The certificate used at the pythontest server was modifed to set the "basic
constraints" CA flag. This flag seems to be required for test_get_ca_certs_
capath() to work (in Python 3.4+).

Added the new self-signed certificate to capath with the following commands:

cp Lib/test/{selfsigned_pythontestdotnet.pem,capath/}
c_rehash -v Lib/test/capath/
c_rehash -v -old Lib/test/capath/
# Note the generated file names
cp Lib/test/capath/{selfsigned_pythontestdotnet.pem,0e4015b9.0}
mv Lib/test/capath/{selfsigned_pythontestdotnet.pem,ce7b8643.0}

The new server responds with "No route to host" when connecting to port 444.
2016-01-14 09:36:00 +00:00
Zachary Ware bed30c37d8 Issue #25348: Add --pgo and --pgo-job flags to PCbuild\build.bat 2016-01-12 01:26:50 -06:00
doko@ubuntu.com b2b1217270 - Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars
appearing before $() vars.
2016-01-11 21:41:40 +01:00
Barry Warsaw 885e1939be Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
_PyObject_GetState() due to regressions observed in Cython-based projects.
2016-01-11 13:24:02 -05:00
Yury Selivanov b4b8a0ef3e Merge 3.4 (Issue #26050) 2016-01-11 12:30:56 -05:00
Yury Selivanov d9d0e864b9 Issue #26050: Add asyncio.StreamReader.readuntil() method.
Patch by Марк Коренберг.
2016-01-11 12:28:19 -05:00
Andrew Svetlov 3feb9460ed Add missing Misc/NEWS update 2016-01-11 09:16:58 +02:00
Andrew Svetlov c07b16b40f Sync with asyncio repo 2016-01-11 08:42:49 +02:00
Terry Jan Reedy 2a97f8a6d1 Issue #26029: Remove extraneous word. Patch by Upendra Kumar. 2016-01-09 03:27:37 -05:00
Senthil Kumaran 81bc927da7 Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
original values after patching.

Patch contributed by Sean McCully.
2016-01-08 23:43:29 -08:00
Benjamin Peterson 3b1a8b3bbe enable SSL_MODE_RELEASE_BUFFERS
Patch by Cory Benfield.
2016-01-07 21:37:37 -08:00
Guido van Rossum 1a4afec0d6 Issue #22570: Add 'path' attribute to pathlib.Path objects. (Merge 3.4->3.5) 2016-01-06 11:03:15 -08:00
Guido van Rossum e428231539 Issue #22570: Add 'path' attribute to pathlib.Path objects. 2016-01-06 11:01:42 -08:00
Guido van Rossum 520f297eb4 Issue #26012: Don't traverse into symlinks for ** pattern in pathlib.Path.[r]glob(). (Merge 3.4->3.5) 2016-01-06 10:35:30 -08:00
Guido van Rossum 69bfb15bd8 Issue #26012: Don't traverse into symlinks for ** pattern in pathlib.Path.[r]glob(). 2016-01-06 10:31:33 -08:00
Guido van Rossum d54377d2ca Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri. (Merge 3.4->3.5) 2016-01-06 09:51:42 -08:00
Guido van Rossum 6c2d33a258 Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri. 2016-01-06 09:42:07 -08:00
R David Murray 830207e8f3 #22709: Use stdin as-is if it does not have a buffer attribute.
This restores backward compatibility lost in the fix for #21075, and
is better duck typing.

Patch by Akira Li.
2016-01-02 15:41:41 -05:00
Serhiy Storchaka 42bf8fc901 Issue #25961: Disallowed null characters in the type name.
Simplified testing for null characters in __name__ setter.
2015-12-30 21:40:49 +02:00
Benjamin Peterson 3cc8f4b969 make recording and reporting errors and nonlocal and global directives more robust (closes #25973) 2015-12-29 10:08:34 -06:00
Serhiy Storchaka e4d65e3aab Issue #25447: Copying the lru_cache() wrapper object now always works,
independedly from the type of the wrapped object (by returning the original
object unchanged).
2015-12-28 23:58:07 +02:00
Brett Cannon 762d5ea875 Issue #12484: Remove a mention of Py_InitModule() and _PyImport_FixupExtension().
Thanks to Alejandro Santos for the bug report and Anish Shah for the
patch.
2015-12-27 12:24:06 -08:00
Brett Cannon 85622e4bc9 Issue #25874: Clarify platform support in the "Using Python on Windows" doc.
Thanks to Chris Wilcox for the initial patch.
2015-12-27 12:08:37 -08:00
Serhiy Storchaka f81be8aa3f Issue #22995: Instances of extension types with a state that aren't
subclasses of list or dict and haven't implemented any pickle-related
methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__,
or __getstate__), can no longer be pickled.  Including memoryview.
2015-12-25 21:04:29 +02:00
Serhiy Storchaka bc4ded9537 Issue #24103: Fixed possible use after free in ElementTree.XMLPullParser. 2015-12-24 11:51:57 +02:00
Serhiy Storchaka 5a57ade58e Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
2015-12-24 10:35:59 +02:00
Serhiy Storchaka 0bddc9eb15 Issue #25860: os.fwalk() no longer skips remaining directories when error occurs.
Original patch by Samson Lee.
2015-12-23 00:08:24 +02:00
Serhiy Storchaka 0ce7a3a34c Issue #25914: Fixed and simplified OrderedDict.__sizeof__. 2015-12-22 08:16:18 +02:00
Zachary Ware 5af856404a Issue #25827: Add support for ICC to configure 2015-12-21 12:09:17 -06:00
Serhiy Storchaka 66c08d90f6 Issue #25902: Fixed various refcount issues in ElementTree iteration. 2015-12-21 11:09:48 +02:00
Larry Hastings c4e70ffba9 Post-release touchups for Python 3.4.4 final. 2015-12-20 22:42:47 -08:00