]> granicus.if.org Git - python/log
python
6 years agobpo-28626: rearrange discussion of output formatting to encourage f-strings (#6036)
Andrew Kuchling [Sat, 7 Jul 2018 21:36:23 +0000 (17:36 -0400)]
bpo-28626: rearrange discussion of output formatting to encourage f-strings (#6036)

The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings.

This doesn't drop all of the old material, but it does rearrange the topics into a more modern order: f-strings first, discussing formatting specifiers a bit; then calling .format(); finally manual formatting with .ljust().

6 years agobpo-33702: Add some missing links in production lists and do a little polish (GH...
Andrés Delfino [Sat, 7 Jul 2018 20:24:46 +0000 (17:24 -0300)]
bpo-33702: Add some missing links in production lists and do a little polish (GH-7259)

6 years agobpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510)
Andrés Delfino [Sat, 7 Jul 2018 20:17:16 +0000 (17:17 -0300)]
bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510)

6 years agoFix moduleauthor/sectionauthor directives in Enum (GH-8117)
Andrés Delfino [Sat, 7 Jul 2018 19:01:25 +0000 (16:01 -0300)]
Fix moduleauthor/sectionauthor directives in Enum (GH-8117)

6 years agoAdd missing closing parentheses (GH-8144)
Andrés Delfino [Sat, 7 Jul 2018 19:00:46 +0000 (16:00 -0300)]
Add missing closing parentheses (GH-8144)

6 years agoMake various internal _testbuffer symbols static. (GH-8160)
Benjamin Peterson [Sat, 7 Jul 2018 18:18:38 +0000 (11:18 -0700)]
Make various internal _testbuffer symbols static. (GH-8160)

6 years agoFix typo in TypeVar docstring (#8142)
João D. Ferreira [Sat, 7 Jul 2018 15:41:20 +0000 (16:41 +0100)]
Fix typo in TypeVar docstring (#8142)

"can be used do declare" → "can be used to declare"

6 years agobpo-34065: Improve the markup of logging.basicConfig() arguments (GH-8153)
Dong-hee Na [Sat, 7 Jul 2018 12:36:40 +0000 (21:36 +0900)]
bpo-34065: Improve the markup of logging.basicConfig() arguments (GH-8153)

6 years agoHide some symbols from _xxsubinterpreters. (GH-8151)
Benjamin Peterson [Sat, 7 Jul 2018 06:28:35 +0000 (23:28 -0700)]
Hide some symbols from _xxsubinterpreters. (GH-8151)

6 years agoMake two PyModuleDef_Slot symbols static in _testmultiphase. (GH-8147)
Benjamin Peterson [Sat, 7 Jul 2018 04:05:51 +0000 (21:05 -0700)]
Make two PyModuleDef_Slot symbols static in _testmultiphase. (GH-8147)

6 years agocloses bpo-34056: Always return bytes from _HackedGetData.get_data(). (GH-8130)
Benjamin Peterson [Sat, 7 Jul 2018 03:41:06 +0000 (20:41 -0700)]
closes bpo-34056: Always return bytes from _HackedGetData.get_data(). (GH-8130)

* Always return bytes from _HackedGetData.get_data().

Ensure the imp.load_source shim always returns bytes by reopening the file in
binary mode if needed. Hash-based pycs have to receive the source code in bytes.

It's tempting to change imp.get_suffixes() to always return 'rb' as a mode, but
that breaks some stdlib tests and likely 3rdparty code, too.

6 years agobpo-23493: json: Change sort_keys in Python encoder same to C (GH-8131)
INADA Naoki [Fri, 6 Jul 2018 23:55:03 +0000 (08:55 +0900)]
bpo-23493: json: Change sort_keys in Python encoder same to C (GH-8131)

Stop using key=lambda.  This behavior is same to C version encoder.

6 years agobpo-34042: Fix dict.copy() to maintain correct total refcount (GH-8119)
Yury Selivanov [Fri, 6 Jul 2018 16:20:07 +0000 (12:20 -0400)]
bpo-34042: Fix dict.copy() to maintain correct total refcount (GH-8119)

6 years agoClarify that example in comment is about fromkeys() (GH-8141)
Raymond Hettinger [Fri, 6 Jul 2018 15:52:26 +0000 (08:52 -0700)]
Clarify that example in comment is about fromkeys() (GH-8141)

6 years agobpo-34054: multiprocessing uses time.monotonic() (GH-8118)
Victor Stinner [Fri, 6 Jul 2018 11:51:52 +0000 (13:51 +0200)]
bpo-34054: multiprocessing uses time.monotonic() (GH-8118)

The multiprocessing module now uses the monotonic clock
time.monotonic() instead of the system clock time.time() to implement
timeouts.

6 years agofix two typos in Objects/odictobject.c comments (GH-8040)
Robert Krzyzanowski [Fri, 6 Jul 2018 10:54:26 +0000 (05:54 -0500)]
fix two typos in Objects/odictobject.c comments (GH-8040)

6 years agobpo-20180: complete AC conversion of Objects/stringlib/transmogrify.h (GH-8039)
Tal Einat [Fri, 6 Jul 2018 10:17:38 +0000 (13:17 +0300)]
bpo-20180: complete AC conversion of Objects/stringlib/transmogrify.h (GH-8039)

* converted bytes methods: expandtabs, ljust, rjust, center, zfill
* updated char_convertor to properly set the C default value

6 years agoDoc: Remove superfluous markup. (GH-8112)
Julien Palard [Fri, 6 Jul 2018 09:15:13 +0000 (11:15 +0200)]
Doc: Remove superfluous markup. (GH-8112)

The line is speaking of a list of commands, not the list command.

6 years agoFix GCC warning in Python/hamt.c (GH-7618)
Zackery Spytz [Fri, 6 Jul 2018 08:50:38 +0000 (02:50 -0600)]
Fix GCC warning in Python/hamt.c (GH-7618)

6 years agobpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891)
Ammar Askar [Fri, 6 Jul 2018 07:19:08 +0000 (03:19 -0400)]
bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891)

Most of the change involves fixing up the test suite, which previously made
the assumption that there wouldn't be a new line if the input didn't end in
one.

Contributed by Ammar Askar.

6 years agoMake TaskStepMethWrapper_Type and TaskWakeupMethWrapper_Type static. (GH-8127)
Benjamin Peterson [Fri, 6 Jul 2018 05:39:34 +0000 (22:39 -0700)]
Make TaskStepMethWrapper_Type and TaskWakeupMethWrapper_Type static. (GH-8127)

6 years agobpo-34043: Optimize tarfile uncompress performance (GH-8089)
INADA Naoki [Fri, 6 Jul 2018 05:06:00 +0000 (14:06 +0900)]
bpo-34043: Optimize tarfile uncompress performance (GH-8089)

tarfile._Stream has two buffer for compressed and uncompressed data.
Those buffers are not aligned so unnecessary bytes slicing happens
for every reading chunks.

This commit bypass compressed buffering.

In this benchmark [1], user time become 250ms from 300ms.

[1]: https://bugs.python.org/msg320763

6 years agoversionadded -> versionchanged for all 'X parameter was added' for uniformity. (GH8114)
Sergey Fedoseev [Fri, 6 Jul 2018 00:01:16 +0000 (05:01 +0500)]
versionadded -> versionchanged for all 'X parameter was added' for uniformity. (GH8114)

Per the recommendation in our Developer's Guide:
  https://devguide.python.org/documenting/#paragraph-level-markup

6 years agoAdd more detail to the Counter.fromkeys() comment block (GH-8124)
Raymond Hettinger [Thu, 5 Jul 2018 23:36:24 +0000 (16:36 -0700)]
Add more detail to the Counter.fromkeys() comment block (GH-8124)

6 years agoclassify abs() argument type (GH-8103)
Windson yang [Thu, 5 Jul 2018 23:09:53 +0000 (07:09 +0800)]
classify abs() argument type (GH-8103)

6 years agoFix typo in dataclasses documentation (GH-8102)
Artjom [Thu, 5 Jul 2018 23:09:13 +0000 (02:09 +0300)]
Fix typo in dataclasses documentation (GH-8102)

6 years agobpo-34044: subprocess.Popen copies startupinfo (GH-8090)
Victor Stinner [Thu, 5 Jul 2018 20:54:17 +0000 (22:54 +0200)]
bpo-34044: subprocess.Popen copies startupinfo (GH-8090)

subprocess.Popen now copies the startupinfo argument to leave it
unchanged: it will modify the copy, so that the same STARTUPINFO
object can be used multiple times.

Add subprocess.STARTUPINFO.copy() method.

6 years agoFix fuzz testing for marshal.loads(). (GH-8106)
Serhiy Storchaka [Thu, 5 Jul 2018 09:19:19 +0000 (12:19 +0300)]
Fix fuzz testing for marshal.loads(). (GH-8106)

6 years agobpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336)
Serhiy Storchaka [Thu, 5 Jul 2018 08:17:20 +0000 (11:17 +0300)]
bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336)

6 years agoRemoved unused import from tzinfo_examples.py. (GH-7994)
Sergey Fedoseev [Thu, 5 Jul 2018 04:47:37 +0000 (09:47 +0500)]
Removed unused import from tzinfo_examples.py. (GH-7994)

6 years agoUpdate Stackless Python wiki URL (GH-8072)
Julien Palard [Thu, 5 Jul 2018 04:31:38 +0000 (06:31 +0200)]
Update Stackless Python wiki URL (GH-8072)

It was moved from bitbucket to GitHub.

6 years agoMinor code refactoring. Compute len() one fewer times on one code path. (GH-8094)
Raymond Hettinger [Wed, 4 Jul 2018 22:28:20 +0000 (15:28 -0700)]
Minor code refactoring.  Compute len() one fewer times on one code path. (GH-8094)

6 years agoDOC: In `reduce`, refer to `accumulate` (GH-7930)
Gerrit Holl [Wed, 4 Jul 2018 22:26:32 +0000 (23:26 +0100)]
DOC: In `reduce`, refer to `accumulate` (GH-7930)

6 years agobpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348)
Farhaan Bukhsh [Wed, 4 Jul 2018 18:42:05 +0000 (00:12 +0530)]
bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348)

This commit fixes the -timedelta overfllow issue not documented properly.

Signed-off-by: Farhaan Bukhsh <farhaan.bukhsh@gmail.com>
6 years agobpo-32942: Fix environment dependent test_script_helper (GH-8034)
Lorenz Mende [Wed, 4 Jul 2018 10:10:15 +0000 (12:10 +0200)]
bpo-32942: Fix environment dependent test_script_helper (GH-8034)

Result of function interpreter_requires_environment() depends on os.environ.
This was not covered by the tests, leading to fail when PYTHONHOME was set.

6 years agobpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)
Victor Stinner [Wed, 4 Jul 2018 09:49:41 +0000 (11:49 +0200)]
bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)

Fix test_forkserver_sigkill() of test_multiprocessing_forkserver:
give more time to the first child process to complete, double the
sleep in the parent process.

Reduce also the child process sleep from 1000 ms to 500 ms, to not change
the total duration of the test.

6 years agobpo-34010: Fix tarfile read performance regression (GH-8020)
hajoscher [Wed, 4 Jul 2018 08:13:18 +0000 (10:13 +0200)]
bpo-34010: Fix tarfile read performance regression (GH-8020)

During buffered read, use a list followed by join instead of extending a bytes object.
This is how it was done before but changed in commit b506dc32c1a.

6 years agoMake GenericAlias_Type and Generic_Type static. (GH-8076)
Benjamin Peterson [Wed, 4 Jul 2018 05:39:09 +0000 (22:39 -0700)]
Make GenericAlias_Type and Generic_Type static. (GH-8076)

6 years agoDon't export pending_threadfunc from _testcapi. (GH-8075)
Benjamin Peterson [Wed, 4 Jul 2018 05:30:56 +0000 (22:30 -0700)]
Don't export pending_threadfunc from _testcapi. (GH-8075)

6 years agobpo-33418: Add tp_clear for function object (GH-8058)
INADA Naoki [Wed, 4 Jul 2018 02:15:50 +0000 (11:15 +0900)]
bpo-33418: Add tp_clear for function object (GH-8058)

Without tp_clear, GC can't break cyclic reference.
It will cause memory leak when cyclic reference is
created intentionally.

6 years agobpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918)
Zackery Spytz [Tue, 3 Jul 2018 19:47:22 +0000 (13:47 -0600)]
bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918)

PyErr_Print() will not return when the exception is a SystemExit, so
decref the __main__ module object in that case.

6 years agobpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042)
Sergey Fedoseev [Tue, 3 Jul 2018 11:59:32 +0000 (16:59 +0500)]
bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042)

6 years ago bpo-34019: Fix wrong arguments for Opera Browser (#8047)
Bumsik Kim [Tue, 3 Jul 2018 11:30:06 +0000 (07:30 -0400)]
 bpo-34019: Fix wrong arguments for Opera Browser (#8047)

The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module.

* Correct the arguments passed to the Opera Browser when opening a new URL.

6 years agobpo-33735: Fix test_multiprocessing random failure (GH-8059)
Victor Stinner [Tue, 3 Jul 2018 11:20:35 +0000 (13:20 +0200)]
bpo-33735: Fix test_multiprocessing random failure (GH-8059)

When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

* Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
  10 is enough to test at least one number per process
* Use chunksize=100 instead of chunksize=53 to mimick test_imap()

6 years agobpo-34006: Revert line length limit for Windows help docs (GH-8051)
Zachary Ware [Mon, 2 Jul 2018 20:31:42 +0000 (15:31 -0500)]
bpo-34006: Revert line length limit for Windows help docs (GH-8051)

 The line-length limit is not needed because the pages appear in a separate app rather
 than on a browser tab.  It can also interact badly with the DPI setting.

6 years agobpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008)
Xtreak [Mon, 2 Jul 2018 08:57:46 +0000 (14:27 +0530)]
bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008)

6 years agobpo-30660: Doc: Optimize PNG files by optipng (GH-8032)
INADA Naoki [Sun, 1 Jul 2018 07:02:52 +0000 (16:02 +0900)]
bpo-30660: Doc: Optimize PNG files by optipng (GH-8032)

Using OptiPNG 0.7.7.
Used command is: `find . -name '*.png' | xargs optipng -o7`

6 years agobpo-31938: Convert selectmodule.c to Argument Clinic (GH-4265)
Tal Einat [Sat, 30 Jun 2018 20:02:48 +0000 (23:02 +0300)]
bpo-31938: Convert selectmodule.c to Argument Clinic (GH-4265)

6 years agoDoc: Remove unused image file (GH-8027)
INADA Naoki [Sat, 30 Jun 2018 18:04:34 +0000 (03:04 +0900)]
Doc: Remove unused image file (GH-8027)

6 years agobpo-25862: Fix several bugs in the _io module. (GH-8026)
Serhiy Storchaka [Sat, 30 Jun 2018 17:57:50 +0000 (20:57 +0300)]
bpo-25862: Fix several bugs in the _io module. (GH-8026)

They can be exposed when some C API calls fail due to lack of
memory.

* Failed Py_BuildValue() could cause an assertion error in the
  following TextIOWrapper.tell().
* input_chunk could be decrefed twice in TextIOWrapper.seek()
  after failed Py_BuildValue().
* initvalue could leak in StringIO.__getstate__() after failed
  PyDict_Copy().

6 years agobpo-32568: make select.epoll() and its docs consistent (#7840)
Tal Einat [Sat, 30 Jun 2018 12:43:23 +0000 (15:43 +0300)]
bpo-32568: make select.epoll() and its docs consistent (#7840)

* `flags` is indeed deprecated, but there is a validation on its value for
  backwards compatibility reasons.  This adds mention of this in the docs.
* The docs say that `sizehint` is deprecated and ignored, but it is still
  used when `epoll_create1()` is unavailable. This adds mention of this in
  the docs.
* `sizehint=-1` is acceptable again, and is replaced with `FD_SETSIZE-1`.
  This is needed to have a default value available at the Python level,
  since `FD_SETSIZE` is not exposed to Python. (see: bpo-31938)
* Reject `sizehint=0` since it is invalid to pass on to `epoll_create()`.

The relevant tests have also been updated.

6 years agobpo-33974: Fix passing special characters to ttk widgets. (GH-7986)
Serhiy Storchaka [Sat, 30 Jun 2018 06:20:28 +0000 (09:20 +0300)]
bpo-33974: Fix passing special characters to ttk widgets. (GH-7986)

Fix passing lists and tuples of strings containing special characters
'"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.

6 years agoFix redundant declaration of _PyImport_AddModuleObject (GH-7992)
Jeremy Cline [Fri, 29 Jun 2018 22:47:18 +0000 (18:47 -0400)]
Fix redundant declaration of _PyImport_AddModuleObject (GH-7992)

6 years agoAdd zulipchat badge to readme (GH-7929)
Mariatta [Fri, 29 Jun 2018 20:43:45 +0000 (13:43 -0700)]
Add zulipchat badge to readme (GH-7929)

6 years agobpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)
Zackery Spytz [Fri, 29 Jun 2018 10:14:58 +0000 (04:14 -0600)]
bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)

6 years agoFix the indentation in the documentation of bin() and hash() (GH-7998)
Andrés Delfino [Fri, 29 Jun 2018 09:57:10 +0000 (06:57 -0300)]
Fix the indentation in the documentation of bin() and hash() (GH-7998)

6 years agobpo-14117: Make minor tweaks to turtledemo (GH-8002)
Terry Jan Reedy [Fri, 29 Jun 2018 05:10:05 +0000 (01:10 -0400)]
bpo-14117: Make minor tweaks to turtledemo (GH-8002)

The 'wikipedia' example is now 'rosette', describing what it draws.
The 'penrose' print output is reduced.  The 'tree' '1024'
output is eliminated.

6 years agobpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
Yury Selivanov [Fri, 29 Jun 2018 01:59:32 +0000 (21:59 -0400)]
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)

6 years agobpo-33985: Implement ContextVar.name attribute. (GH-7980)
Yury Selivanov [Thu, 28 Jun 2018 17:20:29 +0000 (13:20 -0400)]
bpo-33985: Implement ContextVar.name attribute. (GH-7980)

6 years agobpo-31546: Fix input hook integration (GH-7978)
Thomas A Caswell [Thu, 28 Jun 2018 16:29:44 +0000 (12:29 -0400)]
bpo-31546: Fix input hook integration (GH-7978)

6 years agobpo-32996: Enhancements to What's New based on feedback (GH-7988)
Elvis Pranskevichus [Thu, 28 Jun 2018 15:57:37 +0000 (11:57 -0400)]
bpo-32996: Enhancements to What's New based on feedback (GH-7988)

6 years agoForward port rest of NEWS changes as of 3.7.0
Ned Deily [Thu, 28 Jun 2018 08:18:35 +0000 (04:18 -0400)]
Forward port rest of NEWS changes as of 3.7.0

6 years agobpo-33842: Remove tarfile.filemode (GH-7661)
INADA Naoki [Thu, 28 Jun 2018 08:10:36 +0000 (17:10 +0900)]
bpo-33842: Remove tarfile.filemode (GH-7661)

6 years agobpo-33958: Doc: Remove unused variable in example (GH-7927)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Thu, 28 Jun 2018 06:25:20 +0000 (11:55 +0530)]
bpo-33958: Doc: Remove unused variable in example (GH-7927)

6 years agoForward port 3.7.0 final changes
Ned Deily [Wed, 27 Jun 2018 22:45:50 +0000 (18:45 -0400)]
Forward port 3.7.0 final changes

6 years agobpo-33715: Fix multiprocessing test_wait_result() (GH-7971)
Victor Stinner [Wed, 27 Jun 2018 20:24:02 +0000 (22:24 +0200)]
bpo-33715: Fix multiprocessing test_wait_result() (GH-7971)

Increase timeouts from 10 seconds to 1 minute.

6 years agobpo-33913: Fix test_multiprocessing_main_handling (GH-7972)
Victor Stinner [Wed, 27 Jun 2018 20:21:53 +0000 (22:21 +0200)]
bpo-33913: Fix test_multiprocessing_main_handling (GH-7972)

bpo-30339, bpo-33913:

* Increase timeout from 10 seconds to 1 minute in
  test_source_main_skipped_in_children source of
  test_multiprocessing_main_handling.
* Replace time.time() with time.monotonic().
* On timeout, include the duration in the error message.

6 years agobpo-25007: Add copy protocol support to zlib compressors and decompressors (GH-7940)
Zackery Spytz [Wed, 27 Jun 2018 18:04:51 +0000 (12:04 -0600)]
bpo-25007: Add copy protocol support to zlib compressors and decompressors (GH-7940)

6 years agobpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
Victor Stinner [Wed, 27 Jun 2018 16:18:10 +0000 (18:18 +0200)]
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)

test_mymanager_context() now also accepts -SIGTERM as an expected
exitcode for the manager process. The process is killed with SIGTERM
if it takes longer than 1 second to stop.

6 years agoPrevent upload script uploading from the wrong directory (GH-7953)
Steve Dower [Wed, 27 Jun 2018 15:11:13 +0000 (08:11 -0700)]
Prevent upload script uploading from the wrong directory (GH-7953)

6 years agobpo-31647: Fix bpo typo in NEWS entry. (GH-7964)
twisteroid ambassador [Wed, 27 Jun 2018 14:58:08 +0000 (22:58 +0800)]
bpo-31647: Fix bpo typo in NEWS entry. (GH-7964)

6 years agobpo-33929: Fix regression in spawn_main() (#7962)
Victor Stinner [Wed, 27 Jun 2018 13:18:39 +0000 (15:18 +0200)]
bpo-33929: Fix regression in spawn_main() (#7962)

OpenProcess() creates a new handle that must be closed later.

6 years agobpo-33929: multiprocessing: fix handle leak on race condition (GH-7921)
Victor Stinner [Wed, 27 Jun 2018 09:40:24 +0000 (11:40 +0200)]
bpo-33929: multiprocessing: fix handle leak on race condition (GH-7921)

Fix a race condition in Popen of
multiprocessing.popen_spawn_win32. The child process now duplicates
the read end of pipe instead of "stealing" it.

Previously, the read end of pipe was "stolen" by the child process,
but it leaked a handle if the child process had been terminated
before it could steal the handle from the parent process.

6 years agobpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)
Victor Stinner [Wed, 27 Jun 2018 09:04:51 +0000 (11:04 +0200)]
bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)

Tolerate a different of 50 ms, instead of just 30 ms, in
test_timeout() of multiprocessing tests. This change should fix such
test failure on Windows:

FAIL: test_timeout (test.test_multiprocessing_spawn.WithProcessesTestQueue)
Traceback (most recent call last):
  File "lib\test\_test_multiprocessing.py", line 753, in test_timeout
    self.assertGreaterEqual(delta, 0.170)
AssertionError: 0.16138982772827148 not greater than or equal to 0.17

6 years agobpo-24567: Random subnormal.diff (#7954)
Raymond Hettinger [Wed, 27 Jun 2018 08:08:31 +0000 (01:08 -0700)]
bpo-24567: Random subnormal.diff (#7954)

Handle subnormal weights for choices()

6 years agobpo-33975: Avoid small type when running IDLE's htests. (GH-7944)
Terry Jan Reedy [Wed, 27 Jun 2018 04:07:30 +0000 (00:07 -0400)]
bpo-33975: Avoid small type when running IDLE's htests. (GH-7944)

Import pyshell first in htest to call SetProcessDpiAwareness on Windows
before tkinter.Tk() is called for the htest. Apparently, 'root.destroy()'
undoes a previous 'root = Tk()'. Since IDLE unittests always destroy roots,
a unittest before an htest does not require anything more to work right.
Since part of the purpose of human-viewed tests is to determine that
widgets look right, it is important that they look the same for testing
as when running IDLE.

6 years agouse rich markup for PEP reference (GH-7939)
Behzad B. Mokhtari [Wed, 27 Jun 2018 03:57:39 +0000 (08:27 +0430)]
use rich markup for PEP reference (GH-7939)

it's better to refer to PEP with `pep` role in reStructuredText. It also links to the PEP page.

6 years agobpo-29514: Make magic number test work for candidates
Ned Deily [Wed, 27 Jun 2018 02:24:59 +0000 (22:24 -0400)]
bpo-29514: Make magic number test work for candidates

6 years agobpo-33956: update vendored expat to 2.2.5 (GH-7925)
Benjamin Peterson [Wed, 27 Jun 2018 02:25:45 +0000 (19:25 -0700)]
bpo-33956: update vendored expat to 2.2.5 (GH-7925)

6 years agobpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH...
Pablo Galindo [Tue, 26 Jun 2018 14:17:26 +0000 (15:17 +0100)]
bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

6 years agobpo-33957: Doc: Use better wording (GH-7912)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Tue, 26 Jun 2018 08:27:05 +0000 (13:57 +0530)]
bpo-33957: Doc: Use better wording (GH-7912)

6 years agobpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)
Mark Roseman [Tue, 26 Jun 2018 01:19:40 +0000 (18:19 -0700)]
bpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)

These should have been included in PR 7836.

6 years agoRevert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)
Victor Stinner [Tue, 26 Jun 2018 00:11:06 +0000 (02:11 +0200)]
Revert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)

This reverts commit 8fbbdf0c3107c3052659e166f73990b466eacbb0.

6 years agobpo-33573: docs to suggest median() alternatives for non-numeric data (GH-7587)
Tal Einat [Mon, 25 Jun 2018 11:04:01 +0000 (14:04 +0300)]
bpo-33573: docs to suggest median() alternatives for non-numeric data (GH-7587)

6 years agobpo-33952: Fix typo in str.upper() documentation (GH-7898)
Andrés Delfino [Mon, 25 Jun 2018 10:34:22 +0000 (07:34 -0300)]
bpo-33952: Fix typo in str.upper() documentation (GH-7898)

6 years agobpo-33943: Add references in the docs for logging.basicConfig (GH-7858)
Andrés Delfino [Mon, 25 Jun 2018 06:06:10 +0000 (03:06 -0300)]
bpo-33943: Add references in the docs for logging.basicConfig (GH-7858)

Adds references to info about file modes, `time.strftime()`, string formatting
syntaxes, and logging levels.

6 years agobpo-33897: Add a 'force' keyword argument to logging.basicConfig(). (GH-7873)
Dong-hee Na [Mon, 25 Jun 2018 04:11:09 +0000 (13:11 +0900)]
bpo-33897: Add a 'force' keyword argument to logging.basicConfig(). (GH-7873)

6 years agobpo-33951: IDLE test_configdialog: call page.update in setUpClass (GH-7892)
Tal Einat [Sun, 24 Jun 2018 20:35:59 +0000 (23:35 +0300)]
bpo-33951: IDLE test_configdialog: call page.update in setUpClass (GH-7892)

This avoids a failure in at least one case when running only a single
test method rather than all tests in the module.

The issue came up when testing the following on Windows 10 Pro 64-bit:
HighPageTest.test_highlight_target_text_mouse

6 years agoEnable GUI tests in VSTS Linux builds via xvfb-run (GH-7890)
Zachary Ware [Sun, 24 Jun 2018 15:20:34 +0000 (10:20 -0500)]
Enable GUI tests in VSTS Linux builds via xvfb-run (GH-7890)

6 years agobpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884)
Zackery Spytz [Sun, 24 Jun 2018 03:15:24 +0000 (21:15 -0600)]
bpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884)

Directly executed pyc files were being kept open longer than necessary.

6 years ago[master] bpo-33885: Replace "hook function" with "callable" (GH-7765) (#7886)
Andrés Delfino [Sun, 24 Jun 2018 02:23:50 +0000 (23:23 -0300)]
[master] bpo-33885: Replace "hook function" with "callable" (GH-7765) (#7886)

(cherry picked from commit c45cb479074b5d25f0d382d3109f527520a9f03c)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
6 years agobpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881)
Terry Jan Reedy [Sat, 23 Jun 2018 21:33:27 +0000 (17:33 -0400)]
bpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881)

In configdialog, the custom tabbedpages widget was replaced
by ttk.notebook several months ago.

6 years agobpo-33887: Add TOC to Design and History FAQ(GH-7766)
Andrés Delfino [Sat, 23 Jun 2018 18:27:16 +0000 (15:27 -0300)]
bpo-33887: Add TOC to Design and History FAQ(GH-7766)

6 years agobpo-33805: Improve error message of dataclasses.replace() (GH-7580)
Dong-hee Na [Sat, 23 Jun 2018 14:46:32 +0000 (23:46 +0900)]
bpo-33805: Improve error message of dataclasses.replace() (GH-7580)

6 years agoRemove tp_print implementation (GH-7857)
jdemeyer [Sat, 23 Jun 2018 12:08:43 +0000 (14:08 +0200)]
Remove tp_print implementation (GH-7857)

6 years agobpo-33916: Fix bz2 and lzma init when called twice (GH-7843)
Victor Stinner [Sat, 23 Jun 2018 08:35:23 +0000 (10:35 +0200)]
bpo-33916: Fix bz2 and lzma init when called twice (GH-7843)

bz2, lzma: When Decompressor.__init__() is called twice, free the old
lock to not leak memory.

6 years agosuppress compiler warnings in _cursesmodule.c (#7860)
Xiang Zhang [Sat, 23 Jun 2018 04:29:30 +0000 (12:29 +0800)]
suppress compiler warnings in _cursesmodule.c (#7860)

6 years agobpo-33877: Remove UNIX qualification for running complete programs (GH-7744)
Andrés Delfino [Fri, 22 Jun 2018 21:31:03 +0000 (18:31 -0300)]
bpo-33877: Remove UNIX qualification for running complete programs (GH-7744)

The statement is true for Windows (and macOS) also.

6 years agoAdd test coverage reporting for C files (GH-7773)
Ammar Askar [Fri, 22 Jun 2018 21:29:02 +0000 (17:29 -0400)]
Add test coverage reporting for C files (GH-7773)

6 years agobpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)
Victor Stinner [Fri, 22 Jun 2018 17:25:44 +0000 (19:25 +0200)]
bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)

* Add support.MS_WINDOWS: True if Python is running on Microsoft Windows.
* Add support.MACOS: True if Python is running on Apple macOS.
* Replace support.is_android with support.ANDROID
* Replace support.is_jython with support.JYTHON
* Cleanup code to initialize unix_shell