]> granicus.if.org Git - python/log
python
7 years agoMove exc state to generator. Fixes bpo-25612 (#1773)
Mark Shannon [Sun, 22 Oct 2017 21:41:51 +0000 (22:41 +0100)]
Move exc state to generator. Fixes bpo-25612 (#1773)

Move exception state information from frame objects to coroutine (generator/thread) object where it belongs.

7 years agobpo-20825: Containment test for ip_network in ip_network.
Cheryl Sabella [Sun, 22 Oct 2017 21:39:49 +0000 (17:39 -0400)]
bpo-20825: Containment test for ip_network in ip_network.

7 years agobpo-31572: Get rid of using _PyObject_HasAttrId() in pickle. (#3729)
Serhiy Storchaka [Sun, 22 Oct 2017 18:31:34 +0000 (21:31 +0300)]
bpo-31572: Get rid of using _PyObject_HasAttrId() in pickle. (#3729)

7 years agobpo-31653: Don't release the GIL if we can acquire a multiprocessing semaphore immedi...
Antoine Pitrou [Sun, 22 Oct 2017 11:10:46 +0000 (13:10 +0200)]
bpo-31653: Don't release the GIL if we can acquire a multiprocessing semaphore immediately (#4078)

7 years agobpo-28286: Add tests for the mode argument of GzipFile. (#4074)
Serhiy Storchaka [Sun, 22 Oct 2017 10:18:21 +0000 (13:18 +0300)]
bpo-28286: Add tests for the mode argument of GzipFile. (#4074)

7 years agobpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed or None...
Antoine Pitrou [Sun, 22 Oct 2017 09:40:31 +0000 (11:40 +0200)]
bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed or None. (#4073)

7 years agoFix bytes warnings in test_struct (added in bpo-29802). (#4068)
Serhiy Storchaka [Sat, 21 Oct 2017 18:59:23 +0000 (21:59 +0300)]
Fix bytes warnings in test_struct (added in bpo-29802). (#4068)

7 years agobpo-31781: Prevent crashes when calling methods of an uninitialized zipimport.zipimpo...
Oren Milman [Fri, 20 Oct 2017 20:42:35 +0000 (23:42 +0300)]
bpo-31781: Prevent crashes when calling methods of an uninitialized zipimport.zipimporter object (GH-3986)

7 years agobpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058)
Serhiy Storchaka [Fri, 20 Oct 2017 14:08:15 +0000 (17:08 +0300)]
bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058)

and in codecs.escape_decode() when decode an escaped non-ascii byte.

7 years agobpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)
Antoine Pitrou [Thu, 19 Oct 2017 19:46:40 +0000 (21:46 +0200)]
bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)

* bpo-31819: Add AbstractEventLoop.sock_recv_into()

* Add NEWS

* Add doc

7 years agobpo-31632: fix set_protocol() in _SSLProtocolTransport (#3817) (#3817)
jlacoline [Thu, 19 Oct 2017 17:49:57 +0000 (19:49 +0200)]
bpo-31632: fix set_protocol() in _SSLProtocolTransport (#3817) (#3817)

7 years agobpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (#4044)
Łukasz Langa [Thu, 19 Oct 2017 17:24:55 +0000 (10:24 -0700)]
bpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (#4044)

This used to be the case on Python 2.  Commit
212b590e118e3650b596917021ed9612a918180b changed the implementation for Python
3, making the `log()` method of LogAdapter call `logger._log()` directly.  This
makes nested log adapters not execute their ``process()`` method.  This patch
fixes the issue.

Also, now proxying `name`, too, to make `repr()` work with nested log adapters.

New tests added.

7 years agoAdd NEWS entry for opcode tracing change. (GH-4045)
George King [Thu, 19 Oct 2017 07:41:59 +0000 (00:41 -0700)]
Add NEWS entry for opcode tracing change. (GH-4045)

7 years agodrop unused configure check for pthread_atfork (#4046)
Benjamin Peterson [Thu, 19 Oct 2017 06:39:01 +0000 (23:39 -0700)]
drop unused configure check for pthread_atfork (#4046)

7 years agoMove opcode tracing to occur after the possible update to f_lineno. (GH-3798)
George King [Thu, 19 Oct 2017 00:44:22 +0000 (17:44 -0700)]
Move opcode tracing to occur after the possible update to f_lineno. (GH-3798)

7 years agobpo-31457: Make the `LoggerAdapter.manager` property settable (#4042)
Łukasz Langa [Thu, 19 Oct 2017 00:28:51 +0000 (17:28 -0700)]
bpo-31457: Make the `LoggerAdapter.manager` property settable (#4042)

Due to a bug in the initial fix, the setter was in fact creating a different
property.  This is now fixed.

7 years agoUpdate TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. (GH-3998)
Ron [Wed, 18 Oct 2017 17:01:23 +0000 (20:01 +0300)]
Update TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. (GH-3998)

The word "difference" from missing the sentence.
This clarifies that it compares the difference between the two objects.

7 years agobpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functio...
Pablo Galindo [Wed, 18 Oct 2017 07:13:09 +0000 (08:13 +0100)]
bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functions (#4026)

Fix timeout rounding in time.sleep(), threading.Lock.acquire() and
socket.socket.settimeout() to round correctly negative timeouts between -1.0 and
0.0. The functions now block waiting for events as expected. Previously, the
call was incorrectly non-blocking.

7 years agoAdd Code of Conduct to .github folder. (GH-4029)
Mariatta [Wed, 18 Oct 2017 02:44:20 +0000 (19:44 -0700)]
Add Code of Conduct to .github folder. (GH-4029)

7 years agobpo-30928: Update idlelib/NEWS.txt to 2017 Oct 17. (#4025)
Terry Jan Reedy [Tue, 17 Oct 2017 23:02:49 +0000 (19:02 -0400)]
bpo-30928: Update idlelib/NEWS.txt to 2017 Oct 17. (#4025)

7 years agobpo-13802: Use non-Latin characters in IDLE's Font settings sample. (#3960)
Terry Jan Reedy [Tue, 17 Oct 2017 22:56:16 +0000 (18:56 -0400)]
bpo-13802: Use non-Latin characters in IDLE's Font settings sample. (#3960)

Even if one selects a font that defines a limited subset of the unicode
Basic Multilingual Plane, tcl/tk will use other fonts that define a
character. The expanded example give users of non-Latin characters
a better idea of what they might see in the IDLE shell and editors.

To make room for the expanded sample, frames on the Font tab are
re-arranged. The Font/Tabs help explains a bit about the additions.

7 years agotime.clock() now emits a DeprecationWarning (GH-4020)
Victor Stinner [Tue, 17 Oct 2017 21:46:45 +0000 (14:46 -0700)]
time.clock() now emits a DeprecationWarning (GH-4020)

bpo-31803: time.clock() and time.get_clock_info('clock') now emit a
DeprecationWarning warning.

Replace time.clock() with time.perf_counter() in tests and demos.

Remove also hasattr(time, 'monotonic') in test_time since time.monotonic()
is now always available since Python 3.5.

7 years agobpo-28603: Fix formatting tracebacks for unhashable exceptions (#4014)
Zane Bitter [Tue, 17 Oct 2017 21:29:39 +0000 (17:29 -0400)]
bpo-28603: Fix formatting tracebacks for unhashable exceptions (#4014)

7 years agobpo-31799: Make module.__spec__ more discoverable (#4010)
Barry Warsaw [Tue, 17 Oct 2017 19:52:38 +0000 (15:52 -0400)]
bpo-31799: Make module.__spec__ more discoverable (#4010)

bpo-31799: Make module.__spec__ more discoverable

7 years agobpo-31334: Fix timeout in select.poll.poll() (GH-3277)
Riccardo Coccioli [Tue, 17 Oct 2017 19:45:07 +0000 (21:45 +0200)]
bpo-31334: Fix timeout in select.poll.poll() (GH-3277)

Always pass -1, or INFTIM where defined, to the poll() system call when
a negative timeout is passed to the poll.poll([timeout]) method in the
select module. Various OSes throw an error with arbitrary negative
values.

7 years agobpo-31786: Make functions in the select module blocking when timeout is a small negat...
Pablo Galindo [Tue, 17 Oct 2017 14:14:41 +0000 (15:14 +0100)]
bpo-31786: Make functions in the select module blocking when timeout is a small negative value. (#4003)

7 years agobpo-30541: Add new method to seal mocks (GH61923)
Mario Corchero [Tue, 17 Oct 2017 11:35:11 +0000 (12:35 +0100)]
bpo-30541: Add new method to seal mocks (GH61923)

The new method allows the developer to control when to stop the
feature of mocks that automagically creates new mocks when accessing
an attribute that was not declared before

Signed-off-by: Mario Corchero <mariocj89@gmail.com>
7 years agopost 3.7.0a2 development
Ned Deily [Tue, 17 Oct 2017 06:10:44 +0000 (02:10 -0400)]
post 3.7.0a2 development

7 years agoBump to 3.7.0a2 v3.7.0a2
Ned Deily [Tue, 17 Oct 2017 03:50:50 +0000 (23:50 -0400)]
Bump to 3.7.0a2

7 years agoUpdate NEWS and topics for 3.7.0a2
Ned Deily [Tue, 17 Oct 2017 03:41:55 +0000 (23:41 -0400)]
Update NEWS and topics for 3.7.0a2

7 years agobpo-31558: Update NEWS and ACKS (#4013)
Łukasz Langa [Mon, 16 Oct 2017 21:39:08 +0000 (14:39 -0700)]
bpo-31558: Update NEWS and ACKS (#4013)

7 years agobpo-31558: Add gc.freeze() (#3705)
brainfvck [Mon, 16 Oct 2017 19:49:41 +0000 (12:49 -0700)]
bpo-31558: Add gc.freeze() (#3705)

Freeze all the objects tracked by gc - move them to a permanent generation
and ignore all the future collections. This can be used before a POSIX
fork() call to make the gc copy-on-write friendly or to speed up collection.

7 years agobpo-31773: _PyTime_GetPerfCounter() uses _PyTime_t (GH-3983)
Victor Stinner [Mon, 16 Oct 2017 15:44:31 +0000 (08:44 -0700)]
bpo-31773: _PyTime_GetPerfCounter() uses _PyTime_t (GH-3983)

* Rewrite win_perf_counter() to only use integers internally.
* Add _PyTime_MulDiv() which compute "ticks * mul / div"
  in two parts (int part and remaining) to prevent integer overflow.
* Clock frequency is checked at initialization for integer overflow.
* Enhance also pymonotonic() to reduce the precision loss on macOS
  (mach_absolute_time() clock).

7 years agobpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978)
Pablo Galindo [Mon, 16 Oct 2017 08:24:22 +0000 (09:24 +0100)]
bpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978)

7 years agobpo-31792: Restore os.environ in test_buffer when import numpy. (#4007)
Serhiy Storchaka [Mon, 16 Oct 2017 07:38:14 +0000 (10:38 +0300)]
bpo-31792: Restore os.environ in test_buffer when import numpy. (#4007)

7 years agocompletly -> completely (#3999) (closes bpo-31788)
Semen Zhydenko [Sun, 15 Oct 2017 19:28:31 +0000 (21:28 +0200)]
completly -> completely (#3999) (closes bpo-31788)

7 years agobpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993)
vyas45 [Sun, 15 Oct 2017 07:31:36 +0000 (00:31 -0700)]
bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993)

7 years agobpo-31780: Fix incorrect error message for ',x', ',b', ',o' specs (#4002)
Dargor [Sun, 15 Oct 2017 03:41:13 +0000 (04:41 +0100)]
bpo-31780: Fix incorrect error message for ',x', ',b', ',o' specs (#4002)

Patch by Pablo.

7 years agobpo-25588: Document autotest in idle_test/README.txt. (#4000)
Terry Jan Reedy [Sun, 15 Oct 2017 01:31:14 +0000 (21:31 -0400)]
bpo-25588: Document autotest in idle_test/README.txt. (#4000)

Follow-up to Victor's patch that enabled autotest to run in IDLE's Shell.

7 years agobpo-31757: Make Fibonacci examples consistent (#3991)
Raymond Hettinger [Sat, 14 Oct 2017 14:36:08 +0000 (07:36 -0700)]
bpo-31757: Make Fibonacci examples consistent (#3991)

7 years agobpo-31672: doc: Remove one sentence from library/string.rst (GH-3990)
INADA Naoki [Sat, 14 Oct 2017 12:22:41 +0000 (21:22 +0900)]
bpo-31672: doc: Remove one sentence from library/string.rst (GH-3990)

This sentence is removed while backporting to 3.6 branch.
See https://github.com/python/cpython/pull/3982#discussion_r144555768

7 years agobpo-31714: Improved regular expression documentation. (#3907)
Serhiy Storchaka [Sat, 14 Oct 2017 08:14:26 +0000 (11:14 +0300)]
bpo-31714: Improved regular expression documentation. (#3907)

7 years agobpo-30807: signal.setitimer() now uses _PyTime API (GH-3865)
Victor Stinner [Fri, 13 Oct 2017 20:49:43 +0000 (13:49 -0700)]
bpo-30807: signal.setitimer() now uses _PyTime API (GH-3865)

The _PyTime API handles detects overflow and is well tested.

Document that the signal will only be sent once if internal is equal
to zero.

7 years agobpo-31676: Fix test_imp.test_load_source() side effect (#3871)
Victor Stinner [Fri, 13 Oct 2017 20:47:49 +0000 (13:47 -0700)]
bpo-31676: Fix test_imp.test_load_source() side effect (#3871)

test_load_source() now replaces the current __name__ module with a
temporary module to prevent side effects.

7 years agoos.startfile(): add a C comment on security (#3877)
Victor Stinner [Fri, 13 Oct 2017 20:46:57 +0000 (13:46 -0700)]
os.startfile(): add a C comment on security (#3877)

LoadLibrary("SHELL32") is not vulnerable to DLL hijacking.

7 years agobpo-25588: Fix regrtest when run inside IDLE (#3962)
Victor Stinner [Fri, 13 Oct 2017 19:59:12 +0000 (12:59 -0700)]
bpo-25588: Fix regrtest when run inside IDLE (#3962)

When regrtest in run inside IDLE, sys.stdout and sys.stderr are not
TextIOWrapper objects and have no file descriptor associated:
sys.stderr.fileno() raises io.UnsupportedOperation.

Disable faulthandler and don't replace sys.stdout in that case.

7 years agobpo-28647: Update -u documentation after bpo-30404 (GH-3961)
Berker Peksag [Fri, 13 Oct 2017 12:16:31 +0000 (15:16 +0300)]
bpo-28647: Update -u documentation after bpo-30404 (GH-3961)

7 years agobpo-31672: Fix string.Template accidentally matched non-ASCII identifiers (GH-3872)
INADA Naoki [Fri, 13 Oct 2017 07:02:23 +0000 (16:02 +0900)]
bpo-31672: Fix string.Template accidentally matched non-ASCII identifiers (GH-3872)

Pattern `[a-z]` with `IGNORECASE` flag can match to some non-ASCII characters.

Straightforward solution for this is using `IGNORECASE | ASCII` flag.
But users may subclass `Template` and override only `idpattern`. So we want to
avoid changing `Template.flags`.

So this commit uses local flag `-i` for `idpattern` and change `[a-z]` to `[a-zA-Z]`.

7 years agoImprove test suite customization example (GH-3967)
Berker Peksag [Fri, 13 Oct 2017 03:41:57 +0000 (06:41 +0300)]
Improve test suite customization example (GH-3967)

Reported by John Gamboa on docs@p.o at
https://mail.python.org/pipermail/docs/2017-June/031942.html

7 years agoExclude non-default VENVDIR in Doc builds (#3974)
Ned Deily [Thu, 12 Oct 2017 20:04:57 +0000 (16:04 -0400)]
Exclude non-default VENVDIR in Doc builds (#3974)

7 years agobpo-30058: Fixed buffer overflow in select.kqueue.control(). (#1095)
Serhiy Storchaka [Thu, 12 Oct 2017 19:17:46 +0000 (22:17 +0300)]
bpo-30058: Fixed buffer overflow in select.kqueue.control(). (#1095)

7 years agobpo-31766: restore 3.5 to docs version switchers (#3969)
Ned Deily [Thu, 12 Oct 2017 18:08:43 +0000 (14:08 -0400)]
bpo-31766: restore 3.5 to docs version switchers (#3969)

7 years agobpo-31567: more decorator markup fixes in docs (GH-3959) (#3966)
Éric Araujo [Thu, 12 Oct 2017 16:28:55 +0000 (12:28 -0400)]
bpo-31567: more decorator markup fixes in docs (GH-3959) (#3966)

7 years agobpo-31773: time.perf_counter() uses again double (GH-3964)
Victor Stinner [Thu, 12 Oct 2017 15:51:56 +0000 (08:51 -0700)]
bpo-31773: time.perf_counter() uses again double (GH-3964)

time.clock() and time.perf_counter() now use again C double
internally.

Remove also _PyTime_GetWinPerfCounterWithInfo(): use
_PyTime_GetPerfCounterDoubleWithInfo() instead on Windows.

7 years agobpo-31567: add or fix decorator markup in docs (#3959)
Daisuke Miyakawa [Thu, 12 Oct 2017 14:39:43 +0000 (23:39 +0900)]
bpo-31567: add or fix decorator markup in docs (#3959)

7 years agoCleanup pytime.c (#3955)
Victor Stinner [Wed, 11 Oct 2017 15:11:38 +0000 (08:11 -0700)]
Cleanup pytime.c (#3955)

* Move _PyTime_overflow() at the top
* Move assertion on numerator into _PyTime_ObjectToDenominator()
* PEP 7: add { ... } to if blocks

7 years agobpo-28157: Improvements for the time module documentation (GH-928)
Cheryl Sabella [Wed, 11 Oct 2017 13:29:14 +0000 (09:29 -0400)]
bpo-28157: Improvements for the time module documentation (GH-928)

* Separated functions and constants descriptions in sections.
* Added a note about the limitations of timezone constants.
* Removed redundant lists from the module docstring.

7 years agobpo-31537: Update readline documentation example. (GH-3925)
Brad Smith [Tue, 10 Oct 2017 21:52:58 +0000 (17:52 -0400)]
bpo-31537: Update readline documentation example. (GH-3925)

Change the code example from using `get_history_length` to `get_current_history_length`.

7 years agobpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text...
Oren Milman [Tue, 10 Oct 2017 20:26:24 +0000 (23:26 +0300)]
bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text and Element.tail (#3924)

7 years agobpo-31740: Prevent refleaks when sqlite3.Connection.__init__() is called more than...
Oren Milman [Tue, 10 Oct 2017 19:27:46 +0000 (22:27 +0300)]
bpo-31740: Prevent refleaks when sqlite3.Connection.__init__() is called more than once (GH-3944)

7 years agobpo-31415: Add _PyTime_GetPerfCounter() and use it for -X importtime (#3936)
Victor Stinner [Tue, 10 Oct 2017 09:51:50 +0000 (02:51 -0700)]
bpo-31415: Add _PyTime_GetPerfCounter() and use it for -X importtime (#3936)

* Add _PyTime_GetPerfCounter()
* Use _PyTime_GetPerfCounter() for -X importtime

7 years agoAllow configure to handle PATH elements with spaces (#3935)
Ned Deily [Mon, 9 Oct 2017 17:53:27 +0000 (13:53 -0400)]
Allow configure to handle PATH elements with spaces (#3935)

7 years agobpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929)
Victor Stinner [Mon, 9 Oct 2017 16:52:32 +0000 (09:52 -0700)]
bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929)

bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM
exceptions.

7 years agobpo-31723: Fix refleaks when zipimporter.__init__() is called more than once (GH...
Oren Milman [Mon, 9 Oct 2017 15:06:19 +0000 (18:06 +0300)]
bpo-31723: Fix refleaks when zipimporter.__init__() is called more than once (GH-3919)

7 years agobpo-27867: Add a porting guide for PySlice_GetIndicesEx(). (#1973)
Serhiy Storchaka [Sun, 8 Oct 2017 09:53:34 +0000 (12:53 +0300)]
bpo-27867: Add a porting guide for PySlice_GetIndicesEx(). (#1973)

7 years agobpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always...
Oren Milman [Sun, 8 Oct 2017 08:17:46 +0000 (11:17 +0300)]
bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always return a list (#3840)

7 years agobpo-31642: Restore blocking "from" import by setting None in sys.modules. (#3834)
Serhiy Storchaka [Sun, 8 Oct 2017 07:44:10 +0000 (10:44 +0300)]
bpo-31642: Restore blocking "from" import by setting None in sys.modules. (#3834)

7 years agobpo-31724: Skip test_xmlrpc_net (GH-3921)
Zachary Ware [Sun, 8 Oct 2017 06:31:23 +0000 (01:31 -0500)]
bpo-31724: Skip test_xmlrpc_net (GH-3921)

With the upgrade of buildbot.python.org from Buildbot 0.8.x to 0.9.x,
the xmlrpc interface has been removed.  This test is now skipped until
it can be rewritten to query a suitable substitute.

7 years agobpo-31655: Validate keyword names in SimpleNamespace constructor. (#3909)
Serhiy Storchaka [Sat, 7 Oct 2017 19:59:35 +0000 (22:59 +0300)]
bpo-31655: Validate keyword names in SimpleNamespace constructor. (#3909)

7 years agobpo-31720: msilib documentation, change MsiError into MSIError (GH-3914)
Tzu-ping Chung [Sat, 7 Oct 2017 14:55:00 +0000 (22:55 +0800)]
bpo-31720: msilib documentation, change MsiError into MSIError (GH-3914)

7 years agobpo-31709: Update importlib magic (#3906)
Yury Selivanov [Fri, 6 Oct 2017 14:18:10 +0000 (10:18 -0400)]
bpo-31709: Update importlib magic (#3906)

7 years agoDocument Py_GETENV() (#3890)
Barry Warsaw [Fri, 6 Oct 2017 13:53:48 +0000 (09:53 -0400)]
Document Py_GETENV() (#3890)

7 years agobpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API (GH-1362)
Masayuki Yamamoto [Fri, 6 Oct 2017 10:41:34 +0000 (19:41 +0900)]
bpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API (GH-1362)

See PEP 539 for details.

Highlights of changes:

- Add Thread Specific Storage (TSS) API
- Document the Thread Local Storage (TLS) API as deprecated
- Update code that used TLS API to use TSS API

7 years agobpo-31708: Allow async generator expressions in synchronous functions (#3905)
Yury Selivanov [Fri, 6 Oct 2017 06:58:28 +0000 (02:58 -0400)]
bpo-31708: Allow async generator expressions in synchronous functions (#3905)

7 years agobpo-31709: Drop support for asynchronous __aiter__. (#3903)
Yury Selivanov [Fri, 6 Oct 2017 06:08:57 +0000 (02:08 -0400)]
bpo-31709: Drop support for asynchronous __aiter__. (#3903)

7 years agoweaken pthread_getcpuclockid test (more bpo-31596) (#3904)
Benjamin Peterson [Fri, 6 Oct 2017 05:50:42 +0000 (22:50 -0700)]
weaken pthread_getcpuclockid test (more bpo-31596) (#3904)

There just isn't much we can assert in a portable way.

7 years agocloses bpo-31696: don't mention GCC in sys.version when building with clang (#3891)
Benjamin Peterson [Fri, 6 Oct 2017 04:15:14 +0000 (21:15 -0700)]
closes bpo-31696: don't mention GCC in sys.version when building with clang (#3891)

7 years agobpo-30406: Make async and await proper keywords (#1669)
Jelle Zijlstra [Fri, 6 Oct 2017 03:24:46 +0000 (20:24 -0700)]
bpo-30406: Make async and await proper keywords (#1669)

Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.

7 years agobpo-31523: Reliability improvements to the Windows build files (#3900)
Steve Dower [Thu, 5 Oct 2017 20:35:36 +0000 (13:35 -0700)]
bpo-31523: Reliability improvements to the Windows build files (#3900)

7 years agoPEP 553 built-in breakpoint() function (bpo-31353) (#3355)
Barry Warsaw [Thu, 5 Oct 2017 16:11:18 +0000 (12:11 -0400)]
PEP 553 built-in breakpoint() function (bpo-31353) (#3355)

Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests.  Closes bpo-31353

7 years agobpo-31556: asyncio.wait_for can cancel futures faster with timeout <= 0 (#3703)
Victor K [Thu, 5 Oct 2017 16:04:39 +0000 (19:04 +0300)]
bpo-31556: asyncio.wait_for can cancel futures faster with timeout <= 0 (#3703)

7 years agobpo-31178: Mock os.waitpid() in test_subprocess (#3896)
Victor Stinner [Thu, 5 Oct 2017 13:32:53 +0000 (06:32 -0700)]
bpo-31178: Mock os.waitpid() in test_subprocess (#3896)

Fix test_exception_errpipe_bad_data() and
test_exception_errpipe_normal() of test_subprocess: mock os.waitpid()
to avoid calling the real os.waitpid(0, 0) which is an unexpected
side effect of the test.

7 years agobpo-31671: re: Convert RegexFlag to int before compile (GH-3862)
INADA Naoki [Thu, 5 Oct 2017 08:19:26 +0000 (17:19 +0900)]
bpo-31671: re: Convert RegexFlag to int before compile (GH-3862)

sre_compile does bit test (e.g. `flags & SRE_FLAG_IGNORECASE`) in loop.
`IntFlag.__and__` and `IntFlag.__new__` made it slower.

So this commit convert it to normal int before passing flags to `sre_compile()`.

7 years agocloses bpo-27494: Fix 2to3 handling of trailing comma after a generator expression...
Jakub Stasiak [Thu, 5 Oct 2017 07:10:09 +0000 (09:10 +0200)]
closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (#3771)

7 years agoremove tabs from getcompiler.c (#3892)
Benjamin Peterson [Thu, 5 Oct 2017 07:09:01 +0000 (00:09 -0700)]
remove tabs from getcompiler.c (#3892)

7 years agocloses bpo-31596: Add an interface for pthread_getcpuclockid(3) (#3756)
pdox [Thu, 5 Oct 2017 07:01:56 +0000 (00:01 -0700)]
closes bpo-31596: Add an interface for pthread_getcpuclockid(3) (#3756)

7 years agoAdd self and idlelib to CODEOWNERS file. (#3889)
Terry Jan Reedy [Thu, 5 Oct 2017 02:15:11 +0000 (22:15 -0400)]
Add self and idlelib to CODEOWNERS file. (#3889)

Followed format of other entries.

7 years agobpo-30872: Update the curses docs to Python 3. (#2620)
Serhiy Storchaka [Wed, 4 Oct 2017 19:44:13 +0000 (22:44 +0300)]
bpo-30872: Update the curses docs to Python 3. (#2620)

7 years agoRefactor multiplication and division of timedelta and float. (#3656)
Serhiy Storchaka [Wed, 4 Oct 2017 17:30:09 +0000 (20:30 +0300)]
Refactor multiplication and division of timedelta and float. (#3656)

Implementations of these operations are virtually identical.

7 years agobpo-31667: Fix gettext related links. (#3860)
Serhiy Storchaka [Wed, 4 Oct 2017 17:28:20 +0000 (20:28 +0300)]
bpo-31667: Fix gettext related links. (#3860)

* Fix incorrect links.
* Remove redundant links.
* Add signatures and index entries for gettext related
functions in the locale module.

7 years agobpo-30404: The -u option now makes the stdout and stderr streams totally unbuffered...
Serhiy Storchaka [Wed, 4 Oct 2017 17:25:40 +0000 (20:25 +0300)]
bpo-30404: The -u option now makes the stdout and stderr streams totally unbuffered. (#1667)

7 years agobpo-30397: Add re.Pattern and re.Match. (#1646)
Serhiy Storchaka [Wed, 4 Oct 2017 17:09:49 +0000 (20:09 +0300)]
bpo-30397: Add re.Pattern and re.Match. (#1646)

7 years agobpo-31683: Py_FatalError() now supports long error messages (#3878)
Victor Stinner [Wed, 4 Oct 2017 16:50:12 +0000 (09:50 -0700)]
bpo-31683: Py_FatalError() now supports long error messages (#3878)

On Windows, Py_FatalError() now limits the size to 256 bytes of the
buffer used to call OutputDebugStringW(). Previously, the size
depended on the length of the error message.

7 years agobpo-31677: email: Remove re.IGNORECASE flag (GH-3868)
INADA Naoki [Wed, 4 Oct 2017 03:47:38 +0000 (12:47 +0900)]
bpo-31677: email: Remove re.IGNORECASE flag (GH-3868)

While there is not real bug in this case, using re.IGNORECASE without re.ASCII
leads unexpected behavior.
Instead of adding re.ASCII, this commit removes re.IGNORECASE flag because
it's easier and simpler.

This commit removes dead copy of the pattern in email.util module too.
While the pattern is same, it is compiled separately because it had different flags.

7 years agoRemove retired and security branches from active docs (#3879)
Ned Deily [Wed, 4 Oct 2017 02:56:19 +0000 (22:56 -0400)]
Remove retired and security branches from active docs (#3879)

7 years agobpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)
Serhiy Storchaka [Tue, 3 Oct 2017 19:39:55 +0000 (22:39 +0300)]
bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)

when pass a string larger than 2 GiB.

Decrease memory requirements for Tcl's bigmem tests.

7 years agobpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (#3864)
Serhiy Storchaka [Tue, 3 Oct 2017 18:37:22 +0000 (21:37 +0300)]
bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (#3864)

7 years agobpo-31657: Add test coverage for the __debug__ case (GH-3450)
diana [Tue, 3 Oct 2017 16:46:56 +0000 (10:46 -0600)]
bpo-31657: Add test coverage for the __debug__ case (GH-3450)

Update the compile tests for optimization levels to also check that
__debug__ blocks are included or excluded based on the optimization
level.
Patch by Diana Clarke.

7 years agobpo-31619: Fixed a ValueError when convert a string with large number of underscores...
Serhiy Storchaka [Tue, 3 Oct 2017 11:13:44 +0000 (14:13 +0300)]
bpo-31619: Fixed a ValueError when convert a string with large number of underscores (#3827)

to integer with binary base.

7 years agobpo-31415: Add `-X importtime` option (GH-3490)
INADA Naoki [Tue, 3 Oct 2017 10:46:34 +0000 (19:46 +0900)]
bpo-31415: Add `-X importtime` option (GH-3490)

It shows show import time of each module.
It's useful for optimizing startup time.

Typical usage: python -X importtime -c 'import requests'