Commit Graph

18397 Commits

Author SHA1 Message Date
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
Martin Panter 4eb376c441 Issue #23883: Add missing APIs to calendar.__all__
Patch by Joel Taddei and Jacek Kołodziej.
2016-01-16 06:49:30 +00:00
Martin Panter 7978e10441 Issue #23883: Missing fileinput.__all__ APIs; patch by Mauro SM Rodrigues 2016-01-16 06:26:54 +00:00
Brett Cannon 63b8505281 Issue #25791: Raise an ImportWarning when __spec__ or __package__ are
not defined for a relative import.

This is the start of work to try and clean up import semantics to rely
more on a module's spec than on the myriad attributes that get set on
a module. Thanks to Rose Ames for the patch.
2016-01-15 13:33:03 -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 3570e02fd2 Issue #25940: Merge self-signed.pythontest.net testing from 3.5 2016-01-14 13:25:06 +00: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
Senthil Kumaran 86f7109dad Issue #25822: Add docstrings to the fields of urllib.parse results.
Patch contributed by Swati Jaiswal.
2016-01-14 00:11:39 -08:00
Senthil Kumaran 4e280a6f9f Add a NEWS entry for Issue #22642. 2016-01-13 07:48:57 -08:00
Zachary Ware e2c9adb03b Closes #25348: Merge with 3.5 2016-01-12 01:31:21 -06:00
Zachary Ware bed30c37d8 Issue #25348: Add --pgo and --pgo-job flags to PCbuild\build.bat 2016-01-12 01:26:50 -06:00
Barry Warsaw 305e3557e9 Merge heads. 2016-01-11 15:53:51 -05:00
Barry Warsaw 3d220cc4d7 As per further discussion, re-enable the typeobject.c guard for picklability.
upstreams such as Cython will have to adjust.
2016-01-11 15:51:27 -05:00
doko@ubuntu.com 0633cb7d7a Merge 3.5 2016-01-11 21:43:29 +01: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
Yury Selivanov 37dc2b2883 Issue #25486: Resurrect inspect.getargspec in 3.6. Backout a565aad5d6e1.
The decision is that we shouldn't remove popular APIs (however long they
are depreacted) from Python 3, while 2.7 is still around and supported.
2016-01-11 15:15:01 -05:00
Barry Warsaw ec71f1779f 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:49:40 -05: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 4f8273d77e Merge 3.5 (issue #26050) 2016-01-11 12:32:53 -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
Senthil Kumaran 96b531abd5 Issue #26069: Remove the deprecated apis in the trace module. 2016-01-11 07:09:42 -08:00
Andrew Svetlov 3feb9460ed Add missing Misc/NEWS update 2016-01-11 09:16:58 +02:00
Andrew Svetlov 34dd59ec84 merge 3.5 2016-01-11 09:13:10 +02:00
Andrew Svetlov c07b16b40f Sync with asyncio repo 2016-01-11 08:42:49 +02:00
Terry Jan Reedy 3acf170869 Merge with 3.5 2016-01-09 03:28:01 -05:00
Terry Jan Reedy 2a97f8a6d1 Issue #26029: Remove extraneous word. Patch by Upendra Kumar. 2016-01-09 03:27:37 -05:00
Senthil Kumaran b94591c2bf merge from 3.5
Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
original values after patching.

Patch contributed by Sean McCully.
2016-01-08 23:44:10 -08: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 5db60aa84e merge 3.5 (closes #25672) 2016-01-07 21:38:51 -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 483397a235 Issue #22570: Add 'path' attribute to pathlib.Path objects. (Merge 3.5->3.6) 2016-01-06 11:03:47 -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 e630b6818f Issue #26012: Don't traverse into symlinks for ** pattern in pathlib.Path.[r]glob(). (Merge 3.5->3.6) 2016-01-06 10:36:19 -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 080169c494 Issue #24120: Ignore PermissionError in pathlib.Path.[r]glob(). Ulrich Petri. (Merge 3.5->3.6) 2016-01-06 09:53:51 -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 317f64f048 #21815: violate IMAP RFC to be compatible with, e.g., gmail
and others, including imaplib's own behavior.  I'm applying this only to 3.6
because there's a potential backward compatibility concern: if there are
servers that include ] characters in the 'text' portion of their imap
responses, this code change could introduce a new bug.

Patch by Lita Cho, reviewed by Jessica McKellar, Berker Peksag, Maciej Szulik,
silentghost, and me (I fleshed out the comments with the additional
info/concerns.)
2016-01-02 17:18:34 -05:00
R David Murray 01759d5554 Merge: #22709: Use stdin as-is if it does not have a buffer attribute. 2016-01-02 15:43:44 -05: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 288cb25f1a Issue #25961: Disallowed null characters in the type name.
Simplified testing for null characters in __name__ setter.
2015-12-30 21:41:53 +02: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
Serhiy Storchaka 0d250bc119 Issue #25971: Optimized creating Fractions from floats by 2 times and from
Decimals by 3 times.
Unified error messages in float.as_integer_ratio(), Decimal.as_integer_ratio(),
and Fraction constructors.
2015-12-29 22:34:23 +02:00
Benjamin Peterson 5aab44b301 merge 3.5 (#25973) 2015-12-29 10:08:51 -06: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
Brett Cannon eae3079041 Issue #25802: Deprecate load_module() on importlib.machinery.SourceFileLoader and SourcelessFileLoader.
They were the only remaining implementations of load_module() not
documented as deprecated.
2015-12-28 17:55:27 -08:00
Stefan Krah 6f5470880e Fix typo. 2015-12-28 23:17:05 +01:00
Stefan Krah e3f359c71c Merge. 2015-12-28 23:12:52 +01:00
Stefan Krah 53f2e0ad45 Issue #25928: Add Decimal.as_integer_ratio(). Python parts and docs by
Mark Dickinson.
2015-12-28 23:02:02 +01:00
Serhiy Storchaka e3a7d26aa6 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:59:09 +02: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 1e3c3e906c Issue #25768: Make compileall functions return booleans and document
the return values as well as test them.

Thanks to Nicholas Chammas for the bug report and initial patch.
2015-12-27 13:17:04 -08:00
Brett Cannon 4a4ca7c13f Merge for issue #12484 2015-12-27 12:24:36 -08: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 0792451ea4 Merge for issue #25874 2015-12-27 12:09:10 -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 f9253c96fd 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:05:35 +02: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 ef1585eb9a Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
Serhiy Storchaka ea8c43152f Issue #24103: Fixed possible use after free in ElementTree.XMLPullParser. 2015-12-24 11:53:16 +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 f006940351 Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
2015-12-24 10:39: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 345e78e566 Issue #25860: os.fwalk() no longer skips remaining directories when error occurs.
Original patch by Samson Lee.
2015-12-23 00:09:01 +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 3987e26e75 Issue #25914: Fixed and simplified OrderedDict.__sizeof__. 2015-12-22 08:22:05 +02:00
Serhiy Storchaka 0ce7a3a34c Issue #25914: Fixed and simplified OrderedDict.__sizeof__. 2015-12-22 08:16:18 +02:00
Zachary Ware 266514ae93 Issue #25827: Merge with 3.5 2015-12-21 14:17:12 -06:00
Zachary Ware 5af856404a Issue #25827: Add support for ICC to configure 2015-12-21 12:09:17 -06:00
Serhiy Storchaka 060ed718ce Issue #25869: Optimized deepcopying ElementTree; it is now 20 times faster. 2015-12-21 12:57:27 +02:00
Serhiy Storchaka 22adf2ac02 Issue #25873: Optimized iterating ElementTree.
Iterating elements Element.iter() is now 40% faster,
iterating text Element.itertext() is now up to 2.5 times faster.
2015-12-21 12:43:54 +02:00
Serhiy Storchaka 47a9d59d51 Issue #25902: Fixed various refcount issues in ElementTree iteration. 2015-12-21 11:11:12 +02: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
Serhiy Storchaka 3182db356c Issue #25766: Special method __bytes__() now works in str subclasses. 2015-12-20 16:37:21 +02:00
Serhiy Storchaka 5aac3ed799 Issue #25766: Special method __bytes__() now works in str subclasses. 2015-12-20 16:36:34 +02:00
Larry Hastings fa71932860 Release bump for Python 3.4.4 final. 2015-12-19 19:31:10 -08:00
Serhiy Storchaka a9406e77fa Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
2015-12-19 20:07:11 +02:00
Serhiy Storchaka 5c4064e8bd Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
2015-12-19 20:05:25 +02:00
Serhiy Storchaka a254921cd4 Issue #22227: The TarFile iterator is reimplemented using generator.
This implementation is simpler that using class.
2015-12-19 09:43:14 +02:00
Serhiy Storchaka efb778a843 Fixed markup and spaces in Misc/NEWS. 2015-12-18 19:37:02 +02:00
Serhiy Storchaka d1f20d1cf3 Fixed markup and spaces in Misc/NEWS. 2015-12-18 19:36:24 +02:00
Serhiy Storchaka 3fd4a735d8 Issue #25899: Converted non-ASCII characters in docstrings and manpage
to ASCII replacements.  Removed UTF-8 BOM from Misc/NEWS.
Original patch by Chris Angelico.
2015-12-18 13:10:37 +02:00
Serhiy Storchaka 225821c653 Issue #25899: Converted non-ASCII characters in docstrings and manpage
to ASCII replacements.  Original patch by Chris Angelico.
2015-12-18 13:05:04 +02:00
Victor Stinner 117051afa9 (Merge 3.5) Issue #25696: Fix installation of Python on UNIX with make -j9. 2015-12-13 21:21:36 +01:00
Victor Stinner c2021558ef Issue #25696: Fix installation of Python on UNIX with make -j9. 2015-12-13 21:20:36 +01:00
Martin Panter 33d8a1b426 Issue #19771: Merge runpy error adjustment from 3.5 2015-12-12 07:16:33 +00:00
Martin Panter dda584340e Issue #19771: Omit irrelevant message if package could not be initialized 2015-12-12 06:58:55 +00:00
Serhiy Storchaka 36ff997988 Issue #25638: Optimized ElementTree parsing; it is now 10% faster. 2015-12-10 09:51:53 +02:00
Larry Hastings ef3a67682b Null merge from 3.5. 2015-12-06 22:14:58 -08:00
Larry Hastings d785da8fbb Merge. 2015-12-06 22:00:57 -08:00
Larry Hastings 13cf4904b2 Post-release fixups for Python 3.4.4rc1. 2015-12-06 21:54:29 -08:00
Larry Hastings 0c6ffabc5b Post-release fixups for Python 3.5.1. 2015-12-06 21:53:27 -08:00
Serhiy Storchaka 9ec5e25f26 Issue #25638: Optimized ElementTree.iterparse(); it is now 2x faster.
ElementTree.XMLParser._setevents now accepts any objects with the append
method, not just a list.
2015-12-07 02:31:11 +02:00
Serhiy Storchaka 59fb6342a4 Issue #25761: Improved detecting errors in broken pickle data. 2015-12-06 22:01:35 +02:00
Larry Hastings e739601a78 Version bump for 3.4.4rc1. 2015-12-06 05:53:35 -08:00
Ned Deily 7da28d29d6 Issue #25798: merge from 3.5 2015-12-05 23:57:55 -05:00
Ned Deily 8d5d4664dc Issue #25798: merge from 3.4 2015-12-05 23:55:33 -05:00
Ned Deily 6364094f49 Issue #25798: Update OS X 10.5+ 32-bit-only installer to build
and link with OpenSSL 1.0.2e.
2015-12-05 23:51:23 -05:00
Martin Panter c85110658b Issue #25717: Merge fstat() fix from 3.5 2015-12-06 03:29:54 +00:00
Martin Panter 0bb62b12a3 Issue #25717: Tolerate fstat() failures in the FileIO constructor
This restores 3.4 behaviour, which was removed by revision 3b5279b5bfd1. The
fstat() call fails with ENOENT for a Virtual Box shared folder filesystem if
the file entry has been unlinked, e.g. for a temporary file.
2015-12-06 03:15:05 +00:00
Larry Hastings ffccaa40fa Version bump for 3.5.1 final. 2015-12-05 17:05:23 -08:00
Benjamin Peterson 14b2c82855 fix reordering 2015-12-05 00:27:11 -08:00
Benjamin Peterson 608916af24 merge 3.5 2015-12-05 00:24:10 -08:00
Benjamin Peterson c98bbd5289 merge 3.4 2015-12-05 00:24:01 -08:00
Benjamin Peterson 68524e1984 merge 3.3 2015-12-05 00:23:11 -08:00
Benjamin Peterson 2deaea3119 merge 3.2 2015-12-05 00:21:12 -08:00
Benjamin Peterson 5e621176c4 add CVE and issue number 2015-12-05 00:17:57 -08:00
R David Murray 154228fb61 Merge: #24903: Remove misleading error message to fix regression. 2015-12-04 23:05:20 -05:00
R David Murray 939614c48c Merge: #24903: Remove misleading error message to fix regression. 2015-12-04 23:04:37 -05:00
R David Murray ced699b4c7 #24903: Remove misleading error message to fix regression.
Before the argparse conversion, compileall would (sometimes) accept multiple
paths when -d was specified.  Afterward, it does not.  The corresponding check
in the original code claimed to prevent multiple *directories* from being
specified...but it didn't really work even to do that.  So this patch fixes
the regression by invoking the consenting adults rule: if you specify a
combination of arguments to compileall that produces files with inconsistent
destdirs (which you could do before), it is on you.

Patch by Jake Garver.
2015-12-04 22:54:38 -05:00
Martin Panter 07efcd5007 Issue #25764: Merge subprocess fix from 3.5 2015-12-05 02:27:58 +00:00
Martin Panter 6a77c2d978 Issue #25764: Merge subprocess fix from 3.4 into 3.5 2015-12-05 02:03:42 +00:00
Brett Cannon 65ca88e4e0 Issue #25771: Tweak ValueError message when package isn't specified
for importlib.util.resolve_name() but is needed.

Thanks to Martin Panter for the bug report.
2015-12-04 15:19:42 -08:00
Brett Cannon f4f25fe576 Issue #25500: Fix the language reference to not claim that import
statements search for __import__ in the global scope.

Thanks to Sergei Lebedev for finding the documentation bug.
2015-12-04 14:51:26 -08:00
Serhiy Storchaka 3ab6c981e7 Issue #6478: _strptime's regexp cache now is reset after changing timezone
with time.tzset().
2015-12-03 22:27:31 +02:00
Serhiy Storchaka b1f64e7d29 Issue #6478: _strptime's regexp cache now is reset after changing timezone
with time.tzset().
2015-12-03 22:26:36 +02:00
Serhiy Storchaka c7217d7c22 Issue #6478: _strptime's regexp cache now is reset after changing timezone
with time.tzset().
2015-12-03 22:21:07 +02:00
Martin Panter 85134706af Issue #14285: Merge runpy exception fix from 3.5 2015-12-03 01:36:03 +00:00
Martin Panter 657257edb6 Issue #14285: Do not catch __init__.py exceptions in runpy
Initialize package before calling find_spec() for __main__, so that we do not
incorrectly handle exceptions from __init__.py. When runpy is used from the
Python CLI, use an internal exception rather than ImportError, to avoid
catching unexpected exceptions.

Also remove exception message rewriting in _run_module_as_main(), because it
seems to be redundant with the _get_main_module_details() function.
2015-12-03 01:23:10 +00:00
Serhiy Storchaka 7c088a9b5c Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache. 2015-12-03 01:05:52 +02:00
Serhiy Storchaka 6648bf5661 Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache. 2015-12-03 01:04:37 +02:00
Serhiy Storchaka e800941d66 Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache. 2015-12-03 01:02:03 +02:00