]> granicus.if.org Git - python/log
python
8 years agoAnti-registration of various ABC methods.
Guido van Rossum [Thu, 18 Aug 2016 16:22:23 +0000 (09:22 -0700)]
Anti-registration of various ABC methods.

- Issue #25958: Support "anti-registration" of special methods from
  various ABCs, like __hash__, __iter__ or __len__.  All these (and
  several more) can be set to None in an implementation class and the
  behavior will be as if the method is not defined at all.
  (Previously, this mechanism existed only for __hash__, to make
  mutable classes unhashable.)  Code contributed by Andrew Barnert and
  Ivan Levkivskyi.

8 years agoMerge 3.5 (fix raise)
Victor Stinner [Thu, 18 Aug 2016 16:14:15 +0000 (18:14 +0200)]
Merge 3.5 (fix raise)

8 years agoFix SystemError in "raise" statement
Victor Stinner [Thu, 18 Aug 2016 16:13:10 +0000 (18:13 +0200)]
Fix SystemError in "raise" statement

Issue #27558: Fix a SystemError in the implementation of "raise" statement.
In a brand new thread, raise a RuntimeError since there is no active
exception to reraise.

Patch written by Xiang Zhang.

8 years agoIssue #16764: Move NEWS entry to correct section and remove too strict test.
Serhiy Storchaka [Thu, 18 Aug 2016 06:14:47 +0000 (09:14 +0300)]
Issue #16764: Move NEWS entry to correct section and remove too strict test.

8 years agoIssue #24773: Include Tallinn 1999-10-31 transition in tests.
Alexander Belopolsky [Wed, 17 Aug 2016 23:56:17 +0000 (19:56 -0400)]
Issue #24773: Include Tallinn 1999-10-31 transition in tests.

Does not appear to be a problem anymore and I cannot figure
out why it was skipped in the first place.

8 years agoIssue #27594: Prevent assertion error when running test_ast with coverage
Ned Deily [Wed, 17 Aug 2016 21:18:33 +0000 (17:18 -0400)]
Issue #27594: Prevent assertion error when running test_ast with coverage
enabled: ensure code object has a valid first line number.
Patch suggested by Ivan Levkivskyi.

8 years agoIssue #27786: Simplify x_sub()
Victor Stinner [Wed, 17 Aug 2016 17:48:33 +0000 (19:48 +0200)]
Issue #27786: Simplify x_sub()

The z variable is known to be a fresh number which cannot be shared, Py_SIZE()
can be used directly to negate the number.

8 years agoCloses #9998: Allowed find_library to search additional locations for libraries.
Vinay Sajip [Wed, 17 Aug 2016 15:20:07 +0000 (16:20 +0100)]
Closes #9998: Allowed find_library to search additional locations for libraries.

8 years agoMerge with 3.5
Zachary Ware [Wed, 17 Aug 2016 14:52:32 +0000 (09:52 -0500)]
Merge with 3.5

8 years agoUse sys.version_info, not sys.version.
Zachary Ware [Wed, 17 Aug 2016 14:51:20 +0000 (09:51 -0500)]
Use sys.version_info, not sys.version.

sys.version[0] gives a string, which fails > comparison with 2.
Reported by Arne Maximilian Richter on docs@

8 years agoregrtest: add a summary of the summary, "Result: xxx"
Victor Stinner [Wed, 17 Aug 2016 14:12:16 +0000 (16:12 +0200)]
regrtest: add a summary of the summary, "Result: xxx"

It's sometimes hard to check quickly if tests succeeded, failed or something
bad happened. I added a final "Result: xxx" line which summarizes all outputs
into a single line, written at the end (it should always be the last line of
the output).

8 years agoregrtest: set interrupted to True if re-run is interrupted
Victor Stinner [Wed, 17 Aug 2016 14:00:12 +0000 (16:00 +0200)]
regrtest: set interrupted to True if re-run is interrupted

8 years agoregrtest: add newlines in output for readability
Victor Stinner [Wed, 17 Aug 2016 13:42:21 +0000 (15:42 +0200)]
regrtest: add newlines in output for readability

8 years agoMerge 3.5 (socket.__all__)
Victor Stinner [Wed, 17 Aug 2016 12:40:45 +0000 (14:40 +0200)]
Merge 3.5 (socket.__all__)

8 years agoIssue #27698: Add socketpair to socket.__all__ on Windows
Victor Stinner [Wed, 17 Aug 2016 12:40:08 +0000 (14:40 +0200)]
Issue #27698: Add socketpair to socket.__all__ on Windows

8 years agoNull merge
Victor Stinner [Wed, 17 Aug 2016 12:04:19 +0000 (14:04 +0200)]
Null merge

8 years agoIssue #27726: Fix "make tags"
Victor Stinner [Wed, 17 Aug 2016 12:00:58 +0000 (14:00 +0200)]
Issue #27726: Fix "make tags"

* Memove -t option of ctags. The option was kept for backward compatibility,
  but it was completly removed recently. Patch written by Stéphane Wirtel.
* Set locale to C to call sort. vim expects that the tags file is sorted using
  english collation, so it fails if the locale is french for example. Use
  LC_ALL=C to force english sorting order. .

8 years agoFix "make tags": set locale to C to call sort
Victor Stinner [Wed, 17 Aug 2016 11:58:12 +0000 (13:58 +0200)]
Fix "make tags": set locale to C to call sort

vim expects that the tags file is sorted using english collation, so it fails
if the locale is french for example. Use LC_ALL=C to force english sorting
order. Issue #27726.

8 years ago"make tags": remove -t option of ctags
Victor Stinner [Wed, 17 Aug 2016 11:51:52 +0000 (13:51 +0200)]
"make tags": remove -t option of ctags

The option was kept for backward compatibility, but it was completly removed
recently. Patch written by Stéphane Wirtel.

8 years agoMerge 3.5 (script_helper)
Victor Stinner [Wed, 17 Aug 2016 10:38:35 +0000 (12:38 +0200)]
Merge 3.5 (script_helper)

8 years agoscript_helper: kill the subprocess on error
Victor Stinner [Wed, 17 Aug 2016 10:29:58 +0000 (12:29 +0200)]
script_helper: kill the subprocess on error

If Popen.communicate() raises an exception, kill the child process to not leave
a running child process in background and maybe create a zombi process.

This change fixes a ResourceWarning in Python 3.6 when unit tests are
interrupted by CTRL+c.

8 years agoregrtest: nicer output for durations
Victor Stinner [Wed, 17 Aug 2016 10:22:52 +0000 (12:22 +0200)]
regrtest: nicer output for durations

Use milliseconds and minutes units, not only seconds.

8 years agoTests: add --slowest option to buildbots
Victor Stinner [Wed, 17 Aug 2016 09:27:40 +0000 (11:27 +0200)]
Tests: add --slowest option to buildbots

Display the top 10 slowest tests.

8 years agoregrtest: rename --slow option to --slowest
Victor Stinner [Wed, 17 Aug 2016 09:25:43 +0000 (11:25 +0200)]
regrtest: rename --slow option to --slowest

Thanks to optparse, --slow syntax still works ;-)

8 years agoFix typo in test_time.py
Victor Stinner [Wed, 17 Aug 2016 09:07:21 +0000 (11:07 +0200)]
Fix typo in test_time.py

8 years agoMinor readability tweak
Raymond Hettinger [Wed, 17 Aug 2016 07:46:48 +0000 (00:46 -0700)]
Minor readability tweak

8 years agomerge 3.5 (#27783)
Benjamin Peterson [Wed, 17 Aug 2016 06:37:42 +0000 (23:37 -0700)]
merge 3.5 (#27783)

8 years agomerge 3.4 (#27783)
Benjamin Peterson [Wed, 17 Aug 2016 06:37:33 +0000 (23:37 -0700)]
merge 3.4 (#27783)

8 years agomerge 3.3 (#27783)
Benjamin Peterson [Wed, 17 Aug 2016 06:36:20 +0000 (23:36 -0700)]
merge 3.3 (#27783)

8 years agorearrange methodcaller_new so that the main error case does not cause uninitialized...
Benjamin Peterson [Wed, 17 Aug 2016 06:35:35 +0000 (23:35 -0700)]
rearrange methodcaller_new so that the main error case does not cause uninitialized memory usage (closes #27783)

8 years agoUse Py_ssize_t in _PyEval_EvalCodeWithName()
Victor Stinner [Tue, 16 Aug 2016 21:39:42 +0000 (23:39 +0200)]
Use Py_ssize_t in _PyEval_EvalCodeWithName()

Issue #27128, #18295: replace int type with Py_ssize_t for index variables used
for positional arguments. It should help to avoid integer overflow and help to
emit better machine code for "i++" (no trap needed for overflow).

Make also the total_args variable constant.

8 years agoIssue #27128: Cleanup _PyEval_EvalCodeWithName()
Victor Stinner [Tue, 16 Aug 2016 21:40:29 +0000 (23:40 +0200)]
Issue #27128: Cleanup _PyEval_EvalCodeWithName()

* Add comments
* Add empty lines for readability
* PEP 7 style for if block
* Remove useless assert(globals != NULL); (globals is tested a few lines
  before)

8 years agoIssue #27181: Skip tests known to fail until a fix is found
Victor Stinner [Tue, 16 Aug 2016 20:22:21 +0000 (22:22 +0200)]
Issue #27181: Skip tests known to fail until a fix is found

8 years agoAdd cross-reference to typing.NamedTuple. Doctest two more examples.
Raymond Hettinger [Tue, 16 Aug 2016 20:13:17 +0000 (13:13 -0700)]
Add cross-reference to typing.NamedTuple.  Doctest two more examples.

8 years agoAdd a missing #
Brett Cannon [Tue, 16 Aug 2016 20:11:00 +0000 (13:11 -0700)]
Add a missing #

8 years agofix hyperlink
Ethan Furman [Tue, 16 Aug 2016 19:29:31 +0000 (12:29 -0700)]
fix hyperlink

8 years agomerge
Raymond Hettinger [Tue, 16 Aug 2016 17:59:21 +0000 (10:59 -0700)]
merge

8 years agoRemove duplicate of the entry in the seealso section
Raymond Hettinger [Tue, 16 Aug 2016 17:59:04 +0000 (10:59 -0700)]
Remove duplicate of the entry in the seealso section

8 years agoIssue #25628: Make namedtuple "rename" and "verbose" parameters keyword-only.
Raymond Hettinger [Tue, 16 Aug 2016 17:55:43 +0000 (10:55 -0700)]
Issue #25628:  Make namedtuple "rename" and "verbose" parameters keyword-only.

8 years agoIssue #27776: dev_urandom(raise=0) now closes the file descriptor on error
Victor Stinner [Tue, 16 Aug 2016 16:27:44 +0000 (18:27 +0200)]
Issue #27776: dev_urandom(raise=0) now closes the file descriptor on error

8 years agoIssue #27776: Cleanup random.c
Victor Stinner [Tue, 16 Aug 2016 16:46:38 +0000 (18:46 +0200)]
Issue #27776: Cleanup random.c

Merge dev_urandom_python() and dev_urandom_noraise() functions to reduce code
duplication.

8 years agoIssue #27776: _PyRandom_Init() doesn't call PyErr_CheckSignals() anymore
Victor Stinner [Tue, 16 Aug 2016 13:19:09 +0000 (15:19 +0200)]
Issue #27776: _PyRandom_Init() doesn't call PyErr_CheckSignals() anymore

Modify py_getrandom() to not call PyErr_CheckSignals() if raise is zero.
_PyRandom_Init() is called very early in the Python initialization, so it's
safer to not call PyErr_CheckSignals().

8 years agoIssue #27776: Cleanup random.c
Victor Stinner [Tue, 16 Aug 2016 13:23:58 +0000 (15:23 +0200)]
Issue #27776: Cleanup random.c

* Add pyurandom() helper function to factorize the code
* don't call Py_FatalError() in helper functions, but only in _PyRandom_Init()
  if pyurandom() failed, to uniformize the code

8 years agoIssue #26750: use inspect.isdatadescriptor instead of our own
Gregory P. Smith [Tue, 16 Aug 2016 06:56:32 +0000 (23:56 -0700)]
Issue #26750: use inspect.isdatadescriptor instead of our own
_is_data_descriptor().

8 years agoIssue #26750: use inspect.isdatadescriptor instead of our own
Gregory P. Smith [Tue, 16 Aug 2016 06:23:40 +0000 (23:23 -0700)]
Issue #26750: use inspect.isdatadescriptor instead of our own
_is_data_descriptor().

8 years agoMerge with 3.5
Terry Jan Reedy [Tue, 16 Aug 2016 05:44:31 +0000 (01:44 -0400)]
Merge with 3.5

8 years agoIssue #27611: Don't import volatile attribute.
Terry Jan Reedy [Tue, 16 Aug 2016 05:44:12 +0000 (01:44 -0400)]
Issue #27611: Don't import volatile attribute.

8 years agoAdd versionadded tags for (c)math.tau.
Georg Brandl [Tue, 16 Aug 2016 05:08:46 +0000 (07:08 +0200)]
Add versionadded tags for (c)math.tau.

8 years agomerge 3.5 (#27774)
Benjamin Peterson [Tue, 16 Aug 2016 05:05:16 +0000 (22:05 -0700)]
merge 3.5 (#27774)

8 years agomerge 3.4 (#27774)
Benjamin Peterson [Tue, 16 Aug 2016 05:05:06 +0000 (22:05 -0700)]
merge 3.4 (#27774)

8 years agomerge 3.3 (#27774)
Benjamin Peterson [Tue, 16 Aug 2016 05:03:44 +0000 (22:03 -0700)]
merge 3.3 (#27774)

8 years agodo not decref value borrowed from list (closes #27774)
Benjamin Peterson [Tue, 16 Aug 2016 05:01:41 +0000 (22:01 -0700)]
do not decref value borrowed from list (closes #27774)

8 years agomerge 3.5 (#27773)
Benjamin Peterson [Tue, 16 Aug 2016 04:56:11 +0000 (21:56 -0700)]
merge 3.5 (#27773)

8 years agofix corner cases in the management of server_hostname (closes #27773)
Benjamin Peterson [Tue, 16 Aug 2016 04:55:37 +0000 (21:55 -0700)]
fix corner cases in the management of server_hostname (closes #27773)

8 years agomerge 3.5
Benjamin Peterson [Tue, 16 Aug 2016 04:44:06 +0000 (21:44 -0700)]
merge 3.5

8 years agomerge 3.4
Benjamin Peterson [Tue, 16 Aug 2016 04:43:57 +0000 (21:43 -0700)]
merge 3.4

8 years agofail when negative values are passed to instr()
Benjamin Peterson [Tue, 16 Aug 2016 04:40:14 +0000 (21:40 -0700)]
fail when negative values are passed to instr()

8 years agoIssue #27736: Improve the existing embedded interpreter init/fini test
Ned Deily [Tue, 16 Aug 2016 04:17:42 +0000 (00:17 -0400)]
Issue #27736: Improve the existing embedded interpreter init/fini test
by increasing the number of iterations.  That appears sufficient to
expose the ref count problem fixed in this issue.
Patch suggested by Xiang Zhang

8 years agoIssue #27611, #24137: Only change tkinter when easily restored.
Terry Jan Reedy [Tue, 16 Aug 2016 04:10:14 +0000 (00:10 -0400)]
Issue #27611, #24137: Only change tkinter when easily restored.

8 years agoMerge from releasing branch
Ned Deily [Tue, 16 Aug 2016 02:41:17 +0000 (22:41 -0400)]
Merge from releasing branch

8 years agoStart 3.6.0bb1
Ned Deily [Tue, 16 Aug 2016 02:32:43 +0000 (22:32 -0400)]
Start 3.6.0bb1

8 years agoAdds missing file to installer.
Steve Dower [Tue, 16 Aug 2016 01:58:29 +0000 (18:58 -0700)]
Adds missing file to installer.

8 years agoIssue #26823: fix traceback abbreviation docs
Nick Coghlan [Tue, 16 Aug 2016 00:58:14 +0000 (10:58 +1000)]
Issue #26823: fix traceback abbreviation docs

- be clear builtin traceback display was also updated
- show example output in What's New
- fix versionadded markup

8 years agoAdd docs for typing.AnyStr and typing.Text. By Michael Lee. (Merge 3.5->3.6)
Guido van Rossum [Mon, 15 Aug 2016 22:08:11 +0000 (15:08 -0700)]
Add docs for typing.AnyStr and typing.Text. By Michael Lee. (Merge 3.5->3.6)

8 years agoFix typo in Misc/NEWS.
Guido van Rossum [Mon, 15 Aug 2016 22:07:25 +0000 (15:07 -0700)]
Fix typo in Misc/NEWS.

8 years agoAdd docs for typing.AnyStr and typing.Text. By Michael Lee.
Guido van Rossum [Mon, 15 Aug 2016 22:06:38 +0000 (15:06 -0700)]
Add docs for typing.AnyStr and typing.Text. By Michael Lee.

8 years agoAdded tag v3.6.0a4 for changeset 017cf260936b
Ned Deily [Mon, 15 Aug 2016 20:21:52 +0000 (16:21 -0400)]
Added tag v3.6.0a4 for changeset 017cf260936b

8 years agoVersion bump for 3.6.0a4 v3.6.0a4
Ned Deily [Mon, 15 Aug 2016 20:21:29 +0000 (16:21 -0400)]
Version bump for 3.6.0a4

8 years agoUpdate pydoc topics for 3.6.0a4
Ned Deily [Mon, 15 Aug 2016 20:12:59 +0000 (16:12 -0400)]
Update pydoc topics for 3.6.0a4

8 years agoIssue #27736: Prevent segfault after interpreter re-initialization due
Ned Deily [Mon, 15 Aug 2016 18:40:38 +0000 (14:40 -0400)]
Issue #27736: Prevent segfault after interpreter re-initialization due
to ref count problem introduced in code for Issue #27038 in 3.6.0a3.
Patch by Xiang Zhang.

8 years agoIssue #23968: Make OS X installer build script aware of renamed platform
Ned Deily [Mon, 15 Aug 2016 18:37:14 +0000 (14:37 -0400)]
Issue #23968: Make OS X installer build script aware of renamed platform
directory and sysconfigdata file name.  This is a workaround for 3.6.0a4
pending resolution of other #23968 items.

8 years agoIssue #12345: Add mathemathcal constant tau to math and cmath.
Guido van Rossum [Mon, 15 Aug 2016 16:12:52 +0000 (09:12 -0700)]
Issue #12345: Add mathemathcal constant tau to math and cmath.

Patch by Lisa Roach. See also PEP 628.

8 years agoIssue #10910: merge from 3.5
Ned Deily [Mon, 15 Aug 2016 07:23:23 +0000 (03:23 -0400)]
Issue #10910: merge from 3.5

8 years agoIssue #10910: Update FreedBSD version checks for the ctype UTF-8 workaround.
Ned Deily [Mon, 15 Aug 2016 07:08:18 +0000 (03:08 -0400)]
Issue #10910: Update FreedBSD version checks for the ctype UTF-8 workaround.
The original problem has been fixed in newer versions of FreeBSD.
Patch by Dimitry Andric of the FreeBSD project.

8 years agoIssue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
Ned Deily [Mon, 15 Aug 2016 07:07:26 +0000 (03:07 -0400)]
Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
Patch by Ronald Oussoren.

8 years agoIssue #16764: Support keyword arguments to zlib.decompress(). Patch by
Serhiy Storchaka [Mon, 15 Aug 2016 07:06:16 +0000 (10:06 +0300)]
Issue #16764: Support keyword arguments to zlib.decompress().  Patch by
Xiang Zhang.

8 years agoIssue #27704: Optimized creating bytes and bytearray from byte-like objects
Serhiy Storchaka [Mon, 15 Aug 2016 06:46:07 +0000 (09:46 +0300)]
Issue #27704: Optimized creating bytes and bytearray from byte-like objects
and iterables.  Speed up to 3 times for short objects.  Original patch by
Naoki Inada.

8 years agoIssue #26823: Abbreviate recursive tracebacks
Nick Coghlan [Mon, 15 Aug 2016 03:11:34 +0000 (13:11 +1000)]
Issue #26823: Abbreviate recursive tracebacks

Large sections of repeated lines in tracebacks are now abbreviated as
"[Previous line repeated {count} more times]" by both the traceback
module and the builtin traceback rendering.

Patch by Emanuel Barry.

8 years agoUpdate Misc/NEWS.
Steven D'Aprano [Mon, 15 Aug 2016 01:21:08 +0000 (11:21 +1000)]
Update Misc/NEWS.

8 years agomerge 3.5
Donald Stufft [Sun, 14 Aug 2016 20:10:31 +0000 (16:10 -0400)]
merge 3.5

8 years agomerge 3.4
Donald Stufft [Sun, 14 Aug 2016 20:10:17 +0000 (16:10 -0400)]
merge 3.4

8 years agoUpdate setuptools/pip to 25.2.0/8.1.2
Donald Stufft [Sun, 14 Aug 2016 20:09:56 +0000 (16:09 -0400)]
Update setuptools/pip to 25.2.0/8.1.2

8 years agoIssue27573 code.interact prints a message when exiting.
Steven D'Aprano [Sun, 14 Aug 2016 18:14:33 +0000 (04:14 +1000)]
Issue27573 code.interact prints a message when exiting.

8 years agoAdd versionadded tag to docs for timeit.autorange
Steven D'Aprano [Sun, 14 Aug 2016 16:47:49 +0000 (02:47 +1000)]
Add versionadded tag to docs for timeit.autorange

8 years agoIssue6422 add autorange method to timeit.Timer
Steven D'Aprano [Sun, 14 Aug 2016 15:27:03 +0000 (01:27 +1000)]
Issue6422 add autorange method to timeit.Timer

8 years agoIssue #27574: Decreased an overhead of parsing keyword arguments in functions
Serhiy Storchaka [Sun, 14 Aug 2016 07:52:18 +0000 (10:52 +0300)]
Issue #27574: Decreased an overhead of parsing keyword arguments in functions
implemented with using Argument Clinic.

8 years agomerge 3.5 (closes #27760)
Benjamin Peterson [Sun, 14 Aug 2016 01:37:20 +0000 (18:37 -0700)]
merge 3.5 (closes #27760)

8 years agomerge 3.4 (closes #27760)
Benjamin Peterson [Sun, 14 Aug 2016 01:37:12 +0000 (18:37 -0700)]
merge 3.4 (closes #27760)

8 years agomerge 3.3 (closes #27760)
Benjamin Peterson [Sun, 14 Aug 2016 01:36:55 +0000 (18:36 -0700)]
merge 3.3 (closes #27760)

8 years agofix possible integer overflow in binascii.b2a_qp (closes #27760)
Benjamin Peterson [Sun, 14 Aug 2016 01:33:33 +0000 (18:33 -0700)]
fix possible integer overflow in binascii.b2a_qp (closes #27760)

Reported by Thomas E. Hybel

8 years agomerge 3.5
Benjamin Peterson [Sun, 14 Aug 2016 01:21:32 +0000 (18:21 -0700)]
merge 3.5

8 years agomerge 3.4
Benjamin Peterson [Sun, 14 Aug 2016 01:21:16 +0000 (18:21 -0700)]
merge 3.4

8 years agodo not allow reading negative values with getstr()
Benjamin Peterson [Sun, 14 Aug 2016 01:15:28 +0000 (18:15 -0700)]
do not allow reading negative values with getstr()

8 years agomerge 3.5 (closes #27758)
Benjamin Peterson [Sun, 14 Aug 2016 00:22:18 +0000 (17:22 -0700)]
merge 3.5 (closes #27758)

8 years agomerge 3.4 (closes #27758)
Benjamin Peterson [Sun, 14 Aug 2016 00:21:54 +0000 (17:21 -0700)]
merge 3.4 (closes #27758)

8 years agomerge 3.3 (#27758)
Benjamin Peterson [Sun, 14 Aug 2016 00:21:22 +0000 (17:21 -0700)]
merge 3.3 (#27758)

8 years agocheck for overflow in join_append_data (closes #27758)
Benjamin Peterson [Sun, 14 Aug 2016 00:17:06 +0000 (17:17 -0700)]
check for overflow in join_append_data (closes #27758)

Reported by Thomas E. Hybel

8 years agoMerge: #27753: fix typo (name->named).
R David Murray [Sat, 13 Aug 2016 18:47:54 +0000 (14:47 -0400)]
Merge: #27753: fix typo (name->named).

8 years ago#27753: fix typo (name->named).
R David Murray [Sat, 13 Aug 2016 18:47:18 +0000 (14:47 -0400)]
#27753: fix typo (name->named).

8 years agomerge
Raymond Hettinger [Sat, 13 Aug 2016 18:15:59 +0000 (11:15 -0700)]
merge