]> granicus.if.org Git - python/log
python
5 years agobpo-36059: Update OrderedDict() docs to reflect that regular dicts are now ordered...
Raymond Hettinger [Thu, 21 Feb 2019 08:05:30 +0000 (00:05 -0800)]
bpo-36059: Update OrderedDict() docs to reflect that regular dicts are now ordered (GH-11966)

5 years agoDoc: fix example for iter() function. (GH-11959)
Cristian Ciupitu [Thu, 21 Feb 2019 07:53:06 +0000 (09:53 +0200)]
Doc: fix example for iter() function. (GH-11959)

read() returns bytes for a file opened in binary mode,
so b'' should be used as a sentinel instead of ''.
Otherwise the loop will be infinite.

5 years agobpo-33989: Ensure that ms.key_compare is always initialized in list_sort_impl()....
Zackery Spytz [Thu, 21 Feb 2019 07:47:14 +0000 (00:47 -0700)]
bpo-33989: Ensure that ms.key_compare is always initialized in list_sort_impl(). (GH-8710)

5 years agobpo-36062: Minor speed-up for list slicing and copying. (GH-11967)
Sergey Fedoseev [Thu, 21 Feb 2019 06:51:52 +0000 (11:51 +0500)]
bpo-36062: Minor speed-up for list slicing and copying. (GH-11967)

5 years agoRe-init _Py_UnhandledKeyboardInterrupt before run. (GH-11963)
Gregory P. Smith [Thu, 21 Feb 2019 01:35:54 +0000 (17:35 -0800)]
Re-init _Py_UnhandledKeyboardInterrupt before run. (GH-11963)

Explicitly reinitialize this every eval *just in case* someone is
calling into an embedded Python where they don't care about an uncaught
KeyboardInterrupt exception (why didn't they leave
`config.install_signal_handlers` set to `0`?!?) but then later call
`Py_Main()` itself (which *checks* this flag and dies with a signal after
its interpreter exits).  We don't want a previous embedded interpreter's
uncaught exception to trigger an unexplained signal exit from a future
`Py_Main()` based one.

5 years agobpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960)
Raymond Hettinger [Wed, 20 Feb 2019 21:49:23 +0000 (13:49 -0800)]
bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960)

https://bugs.python.org/issue31982

5 years agobpo-36012: Avoid linear slot search for non-dunder methods (GH-11907)
Stefan Behnel [Wed, 20 Feb 2019 17:29:24 +0000 (18:29 +0100)]
bpo-36012: Avoid linear slot search for non-dunder methods (GH-11907)

5 years agobpo-35993: Fix _PyInterpreterState_DeleteExceptMain() (GH-11852)
Stéphane Wirtel [Wed, 20 Feb 2019 14:27:22 +0000 (15:27 +0100)]
bpo-35993: Fix _PyInterpreterState_DeleteExceptMain() (GH-11852)

 Fix a crash on fork when using subinterpreters.

5 years agobpo-12822: use monotonic clock for condvar if possible (GH-11723)
Inada Naoki [Wed, 20 Feb 2019 01:00:09 +0000 (10:00 +0900)]
bpo-12822: use monotonic clock for condvar if possible (GH-11723)

5 years agobpo-36049: Fix compiler warning in Python/ast.c (GH-11949)
Pablo Galindo [Tue, 19 Feb 2019 22:51:53 +0000 (22:51 +0000)]
bpo-36049: Fix compiler warning in Python/ast.c (GH-11949)

5 years agobpo-35584: Clarify role of caret in a class class (GH-11946)
Raymond Hettinger [Tue, 19 Feb 2019 19:32:18 +0000 (11:32 -0800)]
bpo-35584: Clarify role of caret in a class class (GH-11946)

https://bugs.python.org/issue35584

5 years agobpo-36037: Fix test_ssl for strict OpenSSL policy (GH-11940)
Victor Stinner [Tue, 19 Feb 2019 17:06:03 +0000 (18:06 +0100)]
bpo-36037: Fix test_ssl for strict OpenSSL policy (GH-11940)

Fix test_ssl for strict OpenSSL configuration like RHEL8 strict crypto policy.
Use older TLS version for minimum TLS version of the server SSL context if
needed, to test TLS version older than default minimum TLS version.

5 years agobpo-35153: Add headers parameter to xmlrpc.client.ServerProxy (GH-10308)
Cédric Krier [Tue, 19 Feb 2019 16:18:50 +0000 (17:18 +0100)]
bpo-35153: Add headers parameter to xmlrpc.client.ServerProxy (GH-10308)

Allow to add HTTP headers to XML-RPC requests sent to the server.

5 years agoDoc: Fix typo. (GH-11315)
Julien Palard [Tue, 19 Feb 2019 14:46:07 +0000 (15:46 +0100)]
Doc: Fix typo. (GH-11315)

From: https://mail.python.org/pipermail/docs/2018-December/038583.html

5 years agobpo-31506: Clarify error messages for object.__new__ and object.__init__ (GH-11641)
Sanyam Khurana [Tue, 19 Feb 2019 13:23:48 +0000 (18:53 +0530)]
bpo-31506: Clarify error messages for object.__new__ and object.__init__ (GH-11641)

`object.__new__` and `object.__init__` do take one argument each,
they just don't take extra user supplied arguments.

Patch by Sanyam Khurana.

5 years agoFix a misnamed test for lists. (GH-11933)
Serhiy Storchaka [Tue, 19 Feb 2019 11:53:07 +0000 (13:53 +0200)]
Fix a misnamed test for lists. (GH-11933)

5 years agoFix syntax warnings in tests introduced in bpo-35942. (GH-11934)
Serhiy Storchaka [Tue, 19 Feb 2019 11:52:35 +0000 (13:52 +0200)]
Fix syntax warnings in tests introduced in bpo-35942. (GH-11934)

5 years agoFix syntax warnings in tests introduced in bpo-15248. (GH-11932)
Serhiy Storchaka [Tue, 19 Feb 2019 11:49:09 +0000 (13:49 +0200)]
Fix syntax warnings in tests introduced in bpo-15248. (GH-11932)

5 years agobpo-35798: Add test.support.check_syntax_warning(). (#11895)
Serhiy Storchaka [Tue, 19 Feb 2019 06:30:15 +0000 (08:30 +0200)]
bpo-35798: Add test.support.check_syntax_warning(). (#11895)

It checks that a SyntaxWarning is raised when compile specified
statement, that it is raised only once, that it is converted to
a SyntaxError when raised as exception, and that both warning and
exception objects have corresponding attributes.

5 years agobpo-35689: IDLE: Add docstrings and unittests for colorizer.py (GH-11472)
Cheryl Sabella [Tue, 19 Feb 2019 05:11:18 +0000 (00:11 -0500)]
bpo-35689: IDLE: Add docstrings and unittests for colorizer.py (GH-11472)

5 years agobpo-34572: change _pickle unpickling to use import rather than retrieving from sys...
tjb900 [Mon, 18 Feb 2019 15:30:51 +0000 (23:30 +0800)]
bpo-34572: change _pickle unpickling to use import rather than retrieving from sys.modules (GH-9047)

Fix C implementation of pickle.loads to use importlib's locking mechanisms, and thereby avoid using partially-loaded modules.

5 years agobpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)
animalize [Mon, 18 Feb 2019 13:26:37 +0000 (21:26 +0800)]
bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)

Need to reset capturing groups between two SRE(match) callings in loops, this fixes wrong capturing groups in rare cases.

Also add a missing index in re.rst.

5 years agobpo-35704: Include correct NEWS entry (GH-11914)
Nick Coghlan [Mon, 18 Feb 2019 11:23:36 +0000 (21:23 +1000)]
bpo-35704: Include correct NEWS entry (GH-11914)

The wrong NEWS snippet was inadvertently included in
GH-11500, this switches to the correct one.

https://bugs.python.org/issue35704

5 years agobpo-35704: Prevent test_shutil fail result when AIX is 32-bit and MAXDATA < 0x2000000...
Michael Felt [Mon, 18 Feb 2019 11:02:44 +0000 (12:02 +0100)]
bpo-35704: Prevent test_shutil fail result when AIX is 32-bit and MAXDATA < 0x20000000 (GH-11500)

https://bugs.python.org/issue35704

5 years agobpo-35942: Improve the error message if __fspath__ returns invalid types in path_conv...
Pablo Galindo [Mon, 18 Feb 2019 10:46:34 +0000 (10:46 +0000)]
bpo-35942: Improve the error message if __fspath__ returns invalid types in path_converter (GH-11831)

The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.

5 years agobpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)
Ivan Levkivskyi [Sun, 17 Feb 2019 23:13:46 +0000 (23:13 +0000)]
bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)

Not using `__class_getitem__()` fallback if there is a non-subcriptable metaclass was caused by a certain asymmetry between how `PySequenceMethods` and `PyMappingMethods` are used in `PyObject_GetItem`. This PR removes this asymmetry. No tests failed, so I assume it was not intentional.

5 years agobpo-34720: Fix test_importlib.test_bad_traverse for AIX (GH-9391)
Michael Felt [Sun, 17 Feb 2019 12:02:56 +0000 (13:02 +0100)]
bpo-34720: Fix test_importlib.test_bad_traverse for AIX (GH-9391)

Fix  Modules/_testmultiphase.c so that it exits with non-zero status on AIX just as other systems do (non zero exit status, e.g. as result of a segmentation fault) when a NULL pointer is accessed for data.

https://bugs.python.org/issue34720

5 years agobpo-36013: delete fragile interactive shell SIGINT test (GH-11902)
Gregory P. Smith [Sun, 17 Feb 2019 01:22:39 +0000 (17:22 -0800)]
bpo-36013: delete fragile interactive shell SIGINT test (GH-11902)

It makes the existing smaller test more readable and robust at the same time.

The execution of a shell in interactive mode from CI and buildbot test automation wasn't working out.  What would work locally in our terminals would only work within a fraction of automation systems.  The integration test was a nice to have.  painful.  deleting. :)

5 years agoConvert range to repeat for choices() (#11889)
Raymond Hettinger [Sat, 16 Feb 2019 21:30:51 +0000 (13:30 -0800)]
Convert range to repeat for choices() (#11889)

5 years agobpo-1054041: Exit properly after an uncaught ^C. (#11862)
Gregory P. Smith [Sat, 16 Feb 2019 20:57:40 +0000 (12:57 -0800)]
bpo-1054041: Exit properly after an uncaught ^C. (#11862)

* bpo-1054041: Exit properly by a signal after a ^C.

An uncaught KeyboardInterrupt exception means the user pressed ^C and
our code did not handle it.  Programs that install SIGINT handlers are
supposed to reraise the SIGINT signal to the SIG_DFL handler in order
to exit in a manner that their calling process can detect that they
died due to a Ctrl-C.  https://www.cons.org/cracauer/sigint.html

After this change on POSIX systems

 while true; do python -c 'import time; time.sleep(23)'; done

can be stopped via a simple Ctrl-C instead of the shell infinitely
restarting a new python process.

What to do on Windows, or if anything needs to be done there has not
yet been determined.  That belongs in its own PR.

TODO(gpshead): A unittest for this behavior is still needed.

* Do the unhandled ^C check after pymain_free.

* Return STATUS_CONTROL_C_EXIT on Windows.

* Fix ifdef around unistd.h include.

* 📜🤖 Added by blurb_it.

* Add STATUS_CTRL_C_EXIT to the os module on Windows

* Add unittests.

* Don't send CTRL_C_EVENT in the Windows test.

It was causing CI systems to bail out of the entire test suite.

See https://dev.azure.com/Python/cpython/_build/results?buildId=37980
for example.

* Correct posix test (fail on macOS?) check.

* STATUS_CONTROL_C_EXIT must be unsigned.

* Improve the error message.

* test typo :)

* Skip if the bash version is too old.

...and rename the windows test to reflect what it does.

* min bash version is 4.4, detect no bash.

* restore a blank line i didn't mean to delete.

* PyErr_Occurred() before the Py_DECREF(co);

* Don't add os.STATUS_CONTROL_C_EXIT as a constant.

* Update the Windows test comment.

* Refactor common logic into a run_eval_code_obj fn.

5 years ago bpo-35884: Add missing FIFO queue benchmark (GH-11898)
Raymond Hettinger [Sat, 16 Feb 2019 20:51:02 +0000 (12:51 -0800)]
 bpo-35884: Add missing FIFO queue benchmark (GH-11898)

https://bugs.python.org/issue35884

5 years agobpo-33234: Add another attribution in Whatsnew (GH-11899)
Raymond Hettinger [Sat, 16 Feb 2019 20:47:48 +0000 (12:47 -0800)]
bpo-33234: Add another attribution in Whatsnew (GH-11899)

https://bugs.python.org/issue33234

5 years agobpo-32492: Add missing whatsnew entries for itemgetter and namedtuple (GH-11897)
Raymond Hettinger [Sat, 16 Feb 2019 20:02:22 +0000 (12:02 -0800)]
bpo-32492: Add missing whatsnew entries for itemgetter and namedtuple (GH-11897)

https://bugs.python.org/issue32492

5 years agobpo-33089: Add math.dist() and math.hypot() to Whatsnew (GH-11896)
Raymond Hettinger [Sat, 16 Feb 2019 19:00:42 +0000 (11:00 -0800)]
bpo-33089: Add math.dist() and math.hypot() to Whatsnew (GH-11896)

https://bugs.python.org/issue33089

5 years agobpo-35798: Fix duplicate SyntaxWarning: "is" with a literal. (GH-11639)
Serhiy Storchaka [Sat, 16 Feb 2019 06:29:46 +0000 (08:29 +0200)]
bpo-35798: Fix duplicate SyntaxWarning: "is" with a literal. (GH-11639)

5 years agobpo-15248: Emit a compiler warning when missed a comma before tuple or list. (GH...
Serhiy Storchaka [Sat, 16 Feb 2019 06:12:19 +0000 (08:12 +0200)]
bpo-15248: Emit a compiler warning when missed a comma before tuple or list. (GH-11757)

5 years agobpo-36007: Bump minimum sphinx version to 1.8 (GH-11887)
Anthony Sottile [Fri, 15 Feb 2019 23:41:15 +0000 (18:41 -0500)]
bpo-36007: Bump minimum sphinx version to 1.8 (GH-11887)

https://bugs.python.org/issue36007

5 years agobpo-35984: _xxsubinterpreters: Fix memory leak in _channel_send() (GH-11845)
Alexey Izbyshev [Fri, 15 Feb 2019 22:28:58 +0000 (01:28 +0300)]
bpo-35984: _xxsubinterpreters: Fix memory leak in _channel_send() (GH-11845)

https://bugs.python.org/issue35984

5 years agobpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782)
Daniel Hahler [Fri, 15 Feb 2019 20:52:53 +0000 (21:52 +0100)]
bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782)

Previously, `debug print(` would cause the interpreter to exit on a SyntaxError whereas `print(` would properly display the error and return to the pdb prompt.

This patch fixes this by pre-compiling the code before passing it to `Pdb.run`.

https://bugs.python.org/issue35931

5 years agoImprove readability of random module examples (GH-11884)
Raymond Hettinger [Fri, 15 Feb 2019 20:40:18 +0000 (12:40 -0800)]
Improve readability of random module examples (GH-11884)

Based on reviewer feedback from Allen Downey, convert ``lambda`` to ``def``.

5 years agoFix the versionadded info for typing.NoReturn (GH-11880)
Jack Wilsdon [Fri, 15 Feb 2019 19:20:28 +0000 (19:20 +0000)]
Fix the versionadded info for typing.NoReturn (GH-11880)

The earliest version that `typing.NoReturn` appears in is [3.5.4rc1](https://docs.python.org/3/whatsnew/changelog.html#python-3-5-4-release-candidate-1)

5 years agobpo-36006: Fix versionchanged directive alignment in io module documentation (GH...
Emmanuel Arias [Fri, 15 Feb 2019 19:02:38 +0000 (16:02 -0300)]
bpo-36006: Fix versionchanged directive alignment in io module documentation (GH-11881)

https://bugs.python.org/issue36006

5 years agobpo-35746: Credit Colin Read and Nicolas Edet (GH-11863)
Victor Stinner [Fri, 15 Feb 2019 11:25:47 +0000 (12:25 +0100)]
bpo-35746: Credit Colin Read and Nicolas Edet (GH-11863)

Add credit for the cert parser vulnerability. Mention also Cisco
TALOS-2018-0758 identifier.

5 years agobpo-35994: add sub dir for sub2_tree in os.walk test if symlink is not supported...
pxinwr [Fri, 15 Feb 2019 05:04:47 +0000 (13:04 +0800)]
bpo-35994: add sub dir for sub2_tree in os.walk test if symlink is not supported (GH-11853)

https://bugs.python.org/issue35994

5 years agobpo-30410: Documentation of sys.stdin/out/err update to reflect change in 3.6 (GH...
Lysandros Nikolaou [Thu, 14 Feb 2019 23:35:25 +0000 (00:35 +0100)]
bpo-30410: Documentation of sys.stdin/out/err update to reflect change in 3.6 (GH-10264)

Documentation of sys.stdin/out/err update to reflect change in 3.6 on Windows to use UTF-8.

Wording by Eryk Sun and Paul Moore.

https://bugs.python.org/issue30410

5 years agoDoc: Fix example in contextlib asynccontextmanager document (GH-8111)
kk [Thu, 14 Feb 2019 19:52:30 +0000 (03:52 +0800)]
Doc: Fix example in contextlib asynccontextmanager document (GH-8111)

5 years agobpo-35633: test_lockf() fails with "PermissionError: [Errno 13] Permission denied...
Michael Felt [Thu, 14 Feb 2019 18:22:35 +0000 (19:22 +0100)]
bpo-35633: test_lockf() fails with "PermissionError: [Errno 13] Permission denied" on AIX (GH-11424)

[bpo-35633](https://bugs.python.org/issue35633): Fix a test regression introduced with [bpo-35189](https://bugs.python.org/issue35189) (PEP 475: fnctl functions are not retried if interrupted (EINTR)).

Not only a blocking IO error needs to be ignored - permission errors also need to be ignored.

p.s. - iirc as a "test" only correction a NEWS item is not required. If this is not correct - just mention, and I'll add a NEWS blurb.

https://bugs.python.org/issue35633

5 years agobpo-35976: Enable Windows projects to build with platform ARM32 (GH-11825)
Paul Monson [Thu, 14 Feb 2019 16:31:30 +0000 (08:31 -0800)]
bpo-35976: Enable Windows projects to build with platform ARM32 (GH-11825)

This change adds the necessary items to the build projects to avoid erroring out right at the start. It does not add _support_ for targeting Windows on ARM32, but is a necessary prerequisite for adding it.

5 years agocloses bpo-35991: Fix a potential double free in Modules/_randommodule.c. (GH-11849)
Zackery Spytz [Thu, 14 Feb 2019 07:43:17 +0000 (00:43 -0700)]
closes bpo-35991: Fix a potential double free in Modules/_randommodule.c. (GH-11849)

5 years agoFix typo: equivalent code of `async with cond` (GH-11681)
Kevin Mai-Husan Chia [Thu, 14 Feb 2019 02:39:25 +0000 (10:39 +0800)]
Fix typo: equivalent code of `async with cond` (GH-11681)

5 years agobpo-35500: align expected and actual calls on mock.assert_called_with error message...
Susan Su [Thu, 14 Feb 2019 02:22:29 +0000 (18:22 -0800)]
bpo-35500: align expected and actual calls on mock.assert_called_with error message. (GH-11804)

5 years agobpo-35887: Add make regen-importlib step to importlib._bootstrap docstring (GH-11777)
Nina Zakharenko [Wed, 13 Feb 2019 23:21:17 +0000 (15:21 -0800)]
bpo-35887: Add make regen-importlib step to importlib._bootstrap docstring (GH-11777)

5 years agobpo-35961: Fix a crash in slice_richcompare() (GH-11830)
Victor Stinner [Wed, 13 Feb 2019 11:31:56 +0000 (12:31 +0100)]
bpo-35961: Fix a crash in slice_richcompare() (GH-11830)

Fix a crash in slice_richcompare(): use strong references rather than
stolen references for the two temporary internal tuples.

The crash (or assertion error) occurred if a garbage collection
occurred during slice_richcompare(), especially while calling
PyObject_RichCompare(t1, t2, op).

5 years agobpo-18283: Add support for bytes to shutil.which (GH-11818)
Cheryl Sabella [Wed, 13 Feb 2019 11:25:10 +0000 (06:25 -0500)]
bpo-18283: Add support for bytes to shutil.which (GH-11818)

5 years agoBe consistent about the use of from-imports in random module (GH-11837)
Raymond Hettinger [Wed, 13 Feb 2019 10:04:17 +0000 (02:04 -0800)]
Be consistent about the use of from-imports in random module (GH-11837)

Minor code clean-up.

5 years agoRemove stray quote in os.replace docstring. (GH-11556)
Anthony Sottile [Wed, 13 Feb 2019 04:15:54 +0000 (23:15 -0500)]
Remove stray quote in os.replace docstring. (GH-11556)

5 years agoFix potential memory leak in parsetok.c (GH-11832)
Pablo Galindo [Wed, 13 Feb 2019 00:45:53 +0000 (00:45 +0000)]
Fix potential memory leak in parsetok.c (GH-11832)

5 years agobpo-35505: Skip test_imap4_host_default_value if localhost listens on IMAP port ...
Matěj Cepl [Tue, 12 Feb 2019 18:30:19 +0000 (19:30 +0100)]
bpo-35505: Skip test_imap4_host_default_value if localhost listens on IMAP port (GH-11823)

Make test_imap4_host_default_value independent on whether the
local IMAP server is running.

5 years agobpo-35972: _xxsubinterpreters: Fix potential integer truncation on 32-bit in channel_...
Alexey Izbyshev [Tue, 12 Feb 2019 16:06:43 +0000 (19:06 +0300)]
bpo-35972: _xxsubinterpreters: Fix potential integer truncation on 32-bit in channel_send() (gh-11822)

5 years ago bpo-35960: Fix dataclasses.field throwing away empty metadata. (GH-11815)
Christopher Hunt [Tue, 12 Feb 2019 11:50:49 +0000 (06:50 -0500)]
 bpo-35960: Fix dataclasses.field throwing away empty metadata.  (GH-11815)

5 years agobpo-35918: Remove broken has_key method and add test (#11819)
Rémi Lapeyre [Tue, 12 Feb 2019 00:37:24 +0000 (01:37 +0100)]
bpo-35918: Remove broken has_key method and add test (#11819)

5 years agoComplete switch cases in symtable.c; fixes bpo-35963 (GH-11821)
Guido van Rossum [Mon, 11 Feb 2019 19:34:50 +0000 (11:34 -0800)]
Complete switch cases in symtable.c; fixes bpo-35963 (GH-11821)

5 years agobpo-35378: Fix multiprocessing.Pool references (GH-11627)
Pablo Galindo [Mon, 11 Feb 2019 17:29:00 +0000 (17:29 +0000)]
bpo-35378: Fix multiprocessing.Pool references (GH-11627)

Changes in this commit:

1. Use a _strong_ reference between the Pool and associated iterators
2. Rework PR #8450 to eliminate a cycle in the Pool.

There is no test in this commit because any test that automatically tests this behaviour needs to eliminate the pool before joining the pool to check that the pool object is garbaged collected/does not hang. But doing this will potentially leak threads and processes (see https://bugs.python.org/issue35413).

5 years agobpo-35766 follow-up: Add an error check to new_type_comment() (#11766)
Guido van Rossum [Mon, 11 Feb 2019 16:10:42 +0000 (08:10 -0800)]
bpo-35766 follow-up: Add an error check to new_type_comment() (#11766)

If PyUnicode_DecodeUTF8() returns NULL, PyArena_AddPyObject() would crash.
Found by @msullivan for https://github.com/python/typed_ast/pull/93.

5 years agobpo-22062: Updated docstring and documentation for pathlib (GH-8519)
Eivind Teig [Mon, 11 Feb 2019 10:47:09 +0000 (11:47 +0100)]
bpo-22062: Updated docstring and documentation for pathlib (GH-8519)

Original patch by Mike Short

https://bugs.python.org/issue22062

5 years agoDoc sidebar: 3.6 has moved to security-fix mode. (GH-11810)
Julien Palard [Sun, 10 Feb 2019 21:27:12 +0000 (22:27 +0100)]
Doc sidebar: 3.6 has moved to security-fix mode. (GH-11810)

5 years agoFix compiler warning about non initialised variable (GH-11806)
Pablo Galindo [Sun, 10 Feb 2019 20:37:07 +0000 (20:37 +0000)]
Fix compiler warning about non initialised variable (GH-11806)

5 years agoFix division by 0 when checking for overflow in math.prod (GH-11808)
Pablo Galindo [Sun, 10 Feb 2019 19:56:58 +0000 (19:56 +0000)]
Fix division by 0 when checking for overflow in math.prod (GH-11808)

5 years agoFix compiler warnings about end_col_offset and end_lineno (GH-11735)
Ivan Levkivskyi [Sun, 10 Feb 2019 15:39:49 +0000 (15:39 +0000)]
Fix compiler warnings about end_col_offset and end_lineno (GH-11735)

5 years agoFix broken :ref: in asyncio docs (GH-11805)
Pablo Galindo [Sun, 10 Feb 2019 00:21:37 +0000 (00:21 +0000)]
Fix broken :ref: in asyncio docs (GH-11805)

5 years agoMake sure the BaseManager in test_multiprocessing is cleaned up correctly (GH-11653)
Pablo Galindo [Sat, 9 Feb 2019 17:35:05 +0000 (17:35 +0000)]
Make sure the BaseManager in test_multiprocessing is cleaned up correctly (GH-11653)

5 years agoDo not retain references to processes and managers in TestSyncManagerTypes (GH-11801)
Pablo Galindo [Sat, 9 Feb 2019 17:08:49 +0000 (17:08 +0000)]
Do not retain references to processes and managers in TestSyncManagerTypes (GH-11801)

Keeping references to processes and managers between tests makes them count as dangling processes.

5 years agobpo-35833: Revise IDLE doc for control codes sent to Shell. (GH-11799)
Terry Jan Reedy [Sat, 9 Feb 2019 03:51:51 +0000 (22:51 -0500)]
bpo-35833: Revise IDLE doc for control codes sent to Shell. (GH-11799)

Add  a code example block.

5 years agolru_cache: Add more comments. Fix comment typos. Clarify a comment. (GH-11795)
Raymond Hettinger [Sat, 9 Feb 2019 02:55:02 +0000 (18:55 -0800)]
lru_cache:  Add more comments. Fix comment typos. Clarify a comment. (GH-11795)

5 years agoRework tuple hash tests. (GH-10161)
Tim Peters [Fri, 8 Feb 2019 21:09:26 +0000 (15:09 -0600)]
Rework tuple hash tests. (GH-10161)

Add tooling that will useful in future updates, paying particular attention to difficult cases where only the upper bits on the input vary.

5 years agobpo-35903: Use autoconfig to probe for shm_open() and shm_unlink(). (#11765)
Neil Schemenauer [Fri, 8 Feb 2019 18:48:46 +0000 (10:48 -0800)]
bpo-35903: Use autoconfig to probe for shm_open() and shm_unlink(). (#11765)

Use autoconfig to probe for shm_open() and shm_unlink().  Set SHM_NEEDS_LIBRT if we must
link with librt to get the shm_* functions.  Change setup.py to use the autoconfig defines.  These
changes should make it more likely that _multiprocessing/posixshmem.c gets built correctly on
different platforms.

5 years agoComplete and neaten-up namedtuple's replacement of builtin function lookups with...
Raymond Hettinger [Fri, 8 Feb 2019 18:37:39 +0000 (10:37 -0800)]
Complete and neaten-up namedtuple's replacement of builtin function lookups with derefs (GH-11794)

5 years agoAdd What's New entry for date subclass behavior (#11790)
Paul Ganssle [Fri, 8 Feb 2019 16:02:00 +0000 (11:02 -0500)]
Add What's New entry for date subclass behavior (#11790)

This was a backwards incompatible change and should be clearly noted.

Related bugs:

bpo-32417: https://bugs.python.org/issue32417
bpo-35364: https://bugs.python.org/issue35364

5 years agobpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-11384)
Fish [Thu, 7 Feb 2019 19:51:59 +0000 (14:51 -0500)]
bpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-11384)

Protect dict iterations by wrapping them with _IterationGuard in the
following methods:

- WeakValueDictionary.copy()
- WeakValueDictionary.__deepcopy__()
- WeakKeyDictionary.copy()
- WeakKeyDictionary.__deepcopy__()

5 years agobpo-35911: add cell constructor (GH-11771)
Pierre Glaser [Thu, 7 Feb 2019 19:36:48 +0000 (20:36 +0100)]
bpo-35911: add cell constructor (GH-11771)

Add a cell constructor, expose the cell type in the types module.

5 years agobpo-24209: In http.server script, rely on getaddrinfo to bind to preferred address...
Jason R. Coombs [Thu, 7 Feb 2019 13:22:45 +0000 (08:22 -0500)]
bpo-24209: In http.server script, rely on getaddrinfo to bind to preferred address based on the bind parameter. (#11767)

In http.server script, rely on getaddrinfo to bind to preferred address based on the bind parameter.

As a result, now IPv6 is used as the default (including IPv4 on dual-stack systems). Enhanced tests.

5 years agobpo-35917: Test multiprocessing manager classes and shareable types (GH-11772)
Giampaolo Rodola [Thu, 7 Feb 2019 11:03:11 +0000 (03:03 -0800)]
bpo-35917: Test multiprocessing manager classes and shareable types (GH-11772)

multiprocessing: provide unittests for manager classes and shareable types

5 years agobpo-35606: Implement math.prod (GH-11359)
Pablo Galindo [Thu, 7 Feb 2019 07:04:02 +0000 (07:04 +0000)]
bpo-35606: Implement math.prod (GH-11359)

5 years agoFix url to core-mentorship mailing list (GH-11775)
Mariatta [Wed, 6 Feb 2019 20:45:03 +0000 (12:45 -0800)]
Fix url to core-mentorship mailing list (GH-11775)

5 years agobpo-20001: update pathlib landing image (GH-11304)
Harmandeep Singh [Tue, 5 Feb 2019 10:16:13 +0000 (15:46 +0530)]
bpo-20001: update pathlib landing image (GH-11304)

5 years agoemail: use dict instead of OrderedDict (GH-11709)
Inada Naoki [Tue, 5 Feb 2019 08:05:43 +0000 (17:05 +0900)]
email: use dict instead of OrderedDict (GH-11709)

5 years agoasyncio: use dict instead of OrderedDict (GH-11710)
Inada Naoki [Tue, 5 Feb 2019 08:04:40 +0000 (17:04 +0900)]
asyncio: use dict instead of OrderedDict (GH-11710)

5 years agoFix typo (micro->nano) (GH-11759)
Raymond Hettinger [Tue, 5 Feb 2019 07:32:55 +0000 (23:32 -0800)]
Fix typo (micro->nano) (GH-11759)

5 years agobpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744)
Steve Dower [Tue, 5 Feb 2019 01:15:13 +0000 (17:15 -0800)]
bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744)

5 years agobpo-35321: Set the spec origin to frozen in frozen modules (#11732)
Nina Zakharenko [Tue, 5 Feb 2019 00:56:26 +0000 (16:56 -0800)]
bpo-35321: Set the spec origin to frozen in frozen modules (#11732)

* bpo-35321: Set the spec origin to frozen in frozen modules

This fix correctly sets the spec origin to
"frozen" for the _frozen_importlib module. Note that the
origin was already correctly set in _frozen_importlib_external.

* 📜🤖 Added by blurb_it.

5 years agobpo-32417: Make timedelta arithmetic respect subclasses (#10902)
Paul Ganssle [Mon, 4 Feb 2019 19:42:04 +0000 (14:42 -0500)]
bpo-32417: Make timedelta arithmetic respect subclasses (#10902)

* Make timedelta return subclass types

Previously timedelta would always return the `date` and `datetime`
types, regardless of what it is added to. This makes it return
an object of the type it was added to.

* Add tests for timedelta arithmetic on subclasses

* Make pure python timedelta return subclass types

* Add test for fromtimestamp with tz argument

* Add tests for subclass behavior in now

* Add news entry.

Fixes:
bpo-32417
bpo-35364

* More descriptive variable names in tests

Addresses Victor's comments

5 years agoPost 3.8.0a1
Łukasz Langa [Mon, 4 Feb 2019 08:39:24 +0000 (09:39 +0100)]
Post 3.8.0a1

5 years agoMerge tag 'v3.8.0a1'
Łukasz Langa [Mon, 4 Feb 2019 08:30:59 +0000 (09:30 +0100)]
Merge tag 'v3.8.0a1'

Python 3.8.0a1

5 years agobpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)
Steve Dower [Mon, 4 Feb 2019 07:19:38 +0000 (23:19 -0800)]
bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)

After reading __PYVENV_LAUNCHER__ we now set sys._base_executable value for later use.
Make the same changes for macOS to avoid extra platform checks.

5 years agobpo-35692: pathlib no longer raises when checking file and directory existence on...
Steve Dower [Mon, 4 Feb 2019 07:08:18 +0000 (23:08 -0800)]
bpo-35692: pathlib no longer raises when checking file and directory existence on drives that are not ready (GH-11746)

5 years agov3.8.0a1 v3.8.0a1
Łukasz Langa [Sun, 3 Feb 2019 13:17:38 +0000 (14:17 +0100)]
v3.8.0a1

5 years ago[pydoc] Regenerate topics for v3.8.0a1
Łukasz Langa [Sun, 3 Feb 2019 13:04:12 +0000 (14:04 +0100)]
[pydoc] Regenerate topics for v3.8.0a1

5 years ago[blurb] v3.8.0a1
Łukasz Langa [Sun, 3 Feb 2019 13:02:52 +0000 (14:02 +0100)]
[blurb] v3.8.0a1

5 years agobpo-35884: Add variable access benchmarking script (GH-11725)
Raymond Hettinger [Sun, 3 Feb 2019 06:54:56 +0000 (22:54 -0800)]
bpo-35884: Add variable access benchmarking script (GH-11725)

5 years agoUpdate macOS installer Welcome and ReadMe for 3.8 (GH-11748)
Ned Deily [Sun, 3 Feb 2019 05:41:20 +0000 (00:41 -0500)]
Update macOS installer Welcome and ReadMe for 3.8 (GH-11748)