]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 years agobpo-35363, test_eintr: skip test_open() on macOS (GH-10896) (GH-10912)
Victor Stinner [Wed, 5 Dec 2018 02:03:21 +0000 (03:03 +0100)] 
bpo-35363, test_eintr: skip test_open() on macOS (GH-10896) (GH-10912)

(cherry picked from commit 4752e65250bce60b97d5af702d586092d02fbf58)

6 years agobpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907) (GH-10909)
Miss Islington (bot) [Wed, 5 Dec 2018 01:18:57 +0000 (17:18 -0800)] 
bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907) (GH-10909)

On Travis CI, FTP tests of test_urllib2net randomly fail with "425
Security: Bad IP connecting".

test.pythoninfo now also logs TRAVIS environment variable.
(cherry picked from commit c11b3b19a5b022c6c229043d37f9a9fd06f22500)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy...
Miss Islington (bot) [Tue, 4 Dec 2018 09:34:48 +0000 (01:34 -0800)] 
bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (GH-10873)

Fix minor typo in test function name.
(cherry picked from commit e63e617ebbe481c498bdf037a62e09f4f9f3963f)

Co-authored-by: Andrew Dunai <andunai@gmail.com>
6 years ago[3.7] bpo-35373: Fix PyInit_timezone() error handling (GH-10864)
Miss Islington (bot) [Mon, 3 Dec 2018 23:22:35 +0000 (15:22 -0800)] 
[3.7] bpo-35373: Fix PyInit_timezone() error handling (GH-10864)

* bpo-35373: Fix PyInit_timezone() error handling

PyInit_timezone() now returns -1 at exit if an exception is raised.
Check also explicitly PyUnicode_DecodeLocale() and Py_BuildValue()
errors.

* bpo-35373: Fix PyInit_time() error handling (GH-10865)

* PyInit_time() now returns NULL if an exception is raised.
* Rename PyInit_timezone() to init_timezone(). "PyInit_" prefix is
  a special prefix for function initializing a module.
  init_timezone() doesn't initialize a module and the function is not
  exported.

(cherry picked from commit 3bb150d8148e3cc08418077a58f43e064b9fde61)
(cherry picked from commit 5eb78c75128187a36d8e983027632fa51cc2ff4d)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555)
Miss Islington (bot) [Mon, 3 Dec 2018 21:54:22 +0000 (13:54 -0800)] 
bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555)

Also refactor the call recording implementation and add some notes
about its limitations.
(cherry picked from commit 8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68)

Co-authored-by: Chris Withers <chris@withers.org>
6 years agobpo-35372: Fix the code page decoder for input > 2 GiB. (GH-10848)
Miss Islington (bot) [Mon, 3 Dec 2018 09:15:02 +0000 (01:15 -0800)] 
bpo-35372: Fix the code page decoder for input > 2 GiB. (GH-10848)

(cherry picked from commit 4013c179117754b039957db4730880bf3285919d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(...
Miss Islington (bot) [Mon, 3 Dec 2018 09:11:37 +0000 (01:11 -0800)] 
bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853)

Use "ll" instead of the nonstandard "q".
(cherry picked from commit 062cbb67726f26794b1b461853e40696b4a0b220)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844)
Miss Islington (bot) [Sat, 1 Dec 2018 12:53:36 +0000 (04:53 -0800)] 
bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844)

(cherry picked from commit 32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years ago[3.6] Fix signature of xml.dom.minidom.Document.toprettyxml(). (GH-10814). (GH-10825)
E Kawashima [Sat, 1 Dec 2018 12:21:01 +0000 (21:21 +0900)] 
[3.6] Fix signature of xml.dom.minidom.Document.toprettyxml(). (GH-10814). (GH-10825)

(cherry picked from commit b7c2182604d5796b5af4c837991aa0b8c8a2d41f)

6 years agobpo-31177: Skip deleted attributes while calling reset_mock (GH-9302)
Miss Islington (bot) [Sat, 1 Dec 2018 10:16:27 +0000 (02:16 -0800)] 
bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302)

(cherry picked from commit edeca92c84a3b08902ecdfe987cde00c7e617887)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
6 years agoget_gmtoff() now returns time_t (GH-10838) (GH-10840)
Victor Stinner [Sat, 1 Dec 2018 00:24:16 +0000 (01:24 +0100)] 
get_gmtoff() now returns time_t (GH-10838) (GH-10840)

get_gmtoff() now returns time_t instead of int to fix the following
Visual Studio warning:

    Modules\timemodule.c(1183): warning C4244: 'return':
    conversion from 'time_t' to 'int', possible loss of data

(cherry picked from commit 503ce5c482cb267b0770bc46c315d5cf822bdca9)

6 years agobpo-35352: test_asyncio uses the certificate set from the test directory (GH-10826...
Victor Stinner [Fri, 30 Nov 2018 19:44:43 +0000 (20:44 +0100)] 
bpo-35352: test_asyncio uses the certificate set from the test directory (GH-10826) (GH-10832)

Modify asyncio tests to utilize the certificates from the test directory
instead of its own set, as they are the same and with each update they had
to be updated as well.

(cherry picked from commit b062ba77b617b0f89b7ea25d14cc77c991462ad4)

6 years agobpo-33015: Fix UB in pthread PyThread_start_new_thread (GH-6008) (GH-10822)
Victor Stinner [Fri, 30 Nov 2018 16:04:46 +0000 (17:04 +0100)] 
bpo-33015: Fix UB in pthread PyThread_start_new_thread (GH-6008) (GH-10822)

Fix an undefined behaviour in the pthread implementation of
PyThread_start_new_thread(): add a function wrapper to always return
NULL.

Add pythread_callback struct and pythread_wrapper() to thread_pthread.h.

(cherry picked from commit 9eea6eaf23067880f4af3a130e3f67c9812e2f30)

6 years agobpo-35347: Fix test_socket.NonBlockingTCPTests (GH-10791)
Miss Islington (bot) [Fri, 30 Nov 2018 11:51:42 +0000 (03:51 -0800)] 
bpo-35347: Fix test_socket.NonBlockingTCPTests (GH-10791)

testAccept() and testRecv() of test_socket.NonBlockingTCPTests have a
race condition: time.sleep() is used as a weak synchronization
primitive and the tests fail randomly on slow buildbots.

Use a reliable threading.Event to fix these tests.

Other changes:

* Replace send() with sendall()
* Expect specific BlockingIOError rather than generic OSError
* Add a timeout to select() in testAccept() and testRecv()
* Use addCleanup() to close sockets
* Use assertRaises()
(cherry picked from commit ebd5d6d6e6e4e751ba9c7534004aadfc27ba9265)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)
Miss Islington (bot) [Fri, 30 Nov 2018 07:59:41 +0000 (23:59 -0800)] 
bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)

(cherry picked from commit a2e3585e79c93b2372dbad46a744e28fcc6dad6d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years ago[3.7] bpo-34279: Synchronize regrtest with master (GH-10800)
Miss Islington (bot) [Thu, 29 Nov 2018 20:39:04 +0000 (12:39 -0800)] 
[3.7] bpo-34279: Synchronize regrtest with master (GH-10800)

* bpo-34605, libregrtest: Rename --slaveargs to --worker-args (GH-9099)

Rename also run_tests_slave() to run_tests_worker().

(cherry picked from commit 012f5b968a738b15ae9b40c499a1c0778b0615a9)

* bpo-34279, regrtest: Issue a warning if no tests have been executed (GH-10150)

(cherry picked from commit 9724348b43a9005a449ba532ccd3c6726f031097)

* test_regrtest: remove unused threading import
(cherry picked from commit 8a73cac618a050f4e74eb38ff43e48d9957a6dec)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-33012: Fix more invalid function cast warnings with gcc 8. (GH-10751) (GH-10796)
Victor Stinner [Thu, 29 Nov 2018 14:49:20 +0000 (15:49 +0100)] 
bpo-33012: Fix more invalid function cast warnings with gcc 8. (GH-10751) (GH-10796)

Fix warnings with gcc 8 for wrapperfunc <-> wrapperfunc_kwds casts.

(cherry picked from commit 1c607155c9e363489036ae6258b165a3fae75134)

6 years ago[3.6] bpo-31625: Stop using ranlib (GH-10417)
stratakis [Thu, 29 Nov 2018 14:43:24 +0000 (15:43 +0100)] 
[3.6] bpo-31625: Stop using ranlib (GH-10417)

* stop using ranlib (closes bpo-31625) (#3815)

Instead, simply pass 's' to ar.

* explicitly list objects for the ar command (#3824)

$^ is not portable.

closes bpo-31625

6 years agobpo-27903: Fix ResourceWarning in platform.dist() (GH-10792)
Miss Islington (bot) [Thu, 29 Nov 2018 11:53:19 +0000 (03:53 -0800)] 
bpo-27903: Fix ResourceWarning in platform.dist() (GH-10792)

Fix ResourceWarning in platform.dist() and
platform.linux_distribution() on SuSE and Caldera OpenLinux.

Patch by Ville Skyttä.
(cherry picked from commit 7eeab87263b831adbe617a4af7ec5b5d9296962a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-16086: Fix PyType_GetFlags() documentation (GH-10758) (GH-10790)
Miss Islington (bot) [Thu, 29 Nov 2018 11:07:38 +0000 (03:07 -0800)] 
bpo-16086: Fix PyType_GetFlags() documentation (GH-10758) (GH-10790)

PyType_GetFlags() return type is unsigned long, not long.
(cherry picked from commit 9fbcfc08e5814d7aa9287740187e461425a99f67)

Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
6 years agobpo-35189, bpo-35316: Make test_eintr less strict (GH-10782)
Miss Islington (bot) [Thu, 29 Nov 2018 00:57:18 +0000 (16:57 -0800)] 
bpo-35189, bpo-35316: Make test_eintr less strict (GH-10782)

test_eintr no longer fails if the signal handler has not been called.
(cherry picked from commit 2956bffbc00127af65f69e04d7979021a21d1288)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agopythoninfo: log more environment variable (GH-10719) (GH-10770)
Victor Stinner [Wed, 28 Nov 2018 17:04:51 +0000 (18:04 +0100)] 
pythoninfo: log more environment variable (GH-10719) (GH-10770)

Log TZ to debug a timezone issue... and a few more :-)

(cherry picked from commit 282c03d45d2d766c55904a4eb766923a2c459124)

6 years ago[3.6] Doc: Delete "how do I emulate os.kill" section in Windows FAQ (GH-10487) (GH...
Julien Palard [Wed, 28 Nov 2018 16:09:18 +0000 (17:09 +0100)] 
[3.6] Doc: Delete "how do I emulate os.kill" section in Windows FAQ (GH-10487) (GH-10768)

That section is a tip on how to kill process on Windows for Python prior to 2.7 and 3.2.
3.1 end of support was April 2012 and 2.6 was October 2013, so that hasn't been need for supported versions of Python for more than 5 years. Beside not being needed anymore for a long time, when I read it with the eyes of a Python profane, it makes Python looks bad, like a language from the parts with warts you need to circumvent.
Let's delete that :).
(cherry picked from commit a1c40014085d5cc6c12064577e8c10e7182ee9f9)

Co-authored-by: Mathieu Dupuy <deronnax@users.noreply.github.com>
6 years agobpo-33676: Fix dangling thread in _test_multiprocessing (GH-10755)
Miss Islington (bot) [Wed, 28 Nov 2018 00:37:23 +0000 (16:37 -0800)] 
bpo-33676: Fix dangling thread in _test_multiprocessing (GH-10755)

Fix WithThreadsTestPool.test_wrapped_exception()
of test_multiprocessing_fork: join the pool.

WithThreadsTestPool.test_del_pool() is now also decorated
with @support.reap_threads.
(cherry picked from commit b7278736b3ae158a7738057e3045bc767ced019e)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-33012: Fix signatures of METH_NOARGS functions. (GH-10736) (GH-10748)
Miss Islington (bot) [Tue, 27 Nov 2018 18:51:07 +0000 (10:51 -0800)] 
bpo-33012: Fix signatures of METH_NOARGS functions. (GH-10736) (GH-10748)

(cherry picked from commit 81524022d0c0df7a41f9b2b2df41e2ebe140e610)
(cherry picked from commit ad8ac54aa3d2323bdb5feb5e858a922840358187)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years ago[3.6] bpo-33029: Fix signatures of getter and setter functions. (GH-10746) (GH-10749)
Serhiy Storchaka [Tue, 27 Nov 2018 18:38:36 +0000 (20:38 +0200)] 
[3.6] bpo-33029: Fix signatures of getter and setter functions. (GH-10746) (GH-10749)

Fix also return type for few other functions (clear, releasebuffer).
(cherry picked from commit d4f9cf5545d6d8844e0726552ef2e366f5cc3abd)

6 years agobpo-33954: Rewrite FILL() macro of unicodeobject.c (GH-10740)
Victor Stinner [Tue, 27 Nov 2018 13:30:55 +0000 (14:30 +0100)] 
bpo-33954: Rewrite FILL() macro of unicodeobject.c (GH-10740)

Copy code from master: add assertions on start and value, replace 'i'
iterator with 'end' pointer for the loop stop condition.

_PyUnicode_FastFill(): fix type of 'data', it must not be constant,
since data is modified by FILL().

6 years agobpo-35317: Fix mktime() error in test_email (GH-10721)
Miss Islington (bot) [Tue, 27 Nov 2018 12:01:00 +0000 (04:01 -0800)] 
bpo-35317: Fix mktime() error in test_email (GH-10721)

Fix mktime() overflow error in test_email: run
test_localtime_daylight_true_dst_true() and
test_localtime_daylight_false_dst_true() with a specific timezone.
(cherry picked from commit cfaafda8e3e19764682abb4bd4c574accb784c42)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years ago[3.6] bpo-35255: Doc: Delete now useless Windows FAQ section (GH-10557) (GH-10725)
Julien Palard [Mon, 26 Nov 2018 17:16:13 +0000 (18:16 +0100)] 
[3.6] bpo-35255: Doc: Delete now useless Windows FAQ section (GH-10557) (GH-10725)

(cherry picked from commit 5719f275b7153a00a800f5481271a6fc26659c65)

Co-authored-by: Mathieu Dupuy <deronnax@users.noreply.github.com>
https://bugs.python.org/issue35255

6 years agobpo-33954: Fix _PyUnicode_InsertThousandsGrouping() (GH-10623) (GH-10718) (GH-10720)
Victor Stinner [Mon, 26 Nov 2018 16:03:31 +0000 (17:03 +0100)] 
bpo-33954: Fix _PyUnicode_InsertThousandsGrouping() (GH-10623) (GH-10718) (GH-10720)

Fix str.format(), float.__format__() and complex.__format__() methods
for non-ASCII decimal point when using the "n" formatter.

Rewrite _PyUnicode_InsertThousandsGrouping(): it now requires
a _PyUnicodeWriter object for the buffer and a Python str object
for digits.

(cherry picked from commit 59423e3ddd736387cef8f7632c71954c1859bed0)
(cherry picked from commit 6f5fa1b4be735159e964906ab608dc467476e47c)

6 years agobpo-35300: Add usage note to the lru_cache() docs (GH-10707) (GH-10709)
Miss Islington (bot) [Mon, 26 Nov 2018 01:01:09 +0000 (17:01 -0800)] 
bpo-35300: Add usage note to the lru_cache() docs (GH-10707) (GH-10709)

6 years agocloses bpo-35309: cpath should be capath (GH-10702)
Miss Islington (bot) [Sun, 25 Nov 2018 20:50:46 +0000 (12:50 -0800)] 
closes bpo-35309: cpath should be capath (GH-10702)

(cherry picked from commit 158695817d736df8b18682866033c87e46252309)

Co-authored-by: Boštjan Mejak <bostjan.xperia@gmail.com>
6 years agobpo-32035: Fix words about strings and bytes in zipfile documentation. (GH-10592)
Miss Islington (bot) [Sun, 25 Nov 2018 09:30:45 +0000 (01:30 -0800)] 
bpo-32035: Fix words about strings and bytes in zipfile documentation. (GH-10592)

(cherry picked from commit 4bb186d7e253ad4def875305e06690181e923dfd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-35303: Fix a reference leak in _operator.c's methodcaller_repr(). (GH-10689)
Miss Islington (bot) [Fri, 23 Nov 2018 19:58:25 +0000 (11:58 -0800)] 
bpo-35303: Fix a reference leak in _operator.c's methodcaller_repr(). (GH-10689)

(cherry picked from commit 5b83ef71d3060e1651d3680e805f13a1049c7d6d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-34812: subprocess._args_from_interpreter_flags(): add isolated (GH-10675) (GH...
Victor Stinner [Fri, 23 Nov 2018 18:02:26 +0000 (19:02 +0100)] 
bpo-34812: subprocess._args_from_interpreter_flags(): add isolated (GH-10675) (GH-10688)

The "-I" command line option (run Python in isolated mode) and -X
options (like -X faulthandler) are now also copied by the
multiprocessing and distutils modules when spawning child processes.
Previously, only -E and -s options (enabled by -I) were copied.

subprocess._args_from_interpreter_flags() now copies the -I flag
and options from sys._xoptions like -X dev.

(cherry picked from commit 9de363271519e0616f4a7b59427057c4810d3acc)

6 years ago[3.7] bpo-35189: Retry fnctl calls on EINTR (GH-10413) (GH-10678) (GH-10685)
Victor Stinner [Fri, 23 Nov 2018 18:00:16 +0000 (19:00 +0100)] 
[3.7] bpo-35189: Retry fnctl calls on EINTR (GH-10413) (GH-10678) (GH-10685)

* bpo-35189: Fix eintr_tester.py (GH-10637)

Call setitimer() before each test method, instead of once per test
case, to ensure that signals are sent in each test method.
Previously, only the first method of a testcase class got signals.

Changes:

* Replace setUpClass() with setUp() and replace tearDownClass() with
  tearDown().
* tearDown() now ensures that at least one signal has been sent.
* Replace support.run_unittest() with unittest.main() which has
  a nicer CLI and automatically discover test cases.

(cherry picked from commit aac1f81eef971876ba5b1673db9ce6620311c469)

* bpo-35189: Retry fnctl calls on EINTR (GH-10413)

Modify the following fnctl function to retry if interrupted by a signal
(EINTR): flock, lockf, fnctl.

(cherry picked from commit b409ffa848b280c1db1b4f450bfae14f263099ac)
Co-Authored-By: nierob <nierob@users.noreply.github.com>
(cherry picked from commit 56742f1eb05401a27499af0ccdcb4e4214859fd1)

6 years agobpo-29877: compileall: import ProcessPoolExecutor only when needed (GH-4856)
Miss Islington (bot) [Fri, 23 Nov 2018 17:53:17 +0000 (09:53 -0800)] 
bpo-29877: compileall: import ProcessPoolExecutor only when needed (GH-4856)

Importing ProcessPoolExecutor may hang or cause an error when the import
accesses urandom on a low resource platform

https://bugs.python.org/issue29877
(cherry picked from commit 1d817e4c8259f49602eefe9729743f6d9d748e8d)

Co-authored-by: Dustin Spicuzza <dustin@virtualroadside.com>
6 years agoLinkify SMTP.quit() in smtplib documentation. (GH-9785)
Miss Islington (bot) [Fri, 23 Nov 2018 17:00:20 +0000 (09:00 -0800)] 
Linkify SMTP.quit() in smtplib documentation. (GH-9785)

(cherry picked from commit ba57963a95a994947b8bec6869e810a74a751278)

Co-authored-by: takey <taketakeyyy@gmail.com>
6 years agobpo-9263: _PyObject_Dump() detects freed memory (GH-10061) (GH-10662) (GH-10663)
Victor Stinner [Thu, 22 Nov 2018 16:40:53 +0000 (17:40 +0100)] 
bpo-9263: _PyObject_Dump() detects freed memory (GH-10061) (GH-10662) (GH-10663)

* bpo-9263: _PyObject_Dump() detects freed memory (GH-10061)

_PyObject_Dump() now uses an heuristic to check if the object memory
has been freed: log "<freed object>" in that case.

The heuristic rely on the debug hooks on Python memory allocators
which fills the memory with DEADBYTE (0xDB) when memory is
deallocated. Use PYTHONMALLOC=debug to always enable these debug
hooks.

(cherry picked from commit 82af0b63b07aa8d92b50098e382b458143cfc677)

* bpo-9263: Fix _PyObject_Dump() for freed object (#10661)

If _PyObject_Dump() detects that the object is freed, don't try to
dump it (exit immediately).

Enhance also _PyObject_IsFreed(): it now detects if the pointer
itself looks like freed memory.

(cherry picked from commit 2cf5d32fd9e61488e8b0be55a2e92a752ba8b06b)
(cherry picked from commit 95036ea25d47f0081bda2ba96ea327f3375cb6a4)

6 years agobpo-24658: os.read() reuses _PY_READ_MAX (GH-10657)
Miss Islington (bot) [Thu, 22 Nov 2018 14:25:25 +0000 (06:25 -0800)] 
bpo-24658: os.read() reuses _PY_READ_MAX (GH-10657)

os_read_impl() now also truncates the size to _PY_READ_MAX
on macOS, to avoid to allocate a larger buffer even if _Py_read() is
limited to _PY_READ_MAX bytes (ex: INT_MAX on macOS).
(cherry picked from commit 9a0d7a7648547ffb77144bf2480155f6d7940dea)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-31146: Don't fallback switcher to english on not-yet pusblished languages. (GH...
Miss Islington (bot) [Wed, 21 Nov 2018 22:46:57 +0000 (14:46 -0800)] 
bpo-31146: Don't fallback switcher to english on not-yet pusblished languages. (GH-10558)

(cherry picked from commit 6b73bb523a176123a819e4ebac3727d31d861515)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years agobpo-35035: Rename email.utils documentation to email.utils.rst (GH-10023)
Miss Islington (bot) [Wed, 21 Nov 2018 12:51:26 +0000 (04:51 -0800)] 
bpo-35035: Rename email.utils documentation to email.utils.rst (GH-10023)

I'll watch for 404 on the old URL and will setup an HTTP redirection if needed.
(cherry picked from commit 361e8683e7340c600b22f4a514b81448ccec66dc)

Co-authored-by: Zhiming Wang <github@zmwang.pw>
6 years agobpo-35221: Additional hint that the placeholder is to be replaced. (GH-10604) (GH...
Miss Islington (bot) [Wed, 21 Nov 2018 08:48:42 +0000 (00:48 -0800)] 
bpo-35221: Additional hint that the placeholder is to be replaced. (GH-10604) (GH-10630)

(cherry picked from commit d936a8f8e0964de1147656f1435532f0170f8b6c)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years agobpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) (GH-10619) (GH-10621)
Victor Stinner [Tue, 20 Nov 2018 21:36:15 +0000 (22:36 +0100)] 
bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) (GH-10619) (GH-10621)

locale.localeconv() now sets temporarily the LC_CTYPE locale to the
LC_MONETARY locale if the two locales are different and monetary
strings are non-ASCII. This temporary change affects other threads.

Changes:

* locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode
  monetary fields.
* Add LocaleInfo.grouping_buffer: copy localeconv() grouping string
  since it can be replaced anytime if a different thread calls
  localeconv().

(cherry picked from commit 02e6bf7f2025cddcbde6432f6b6396198ab313f4)
(cherry picked from commit 6eff6b8eecd7a8eccad16419269fa18ec820922e)

6 years agobpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039)
Miss Islington (bot) [Tue, 20 Nov 2018 19:02:49 +0000 (11:02 -0800)] 
bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039)

Fixes assertion failures in _datetimemodule.c
introduced in the previous fix (see bpo-31752).

Rather of trying to handle an int subclass as exact int,
let it to use overridden special methods, but check the
result of divmod().
(cherry picked from commit 3ec0f495163da3b7a15deb2805cec48aed432f58)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-9842: Add references for using "..." as a placeholder to the index. (GH-10330)
Miss Islington (bot) [Tue, 20 Nov 2018 18:08:07 +0000 (10:08 -0800)] 
bpo-9842: Add references for using "..." as a placeholder to the index. (GH-10330)

(cherry picked from commit 6c48bf2d9e1e18dfbfa35f7582ddd32f11f75129)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agoUpgrade pip to 18.1 and setuptools to 40.6.2 (GH-10598)
Miss Islington (bot) [Mon, 19 Nov 2018 13:07:16 +0000 (05:07 -0800)] 
Upgrade pip to 18.1 and setuptools to 40.6.2 (GH-10598)

(cherry picked from commit 8b9c33ea9ce902f902c9d9900121010801950547)

Co-authored-by: Donald Stufft <donald@stufft.io>
6 years ago[3.6] bpo-25438: document what codec PyMemberDef T_STRING decodes the char * as ...
Miss Islington (bot) [Sat, 17 Nov 2018 19:50:25 +0000 (11:50 -0800)] 
[3.6] bpo-25438: document what codec PyMemberDef T_STRING decodes the char * as (GH-10580) (GH-10587)

Source of T_STRING: https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Python/structmember.cGH-L51

Source of PyUnicode_FromString
https://github.com/python/cpython/blob/master/Include/unicodeobject.hGH-L702

https://bugs.python.org/issue25438
(cherry picked from commit 689d555ec135d4115574addd063c358ac4897cc4)

Co-authored-by: Windson yang <wiwindson@outlook.com>
https://bugs.python.org/issue25438

6 years agobpo-35202: Remove more unused imports in idlelib (GH-10573)
Miss Islington (bot) [Sat, 17 Nov 2018 07:00:32 +0000 (23:00 -0800)] 
bpo-35202: Remove more unused imports in idlelib (GH-10573)

(cherry picked from commit 5a087d5401e6956cf4c6d95f15fedabf39a4f5af)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
6 years agoAdd a missed PyErr_NoMemory() in symtable_new(). (GH-10576)
Miss Islington (bot) [Fri, 16 Nov 2018 16:31:57 +0000 (08:31 -0800)] 
Add a missed PyErr_NoMemory() in symtable_new(). (GH-10576)

This missed PyErr_NoMemory() could cause a SystemError when calling
_symtable.symtable().
(cherry picked from commit ad65f15581173542f1d2a9968a63bee272510ce3)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565)
Miss Islington (bot) [Fri, 16 Nov 2018 13:56:33 +0000 (05:56 -0800)] 
bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565)

(cherry picked from commit 4edeaeac4c194ba5d09187640b5cfca5e03be617)

Co-authored-by: Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) <thatiparthysreenivas@gmail.com>
6 years agobpo-33816: Remove outdated metaclass example (GH-7566)
Miss Islington (bot) [Fri, 16 Nov 2018 11:58:09 +0000 (03:58 -0800)] 
bpo-33816: Remove outdated metaclass example (GH-7566)

(cherry picked from commit c2ccac7b9f9a1132ca36255b0ddfeecef4371aa3)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
6 years agobpo-35213: Where appropriate, use 'macOS' in idlelib. (GH-10478)
Miss Islington (bot) [Thu, 15 Nov 2018 19:31:52 +0000 (11:31 -0800)] 
bpo-35213: Where appropriate, use 'macOS' in idlelib. (GH-10478)

(cherry picked from commit b65413b497a07f521d835b799be7dd0afcedbd65)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agoFix a possible reference leak in _socket.getaddrinfo(). (GH-10543)
Miss Islington (bot) [Thu, 15 Nov 2018 09:25:46 +0000 (01:25 -0800)] 
Fix a possible reference leak in _socket.getaddrinfo(). (GH-10543)

"single" needs to be decrefed if PyList_Append() fails.
(cherry picked from commit 4c596d54aa6a55e9d2a3db78891e656ebbfb63c8)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agoFix typo in asynchronous generator iterator documentation (GH-10542)
Miss Islington (bot) [Thu, 15 Nov 2018 06:20:51 +0000 (22:20 -0800)] 
Fix typo in asynchronous generator iterator documentation (GH-10542)

Remove an unnecessary "that":
... will execute that the body ... ->  ... will execute the body ...
(cherry picked from commit 25221b328339fb1726b58742e91b6e49c178023a)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
6 years ago[3.6] bpo-32613: Update window FAQ (GH-5552). (GH-10545)
Julien Palard [Wed, 14 Nov 2018 17:19:16 +0000 (18:19 +0100)] 
[3.6] bpo-32613: Update window FAQ (GH-5552). (GH-10545)

(cherry picked from commit 64313478bcbd0a708c3ce5d4d14f977da56e4be9)

Co-authored-by: Julien Palard <julien@palard.fr>
https://bugs.python.org/issue32613

6 years agoGrammar corrections in abc.rst (GH-10525)
Miss Islington (bot) [Wed, 14 Nov 2018 01:03:21 +0000 (17:03 -0800)] 
Grammar corrections in abc.rst (GH-10525)

(cherry picked from commit 8e0b05e2f4b9fd703cbe1ae8d058852ef3781f44)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
6 years agoLink to property built-in in abc.rst (GH-10526)
Miss Islington (bot) [Wed, 14 Nov 2018 00:47:31 +0000 (16:47 -0800)] 
Link to property built-in in abc.rst (GH-10526)

(cherry picked from commit bf1355b4240173a306dd46e720ae4b696277bb41)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
6 years agoFix doc typo: Window -> Windows (GH-10508)
Miss Islington (bot) [Wed, 14 Nov 2018 00:23:50 +0000 (16:23 -0800)] 
Fix doc typo: Window -> Windows (GH-10508)

(cherry picked from commit daeb3c4c58663c2e2a3ddf1c2fbbff9a06269961)

Co-authored-by: l-n-s <supervillain@riseup.net>
6 years agobpo-35214: Fix OOB memory access in unicode escape parser (GH-10506)
Miss Islington (bot) [Tue, 13 Nov 2018 21:49:59 +0000 (13:49 -0800)] 
bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506)

Discovered using clang's MemorySanitizer when it ran python3's
test_fstring test_misformed_unicode_character_name.

An msan build will fail by simply executing: ./python -c 'u"\N"'
(cherry picked from commit 746b2d35ea47005054ed774fecaed64fab803d7d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years agobpo-29564:_PyMem_DumpTraceback() suggests enabling tracemalloc (GH-10510) (GH-10518)
Victor Stinner [Tue, 13 Nov 2018 15:13:17 +0000 (16:13 +0100)] 
bpo-29564:_PyMem_DumpTraceback() suggests enabling tracemalloc (GH-10510) (GH-10518)

If tracemalloc is not tracing Python memory allocations,
_PyMem_DumpTraceback() now suggests to enable tracemalloc
to get the traceback where the memory block has been allocated.

6 years agobpo-35229: Deprecate _PyObject_GC_TRACK() (GH-10511)
Miss Islington (bot) [Tue, 13 Nov 2018 12:14:56 +0000 (04:14 -0800)] 
bpo-35229: Deprecate _PyObject_GC_TRACK() (GH-10511)

Deprecate _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() in the
documentation. These macros are removed from Python 3.8 by the commit
1a6be91e6fd65ce9cb88cbbbb193db7e92ec6076.
(cherry picked from commit 55b4771d5d18d5ff7c095aa1ab750fe0c8bb5e67)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
6 years agobpo-35214: Add _Py_ prefix to MEMORY_SANITIZER def. (GH-10503)
Miss Islington (bot) [Tue, 13 Nov 2018 06:27:05 +0000 (22:27 -0800)] 
bpo-35214: Add _Py_ prefix to MEMORY_SANITIZER def. (GH-10503)

Rename our new MEMORY_SANITIZER define to _Py_MEMORY_SANITIZER.
Project based C Preprocessor namespacing at its finest. :P
(cherry picked from commit 3015fb8ce4d25603434b9b44bb7effb98a481532)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years agoDisable getc_unlocked() with MemorySanitizer. (GH-10499)
Miss Islington (bot) [Tue, 13 Nov 2018 04:18:15 +0000 (20:18 -0800)] 
Disable getc_unlocked() with MemorySanitizer. (GH-10499)

clang's MemorySanitizer understand getc() but does not understand
getc_unlocked().  Workaround: Don't use it on msan builds.
(cherry picked from commit e6c77d8301ec1703abb755a7d3ce5bd8c999c082)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years ago[3.6] bpo-35214: Initial clang MemorySanitizer support (GH-10479) (GH-10493)
Gregory P. Smith [Tue, 13 Nov 2018 00:10:21 +0000 (16:10 -0800)] 
[3.6] bpo-35214: Initial clang MemorySanitizer support (GH-10479) (GH-10493)

Adds configure flags for msan and ubsan builds to make it easier to enable.
These also encode the detail that address sanitizer and memory sanitizer
should disable pymalloc.

Define MEMORY_SANITIZER when appropriate at build time and adds workarounds
to existing code to mark things as initialized where the sanitizer is otherwise unable to
determine that.  This lets our build succeed under the memory sanitizer.  not all tests
pass without sanitizer failures yet but we're in pretty good shape after this.

(cherry picked from commit 1584a0081500d35dc93ff88e5836df35faf3e3e2)

Contributed by Gregory P. Smith [Google LLC]

Also includes a whitespace fix from make patchcheck to _posixsubprocess.c - unrelated to the main change that makes the CI happy so I'm just doing it now rather than creating a separate PR.

6 years agoImprove grammar in Glossary. (GH-10474)
Miss Islington (bot) [Mon, 12 Nov 2018 17:49:47 +0000 (09:49 -0800)] 
Improve grammar in Glossary. (GH-10474)

a asynchronous generator -> an asynchronous generator
(cherry picked from commit a9655b7f71b8976c369160ef362d0e706cfcd8c9)

Co-authored-by: Windson yang <wiwindson@outlook.com>
6 years agoLinkify PEP 8 in unix.rst (GH-10482)
Miss Islington (bot) [Mon, 12 Nov 2018 16:49:10 +0000 (08:49 -0800)] 
Linkify PEP 8 in unix.rst (GH-10482)

(cherry picked from commit 9404e7737bd09bc1df154e1216d721e5168e4c68)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
6 years agoMinor grammar improvement to io documentation. (GH-10329)
Miss Islington (bot) [Mon, 12 Nov 2018 04:30:14 +0000 (20:30 -0800)] 
Minor grammar improvement to io documentation. (GH-10329)

Independently of -> Independent of
(cherry picked from commit cd449806fac1246cb7b4d392026fe6986ec01fb7)

Co-authored-by: Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) <thatiparthysreenivas@gmail.com>
6 years agobpo-33878: Doc: Fix missing case by simplifying. (GH-7762)
Miss Islington (bot) [Mon, 12 Nov 2018 00:24:41 +0000 (16:24 -0800)] 
bpo-33878: Doc: Fix missing case by simplifying. (GH-7762)

The documentation was not covering multiple targets enclosed by
parenthesis nor multiple targets enclosed by brackets, adding them all
would be heavy, an else cover them all and is lighter to read.
(cherry picked from commit 082875dcd6d482558e5f1da97a1c801d60b3ed5b)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years agocloses bpo-35204: Disable thread and memory sanitizers for address_in_range(). (GH...
Miss Islington (bot) [Sun, 11 Nov 2018 23:47:59 +0000 (15:47 -0800)] 
closes bpo-35204: Disable thread and memory sanitizers for address_in_range(). (GH-10442)

This function may access memory which is mapped but is considered
free by libc allocator. It behaves so by design, therefore we
need to suppress sanitizer reports.

GCC doesn't support MSan, so disable only TSan for it.
(cherry picked from commit fd3a91cbf93dd7bd97f01add9c90075d63cd7316)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
6 years agobpo-33699: Describe try's else clause with the rest of the try clause (GH-7252)
Miss Islington (bot) [Sun, 11 Nov 2018 19:44:31 +0000 (11:44 -0800)] 
bpo-33699: Describe try's else clause with the rest of the try clause (GH-7252)

https://bugs.python.org/issue33699
(cherry picked from commit b086c8afdb8c862011e3e27d4c8f6833749f2c56)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
6 years agobpo-34864: Document two IDLE on MacOS issues. (GH-10456)
Miss Islington (bot) [Sun, 11 Nov 2018 04:49:10 +0000 (20:49 -0800)] 
bpo-34864: Document two IDLE on MacOS issues. (GH-10456)

The System Preferences Dock "prefer tabs always" setting disables some
IDLE features.  Menus are a bit different than as described for Windows
and Linux.
(cherry picked from commit 50ff02b43145f33f8e28ffbfcc6a9d15c4749a64)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
7 years agobpo-35202: Remove unused imports in idlelib (GH-10438)
Miss Islington (bot) [Sat, 10 Nov 2018 07:08:05 +0000 (23:08 -0800)] 
bpo-35202: Remove unused imports in idlelib (GH-10438)

(cherry picked from commit 43a74abb3a87092a7fd6c71042eafb977d70d8e0)

Co-authored-by: Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) <thatiparthysreenivas@gmail.com>
7 years agoCorrect a typo in the Unittest documentation (GH-10397)
Miss Islington (bot) [Fri, 9 Nov 2018 19:50:52 +0000 (11:50 -0800)] 
Correct a typo in the Unittest documentation (GH-10397)

Co-Authored-By: maggyero <gery.ogam@gmail.com>
(cherry picked from commit 009b2f02049eda3b29d4f4f743e51df106686375)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
7 years ago[3.6] Doc: Make all versions sidebars the same for consistency. (GH-10288) (GH-10404)
Miss Islington (bot) [Fri, 9 Nov 2018 19:21:59 +0000 (11:21 -0800)] 
[3.6] Doc: Make all versions sidebars the same for consistency. (GH-10288) (GH-10404)

(cherry picked from commit 556d50d03dd1d457c01ab552c8bc81f3431a0746)

Co-authored-by: Julien Palard <julien@palard.fr>
7 years agoCleanup and improve the regex tokenizer example. (GH-10426) (#10428)
Miss Islington (bot) [Fri, 9 Nov 2018 09:27:10 +0000 (01:27 -0800)] 
Cleanup and improve the regex tokenizer example. (GH-10426) (#10428)

1) Convert weird field name "typ" to the more standard "type".
2) For the NUMBER type, convert the value to an int() or float().
3) Simplify ``group(kind)`` to the shorter and faster ``group()`` call.
4) Simplify logic go a single if-elif chain to make this easier to extend.
5) Reorder the tests to match the order the tokens are specified.
   This isn't necessary for correctness but does make the example
   easier to follow.
6) Move the "column" calculation before the if-elif chain so that
   users have the option of using this value in error messages.
(cherry picked from commit b83942c755a78f6d917743b73ed87a8fd9f367de)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
7 years agobpo-35194: Fix a wrong constant in cp932 codec (GH-10420)
Miss Islington (bot) [Fri, 9 Nov 2018 07:33:10 +0000 (23:33 -0800)] 
bpo-35194: Fix a wrong constant in cp932 codec (GH-10420)

This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.

https://bugs.python.org/issue35194
(cherry picked from commit 7a69cf47a9bbc95f95fd67c982bff121b2a903cb)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
7 years agobpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418) (GH-10422)
Gregory P. Smith [Fri, 9 Nov 2018 07:30:36 +0000 (23:30 -0800)] 
bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418) (GH-10422)

Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return.

Do a bounds check within find_op so it can return before going past the end as a safety measure.

https://github.com/python/cpython/commit/7db3c488335168993689ddae5914a28e16188447#diff-a33329ae6ae0bb295d742f0caf93c137
introduced this off by one error while fixing another one nearby.

This bug was shipped in all Python 3.6 and 3.7 releases.

The included unittest won't fail unless you do a clang msan build.

(cherry picked from commit 49fa4a9f1ef387e16596f271414c855339eadf09)

7 years agobpo-34966: Improve support of method aliases in pydoc. (GH-9823)
Miss Islington (bot) [Thu, 8 Nov 2018 07:20:27 +0000 (23:20 -0800)] 
bpo-34966: Improve support of method aliases in pydoc. (GH-9823)

Pydoc now does not duplicate docstrings for aliases of inherited methods.
(cherry picked from commit a44d34e17908a49d584f86c4f8642a50707b7150)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years agoAdd future_stmt to simple_stmt production list. (GH-8239)
Miss Islington (bot) [Thu, 8 Nov 2018 05:16:16 +0000 (21:16 -0800)] 
Add future_stmt to simple_stmt production list. (GH-8239)

(cherry picked from commit cdb96f45b61a40a7e7c4c83b4b1f14ef6f5cf4fa)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years agoFix the construction of subprocess.CalledProcessError in test_venv (GH-10400)
Miss Islington (bot) [Wed, 7 Nov 2018 22:46:10 +0000 (14:46 -0800)] 
Fix the construction of subprocess.CalledProcessError in test_venv (GH-10400)

The constructor of subprocess.CalledProcessError in the check_output function had an extra None in it.
(cherry picked from commit b93925047a025511c48a7bf3e6e6f0cfec79b8ed)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
7 years ago[3.6] bpo-31354: Let configure --with-lto work on all builds (GH-10261)
stratakis [Wed, 7 Nov 2018 22:05:13 +0000 (23:05 +0100)] 
[3.6] bpo-31354: Let configure --with-lto work on all builds (GH-10261)

Allow configure --with-lto to apply to all builds, not just profile-opt builds.

Whether this is actually useful or not must be determined by the person
building CPython using their own toolchain.

My own quick test on x86_64 Debian 9 (gcc 6.3, binutils 2.28) seemed
to suggest that it wasn't, but I expect better toolchains can or will exist
at some point.  The point is to allow it at all.

7 years agoAdd link to PEP 525 in Expressions. (GH-10333)
Miss Islington (bot) [Wed, 7 Nov 2018 18:35:39 +0000 (10:35 -0800)] 
Add link to PEP 525 in Expressions. (GH-10333)

(cherry picked from commit bfe1839aa994f0d84471254418a4ecfa7c7c9b9c)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years agoglob uses fnmatch.filter instead of fnmatch since 2001. (GH-10102)
Miss Islington (bot) [Wed, 7 Nov 2018 18:30:27 +0000 (10:30 -0800)] 
glob uses fnmatch.filter instead of fnmatch since 2001. (GH-10102)

(cherry picked from commit ae31e3fbf4e7def772fc1c94342d1011424fdc99)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years agoAdd a reference to the name mangling description in the tutorial to the index. (GH...
Miss Islington (bot) [Wed, 7 Nov 2018 18:30:06 +0000 (10:30 -0800)] 
Add a reference to the name mangling description in the tutorial to the index. (GH-10138)

(cherry picked from commit c5eec4426d9144b2255500217d0e3ff9463d2770)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years agoCorrect grammar mistakes in string.rst. (GH-9752)
Miss Islington (bot) [Wed, 7 Nov 2018 17:55:02 +0000 (09:55 -0800)] 
Correct grammar mistakes in string.rst. (GH-9752)

(cherry picked from commit d64991031e4c86ce0331caac16770757511dd025)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years agoMark len call as a code snippet in stdtypes.rst. (GH-9804)
Miss Islington (bot) [Wed, 7 Nov 2018 17:54:48 +0000 (09:54 -0800)] 
Mark len call as a code snippet in stdtypes.rst. (GH-9804)

(cherry picked from commit ca03f3b93ee5c2943a2b8cbf9447f99f835ec672)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years agoMark -c and -O as command line options in reStructuredText. (GH-10103)
Miss Islington (bot) [Wed, 7 Nov 2018 17:53:27 +0000 (09:53 -0800)] 
Mark -c and -O as command line options in reStructuredText. (GH-10103)

(cherry picked from commit ea6a28c9f7e4baa5fe775cebce697a14a7d7da8b)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years agobpo-33000: Document that IDLE's shell has no line limit. (GH-10373)
Miss Islington (bot) [Wed, 7 Nov 2018 05:18:38 +0000 (21:18 -0800)] 
bpo-33000: Document that IDLE's shell has no line limit. (GH-10373)

A program that runs indefinitely can overfill memory.
(cherry picked from commit 76cd0c30d60961d1a10e2673834a455d2b51f695)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
7 years agobpo-23220: Explain how IDLE's Shell displays output (GH-10356) (#10369)
Miss Islington (bot) [Tue, 6 Nov 2018 18:59:39 +0000 (10:59 -0800)] 
bpo-23220: Explain how IDLE's Shell displays output (GH-10356) (#10369)

Add a new subsection to the doc.
(cherry picked from commit 75d9d59ab3a372d3d78e6a1f5e9f256e29d0a9a6)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
7 years agocloses bpo-35171: Fix test_TimeRE_recreation_timezone failure on some systems. (GH...
Miss Islington (bot) [Tue, 6 Nov 2018 04:50:04 +0000 (20:50 -0800)] 
closes bpo-35171: Fix test_TimeRE_recreation_timezone failure on some systems. (GH-10347)

The test depended on '/usr/share/zoneinfo/posixrules' or equivalent
because it set TZ without explicit DST transition rules. At least
on OpenSUSE Tumbleweed that file is linked to '/etc/localtime',
making the test fail with certain local timezones,
such as 'Europe/Moscow' which doesn't have DST transitions since 2011.
(cherry picked from commit f1b9ad3d38c11676b45edcbf2369239bae436e56)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
7 years agobpo-35099: Update idlelib/help.html (GH-10353)
Miss Islington (bot) [Tue, 6 Nov 2018 03:39:53 +0000 (19:39 -0800)] 
bpo-35099: Update idlelib/help.html (GH-10353)

(This should have been done with the first PR for this issue.)
(cherry picked from commit f1d3efc2fba704692d539acc3cb0376a1dd9d98f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
7 years agobpo-35099: Improve the doc about IDLE running user code. (GH-10350)
Miss Islington (bot) [Tue, 6 Nov 2018 02:35:51 +0000 (18:35 -0800)] 
bpo-35099: Improve the doc about IDLE running user code. (GH-10350)

The section is renamed from "IDLE -- console differences".  It mostly
covers the implications of using custom sys.stdxxx objects.
(cherry picked from commit 5e7909032491cef17754a3208872655fe350e9be)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
7 years ago[Docs] Fix required version of an example of importlib (GH-10118)
Miss Islington (bot) [Mon, 5 Nov 2018 22:47:51 +0000 (14:47 -0800)] 
[Docs] Fix required version of an example of importlib (GH-10118)

§31.5.6.3. Importing a source file directly: `module_from_spec` is new in Python 3.5.
(cherry picked from commit 16c8a53490a22bd4fcde2efaf4694dd06ded882b)

Co-authored-by: E Kawashima <e-kwsm@users.noreply.github.com>
7 years ago[3.6] bpo-35167: Specify program for json.tool command line options. (GH-10332) ...
Miss Islington (bot) [Mon, 5 Nov 2018 17:51:36 +0000 (09:51 -0800)] 
[3.6] bpo-35167: Specify program for json.tool command line options. (GH-10332) (GH-10338) (GH-10339)

(cherry picked from commit 083a7a172b8c8888252d72031f21dcfea3c0d73f)
(cherry picked from commit 6ad277b2592cfac0f138e9adca4374dd1f354bdf)

7 years ago[3.6] bpo-35133: Fix mistakes when concatenate string literals on different lines...
Serhiy Storchaka [Mon, 5 Nov 2018 15:13:50 +0000 (17:13 +0200)] 
[3.6] bpo-35133: Fix mistakes when concatenate string literals on different lines. (GH-10284) (GH-10335)

Two kind of mistakes:

1. Missed space. After concatenating there is no space between words.

2. Missed comma. Causes unintentional concatenating in a list of strings..
(cherry picked from commit 34fd4c20198dea6ab2fe8dc6d32d744d9bde868d)

7 years agobpo-21263: Skip test_gdb when python has been compiled with LLVM clang (GH-10318...
Miss Islington (bot) [Sun, 4 Nov 2018 21:40:25 +0000 (13:40 -0800)] 
bpo-21263: Skip test_gdb when python has been compiled with LLVM clang (GH-10318) (GH-10326)

(cherry picked from commit 59668aa8b7f174b59304eab833c1c1181886c3c6)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
7 years agoFix a typo about a comma. (GH-10306)
Miss Islington (bot) [Sat, 3 Nov 2018 17:41:45 +0000 (10:41 -0700)] 
Fix a typo about a comma. (GH-10306)

(cherry picked from commit fe62d877e300e1ee4145fff8f2bdba498b685f91)

Co-authored-by: İsmail Arılık <arilik.ismail@gmail.com>
7 years ago[3.6] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10302)
Alexey Izbyshev [Fri, 2 Nov 2018 18:23:51 +0000 (21:23 +0300)] 
[3.6] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10302)

Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`.

(cherry picked from commit e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd)

7 years ago[3.6]bpo-29341: Backport b942707 3.6 (GH-10299)
BNMetrics [Fri, 2 Nov 2018 17:55:31 +0000 (17:55 +0000)] 
[3.6]bpo-29341: Backport b942707 3.6 (GH-10299)

Some methods in the os module can accept path-like objects. This is documented in the general documentation but not in the function docstrings. To keep both in sync, the docstrings need to be updated to reflect that path-like objects are also accepted..
(cherry picked from commit b942707fc23454a998323c17e30be78ff1a4f0e7)

Co-authored-by: BNMetrics <luna@bnmetrics.com>