]> granicus.if.org Git - python/log
python
7 years agobpo-31053: Remove redundant 'venv' argument in venv example (GH-2907)
cocoatomo [Fri, 27 Oct 2017 04:42:11 +0000 (13:42 +0900)]
bpo-31053: Remove redundant 'venv' argument in venv example (GH-2907)

7 years agobpo-28936: Detect lexically first syntax error first (#4097)
Ivan Levkivskyi [Thu, 26 Oct 2017 21:28:35 +0000 (23:28 +0200)]
bpo-28936: Detect lexically first syntax error first (#4097)

Lexically first global and nonlocal syntax errors at given scope should be detected first.

7 years agoCloses bpo-28281: Remove year (1-9999) limits on the weekday() function. (#4109)
Alexander Belopolsky [Thu, 26 Oct 2017 19:34:11 +0000 (15:34 -0400)]
Closes bpo-28281: Remove year (1-9999) limits on the weekday() function. (#4109)

Patch by Mark Gollahon.

7 years agobpo-30553: Add status code 421 to http.HTTPStatus (GH-2589)
Vitor Pereira [Thu, 26 Oct 2017 18:49:19 +0000 (19:49 +0100)]
bpo-30553: Add status code 421 to http.HTTPStatus (GH-2589)

7 years agoFix trailing whitespaces in C files. (#4130)
Serhiy Storchaka [Thu, 26 Oct 2017 13:59:40 +0000 (16:59 +0300)]
Fix trailing whitespaces in C files. (#4130)

7 years agobpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327)
xdegaye [Thu, 26 Oct 2017 13:09:06 +0000 (15:09 +0200)]
bpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327)

7 years agobpo-30937: Make usage of newline='' consistent in csv docs (GH-2730)
Ammar Askar [Thu, 26 Oct 2017 08:27:46 +0000 (04:27 -0400)]
bpo-30937: Make usage of newline='' consistent in csv docs (GH-2730)

7 years agobpo-21720: Restore the Python 2.7 logic in handling a fromlist. (#4118)
Serhiy Storchaka [Thu, 26 Oct 2017 07:41:59 +0000 (10:41 +0300)]
bpo-21720: Restore the Python 2.7 logic in handling a fromlist. (#4118)

BytesWarning no longer emitted when the fromlist argument of
__import__() or the __all__ attribute of the module contain bytes
instances.

7 years agofixes bpo-31866: remove code pertaining to AtheOS support (#4115)
Benjamin Peterson [Thu, 26 Oct 2017 06:55:14 +0000 (23:55 -0700)]
fixes bpo-31866: remove code pertaining to AtheOS support (#4115)

We stop support this OS in 2007 with commit
19fab761b71a1687aee3415db3a937b5ce31975d. Let's finish.

7 years agobpo-31857: Make the behavior of USE_STACKCHECK deterministic (#4098)
pdox [Thu, 26 Oct 2017 06:03:01 +0000 (23:03 -0700)]
bpo-31857: Make the behavior of USE_STACKCHECK deterministic (#4098)

7 years agoCloses bpo-31800: Support for colon when parsing time offsets (#4015)
Mario Corchero [Thu, 26 Oct 2017 00:35:41 +0000 (01:35 +0100)]
Closes bpo-31800: Support for colon when parsing time offsets (#4015)

Add support to strptime to parse time offsets with a colon between the hour and the minutes.

7 years agobpo-31664: Fix test_crypt for the openwall implementation of crypt. (#4116)
Serhiy Storchaka [Wed, 25 Oct 2017 13:30:13 +0000 (16:30 +0300)]
bpo-31664: Fix test_crypt for the openwall implementation of crypt. (#4116)

7 years agobpo-31835: Optimize also FASTCALL using __future__ (#4087)
Victor Stinner [Wed, 25 Oct 2017 12:26:17 +0000 (05:26 -0700)]
bpo-31835: Optimize also FASTCALL using __future__ (#4087)

_PyFunction_FastCallDict() and _PyFunction_FastCallKeywords() now
also takes the fast path if the code object uses __future__
(CO_FUTURE_xxx flags).

7 years agoremove support for splitting the ceval switch into multiple switches (#4099)
Benjamin Peterson [Wed, 25 Oct 2017 05:35:15 +0000 (22:35 -0700)]
remove support for splitting the ceval switch into multiple switches (#4099)

This kludge is from 1992. Any C99 compiler is going to be able to handle the
ceval dispatch switch.

Anyway, we have much bigger switches than the ceval dispatch one around. (See,
e.g., Objects/unicodetype_db.h.)

7 years agobpo-31845: Fix reading flags from environment (GH-4105)
Nick Coghlan [Wed, 25 Oct 2017 02:11:26 +0000 (12:11 +1000)]
bpo-31845: Fix reading flags from environment (GH-4105)

The startup refactoring means command line settings
are now applied after settings are read from the
environment.

This updates the way command line settings are applied
to account for that, ensures more settings are first read
from the environment in _PyInitializeCore, and adds a
simple test case covering the flags that are easy to check.

7 years agobpo-30768: Recompute timeout on interrupted lock (GH-4103)
Victor Stinner [Tue, 24 Oct 2017 23:53:32 +0000 (16:53 -0700)]
bpo-30768: Recompute timeout on interrupted lock (GH-4103)

Fix the pthread+semaphore implementation of
PyThread_acquire_lock_timed() when called with timeout > 0 and
intr_flag=0: recompute the timeout if sem_timedwait() is interrupted
by a signal (EINTR).

See also the PEP 475.

The pthread implementation of PyThread_acquire_lock() now fails with
a fatal error if the timeout is larger than PY_TIMEOUT_MAX, as done
in the Windows implementation.

The check prevents any risk of overflow in PyThread_acquire_lock().

Add also PY_DWORD_MAX constant.

7 years agobpo-31690: Allow the inline flags "a", "L", and "u" to be used as group flags for...
Serhiy Storchaka [Tue, 24 Oct 2017 20:31:42 +0000 (23:31 +0300)]
bpo-31690: Allow the inline flags "a", "L", and "u" to be used as group flags for RE. (#3885)

7 years agoCloses bpo-28292: Implemented Calendar.itermonthdays3() and itermonthdays4(). (#4079)
Alexander Belopolsky [Tue, 24 Oct 2017 17:17:10 +0000 (13:17 -0400)]
Closes bpo-28292: Implemented Calendar.itermonthdays3() and itermonthdays4(). (#4079)

Calendar.itermonthdates() will now consistently raise an exception when a date falls outside of the 0001-01-01 through 9999-12-31 range. To support applications that cannot tolerate such exceptions, the new methods itermonthdays3() and itermonthdays4() are added. The new methods return tuples and are not restricted by the range supported by datetime.date.

Thanks @serhiy-storchaka for suggesting the itermonthdays4() method and for the review.

7 years agobpo-31664: Add support for the Blowfish method in crypt. (#3854)
Serhiy Storchaka [Tue, 24 Oct 2017 16:36:17 +0000 (19:36 +0300)]
bpo-31664: Add support for the Blowfish method in crypt. (#3854)

7 years agoFix wording about Py_tss_NEEDS_INIT in docs (GH-4096)
Masayuki Yamamoto [Tue, 24 Oct 2017 12:58:16 +0000 (21:58 +0900)]
Fix wording about Py_tss_NEEDS_INIT in docs (GH-4096)

Make more sense to replace the word "default value" with
"initializer" for Py_tss_NEEDS_INIT.

7 years agobpo-30639: Lazily compute repr for error (#2132)
Thomas Kluyver [Tue, 24 Oct 2017 12:42:36 +0000 (13:42 +0100)]
bpo-30639: Lazily compute repr for error (#2132)

7 years agobpo-31174: Fix test_tools.test_unparse (#4102)
Victor Stinner [Tue, 24 Oct 2017 10:33:36 +0000 (03:33 -0700)]
bpo-31174: Fix test_tools.test_unparse (#4102)

test_unparse.DirectoryTestCase now stores the names sample to always
test the same files. It prevents false alarms when hunting reference
leaks.

7 years agobpo-31812: Add documentation translations to What's New in Python 3.7. (GH-4064)
Julien Palard [Tue, 24 Oct 2017 09:22:22 +0000 (11:22 +0200)]
bpo-31812: Add documentation translations to What's New in Python 3.7. (GH-4064)

7 years agobpo-31827: Remove os.stat_float_times() (GH-4061)
Victor Stinner [Tue, 24 Oct 2017 09:02:00 +0000 (02:02 -0700)]
bpo-31827: Remove os.stat_float_times() (GH-4061)

7 years agobpo-31810: Add smelly.py to check exported symbols (#4057)
Victor Stinner [Tue, 24 Oct 2017 08:29:53 +0000 (01:29 -0700)]
bpo-31810: Add smelly.py to check exported symbols (#4057)

* Add Tools/scripts/smelly.py: script checking if all symbols
  exported by libpython start with "Py" or "_Py".
* Modify "make smelly" to run smelly.py: the command now fails with a
  non-zero exit code if libpython leaks a "smelly" symbol.
* Travis CI now runs "make smelly"

7 years agofixes bpo-31834: Use optimized code for BLAKE2 only with SSSE3+ (#4066)
Michał Górny [Tue, 24 Oct 2017 06:54:19 +0000 (08:54 +0200)]
fixes bpo-31834: Use optimized code for BLAKE2 only with SSSE3+ (#4066)

Rework the code choosing BLAKE2 code paths from using the optimized
variant on all x86_64 machines to using it when SSSE3 or better
supported instructions sets are available.

Firstly, this solves the problem of using pure SSE2 code path on x86_64
machines. As reported in the bug, this code is slower than the reference
code on all tested x86_64 machines. Furthermore, on Athlon64 that lacks
SSSE3, it is even 2.5 times slower than the reference code! Checking
for SSSE3 therefore ensures that the optimized implementation will only
be used when it has a chance of performing better.

Secondly, this makes it possible to use SSSE3+ optimizations on 32-bit
x86 systems. This allows for even 2 times speed gain on modern 32-bit
x86 systems (tested in a 32-bit chroot).

7 years agobpo-31847: Fix commented out tests in test_syntax. (#4084)
Serhiy Storchaka [Mon, 23 Oct 2017 21:27:14 +0000 (00:27 +0300)]
bpo-31847: Fix commented out tests in test_syntax. (#4084)

SyntaxError now is raised instead of SyntaxWarning.

7 years agobpo-31653: Remove deadcode in semlock_acquire() (#4091)
Victor Stinner [Mon, 23 Oct 2017 20:57:51 +0000 (13:57 -0700)]
bpo-31653: Remove deadcode in semlock_acquire() (#4091)

Fix the following Coverity warning:

>>>     CID 1420038:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "res = sem_trywait(self->han...".
321                     res = sem_trywait(self->handle);

The deadcode was introduced by the commit
c872d39d324cd6f1a71b73e10406bbaed192d35f.

7 years agobpo-30722: Make redemo work with Python 3.6+ (GH-2311)
Christoph Sarnowski [Mon, 23 Oct 2017 17:10:48 +0000 (19:10 +0200)]
bpo-30722: Make redemo work with Python 3.6+ (GH-2311)

7 years agobpo-30817: Fix PyErr_PrintEx() when no memory (#2526)
xdegaye [Mon, 23 Oct 2017 16:08:41 +0000 (18:08 +0200)]
bpo-30817: Fix PyErr_PrintEx() when no memory (#2526)

7 years agobpo-31752: Fix possible crash in timedelta constructor called with custom integers...
Serhiy Storchaka [Mon, 23 Oct 2017 14:12:28 +0000 (17:12 +0300)]
bpo-31752: Fix possible crash in timedelta constructor called with custom integers. (#3947)

Bad remainder in divmod() in intermediate calculations caused an assertion failure.

7 years agobpo-31756: subprocess.run should alias universal_newlines to text (#4049)
andyclegg [Mon, 23 Oct 2017 02:01:19 +0000 (03:01 +0100)]
bpo-31756: subprocess.run should alias universal_newlines to text (#4049)

Improve human friendliness of the Popen API: Add text=False as a
keyword-only argument to subprocess.Popen along with a Popen
attribute .text_mode and set this based on the
encoding/errors/universal_newlines/text arguments.

The universal_newlines parameter and attribute are maintained for
backwards compatibility.

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.