Commit Graph

102919 Commits

Author SHA1 Message Date
Miss Islington (bot) b23b08623a
bpo-34085: Improve wording on classmethod/staticmethod (GH-8228)
* bpo-34085: Improve wording on classmethod/staticmethod

* Address comments from Éric

* Address comments from Éric
(cherry picked from commit 548cb6060a)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-03-25 16:00:00 -07:00
Miss Islington (bot) cdd8d4d6dd bpo-36370: Check for PyErr_Occurred() after PyImport_GetModule() (GH-12504) 2019-03-25 22:36:43 +01:00
Ned Deily ef4ec6ed12 3.7.3 2019-03-25 16:21:05 -04:00
Miss Islington (bot) f3c5535f63 Add note to Queue.get() docs about block=True (GH-2223) (GH-12538)
(cherry picked from commit 713a8ae792)

Co-authored-by: Stephen Rosen <sirosen@globus.org>
2019-03-25 13:03:16 -07:00
Miss Islington (bot) fa27870992
bpo-36421: Fix a possible double decref in _ctypes.c's PyCArrayType_new(). (GH-12530)
Set type_attr to NULL after the assignment to stgdict->proto (like
what is done with stgdict after the Py_SETREF() call) so that it is
not decrefed twice on error.
(cherry picked from commit 5e333784f0)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-03-25 01:34:26 -07:00
Miss Islington (bot) 9dbb09fc27 bpo-36218: Fix handling of heterogeneous values in list.sort (GH-12209) GH-12532)
(cherry picked from commit dd5417afcf)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-03-25 00:47:55 -07:00
Miss Islington (bot) 3ee1266388 Fix registry key for Windows SDK detection (GH-12445)
(cherry picked from commit aedc273fd9)

Co-authored-by: Isuru Fernando <isuruf@gmail.com>
2019-03-24 22:22:51 -04:00
Harmon ab8fcfda90 Fix "catchs" typos in NEWS entries (GH-12364) 2019-03-24 22:22:36 -04:00
Ned Deily b7540e096e Remove NEWS entries duplicated from 3.7.2final. (GH-12309) 2019-03-24 22:22:19 -04:00
Miss Islington (bot) 276dcc8cfb bpo-36174: Update nuget authoring for new license field. (GH-12300)
(cherry picked from commit 26c910c59c)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-03-24 22:22:01 -04:00
Ned Deily ab48fc0b9f Correct minor edit to news entry. (GH-12299) 2019-03-24 22:21:46 -04:00
Miss Islington (bot) 0e05d8a82d
bpo-30348: IDLE: Add test_autocomplete unittest (GH-2209)
(cherry picked from commit 113d735e20)

Co-authored-by: Louie Lu <git@louie.lu>
2019-03-24 16:53:13 -07:00
Miss Islington (bot) fc00102363
bpo-31822: Document that urllib.parse.{Defrag,Split,Parse}Result are namedtuples (GH-4434)
(cherry picked from commit 13c1f72cd1)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
2019-03-24 14:56:27 -07:00
Miss Islington (bot) 2b580146a5
bpo-36405: IDLE - Restore __main__ and add tests (GH-12518)
Fix error in commit 2b75155 noticed by Serhiy Storchaka.
(cherry picked from commit 0fe4513d9a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-03-24 14:32:40 -07:00
Miss Islington (bot) 4d5f1a4bb9
[3.7] Replace "DOS box" with link to Windows FAQ. (GH-12390) (GH-12525)
(cherry picked from commit 6661c1720e)


Co-authored-by: Ned Deily <nad@python.org>
2019-03-24 12:12:05 -07:00
Miss Islington (bot) d93de028e8
bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)
Check for sys.abiflags before using since not all platforms have it defined.
(cherry picked from commit a7987e7193)

Co-authored-by: AraHaan <15173749+AraHaan@users.noreply.github.com>
2019-03-23 09:47:40 -07:00
Miss Islington (bot) 5ab665005b
bpo-23205: IDLE: Add tests and refactor grep's findfiles (GH-12203)
* Add tests for grep findfiles.
* Move findfiles to module function.
* Change findfiles to use os.walk.

Based on a patch by Al Sweigart.
(cherry picked from commit d60f658fc0)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-03-23 05:21:46 -07:00
Miss Islington (bot) 00986ec553
bpo-36405: Use dict unpacking in idlelib (GH-12507)
Remove now unneeded imports.
(cherry picked from commit 2b75155590)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-03-23 01:08:37 -07:00
Miss Islington (bot) 9cdac5ced6
bpo-33319: Clarify subprocess call docs. (GH-12508)
Clarify capturing or suppressing stdout and stderr on the old call APIs.

Do not state that they are equivalent to run() calls when they are not implemented using run as that was misleading. Unlike run they cannot handle stdout or stderr being set to PIPE without a risk of deadlock.
(cherry picked from commit 7a2e84c348)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2019-03-23 00:46:15 -07:00
Miss Islington (bot) 868581ee76
bpo-35155: clarify protocol handler method naming (GH-10313)
Clarify that the naming of protocol handler methods shouldn't be literally called "protocol" but should be named after the actual protocol.

https://bugs.python.org/issue35155
(cherry picked from commit dd7c4ceed9)

Co-authored-by: Denton Liu <liu.denton+github@gmail.com>
2019-03-22 16:30:04 -07:00
Miss Islington (bot) 2d7798ad12
bpo-36396: Remove fgBg param of idlelib.config.GetHighlight() (GH-12491)
This param was only used once and changed the return type.
(cherry picked from commit c1419578a1)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-03-22 15:42:51 -07:00
Zackery Spytz bdb9c497e1 bpo-35284: Fix the error handling in the compiler's compiler_call(). (GH-10625) (GH-12496)
compiler_call() needs to check if an error occurred during the
maybe_optimize_method_call() call.
(cherry picked from commit 97f5de01ad)
2019-03-22 15:20:49 +02:00
Miss Islington (bot) cb2d71b28e bpo-23984: Improve descriptor documentation (GH-1034) (GH-12459) 2019-03-22 01:04:21 -07:00
Miss Islington (bot) fdd82338a3
Raise the timeout in test_multiprocessing_* for slow buildbots (GH-12489)
(cherry picked from commit 40b6907b37)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-03-22 00:54:32 -07:00
Miss Islington (bot) 00eb97b4a7 bpo-36256: Fix bug in parsermodule when parsing if statements (GH-12488)
bpo-36256: Fix bug in parsermodule when parsing if statements

In the parser module, when validating nodes before starting the parsing with to create a ST in "parser_newstobject" there is a problem that appears when two arcs in the same DFA state has transitions with labels with the same type. For example, the DFA for if_stmt has a state with
two labels with the same type: "elif" and "else" (type NAME). The algorithm tries one by one the arcs until the label that starts the arc transition has a label with the same type of the current child label we are trying to accept. In this case, the arc for "elif" comes before the arc for "else"and passes this test (because the current child label is "else" and has the same type as "elif"). This lead to expecting a namedexpr_test (305) instead of a colon (11). The solution is to compare also the string representation (in case there is one) of the labels to see if the transition that we have is the correct one.
(cherry picked from commit 9a0000d15d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-03-21 23:56:20 +00:00
Miss Islington (bot) cba5ddf088
Fix registry key for Windows SDK detection (GH-12445)
(cherry picked from commit aedc273fd9)

Co-authored-by: Isuru Fernando <isuruf@gmail.com>
2019-03-21 14:54:59 -07:00
Miss Islington (bot) b0967fe4ed
bpo-35978: Correctly skips venv tests in venvs (GH-12220)
Also fixes venvs from the build directory on Windows.
(cherry picked from commit 8bba81fd55)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-03-21 10:33:40 -07:00
Miss Islington (bot) b058a97c90
bpo-36245: Avoid problems when building in a directory containing spaces. (GH-12241)
(cherry picked from commit 7ee88bf3e5)

Co-authored-by: Jess <jess@gmail.com>
2019-03-21 09:25:11 -07:00
Miss Islington (bot) 74829b7323
bpo-36312: Fix decoders for some code pages. (GH-12369)
(cherry picked from commit c1e2c288f4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-03-20 21:31:57 -07:00
Victor Stinner 65b9849f0f
bpo-36367: Free buffer if realloc fails in tokenize.c (GH-12442) (GH-12471) 2019-03-20 13:03:11 +01:00
Julien Palard 756cfd8892
[3.7] bpo-35564: add master_doc='contents' to conf.py (GH-12460)
(cherry picked from commit fc8284e220)

Co-authored-by: Jean-François B <jfbu@free.fr>
2019-03-20 10:40:30 +01:00
Victor Stinner ef10f886ae
Fix compiler warning in call_readline() (GH-10820) (GH-12452)
Replace strncpy() with memcpy() in call_readline() to fix the
following warning, the NUL byte is written manually just after:

Modules/readline.c: In function ‘call_readline’:
Modules/readline.c:1303:9: warning: ‘strncpy’ output truncated before
terminating nul copying as many bytes from a string as its length
[-Wstringop-truncation]
         strncpy(p, q, n);
         ^~~~~~~~~~~~~~~~
Modules/readline.c:1279:9: note: length computed here
     n = strlen(p);
         ^~~~~~~~~

(cherry picked from commit 1600f60414)
2019-03-20 01:00:41 +01:00
Victor Stinner ea3592d7ef
bpo-36365: Fix compiler warning in structseq.c (GH-12451) 2019-03-20 00:32:11 +01:00
Victor Stinner f7959a9fe7
bpo-36236: Handle removed cwd at Python init (GH-12450)
At Python initialization, the current directory is no longer
prepended to sys.path if it has been removed.
2019-03-20 00:30:45 +01:00
Victor Stinner 935250d6f3
bpo-36356: pymain_free() calls _PyRuntime_Finalize() (GH-12436)
Ensure that _PyRuntime_Finalize() is always call. This change fix a
few memory leaks when running "python3 -V".
2019-03-19 15:08:17 +01:00
Inada Naoki 09e5877cb1
bpo-36307: Travis: upgrade to Xenial environment (GH-12356)
(cherry picked from commit 74ae50e53e)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2019-03-19 17:30:58 +09:00
Victor Stinner dd1cfefd67
bpo-36235: Enhance distutils test_customize_compiler() (GH-12403) (GH-12415)
The test test_customize_compiler() now mocks all sysconfig variables
and all environment variables used by customize_compiler().

(cherry picked from commit 72c7b372cf)
2019-03-18 18:34:11 +01:00
Miss Islington (bot) 6a7a9f1d83 bpo-36272: Logging now propagates RecursionError (GH-12312) (GH-12391)
(cherry picked from commit 65f64b1903)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-03-18 14:22:41 +00:00
Rémi Lapeyre 67294f6425 bpo-36317: Fix typo in _PyObject_FastCallDict documentation (GH-12383) (GH-12402)
(cherry picked from commit b4b97af8be)
2019-03-18 12:51:23 +01:00
Miss Islington (bot) bedfbc790e bpo-36321: Fix misspelled attribute in namedtuple() (GH-12375) (GH-12395)
(cherry picked from commit 23581c018f)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-03-18 00:48:02 -07:00
Mariatta 76ff715e03
Fix typo in unittest.mock documentation: manger -> manager (GH-12352)
(cherry picked from commit dc69f69f14)

Co-authored-by: Joan Massich <mailsik@gmail.com>
2019-03-17 16:53:06 -07:00
Harmon c49521dfd1 Fix "catchs" typos in NEWS entries (GH-12364) 2019-03-17 16:49:43 -07:00
Miss Islington (bot) 7f7485c060
bpo-34745: Fix asyncio sslproto memory issues (GH-12386)
* Fix handshake timeout leak in asyncio/sslproto

Refs MagicStack/uvloopGH-222

* Break circular ref _SSLPipe <-> SSLProtocol

* bpo-34745: Fix asyncio ssl memory leak

* Break circular ref SSLProtocol <-> UserProtocol

* Add NEWS entry
(cherry picked from commit f683f46425)

Co-authored-by: Fantix King <fantix.king@gmail.com>
2019-03-17 16:09:14 -07:00
Miss Islington (bot) b34f1aa814
bpo-23216: IDLE: Add docstrings to search modules (GH-12141)
(cherry picked from commit 0bb5e75cf8)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-03-16 16:47:28 -07:00
Miss Islington (bot) 68e0ed6a90
Update the seealso entries for namedtuple() (GH-12373)
* Replace external recipe link with a link to the dataclasses module.

* Highlight the class definition syntax for typing.NamedTuple
  and add an example for clarity.
(cherry picked from commit 9c68543f02)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-03-16 13:01:35 -07:00
Miss Islington (bot) e213cd6325
bpo-36138: Clarify docs about converting datetime.timedelta to scalars. (GH-12137)
Be explicit that timedelta division converts an overall duration to the interval
units given by the denominator.
(cherry picked from commit f40b4a0b62)

Co-authored-by: Yasser A <yalshalaan@gmail.com>
2019-03-15 21:03:43 -07:00
Victor Stinner 6c0e0d141a
bpo-36235: Fix CFLAGS in distutils customize_compiler() (GH-12236) (GH-12348)
Fix CFLAGS in customize_compiler() of distutils.sysconfig: when the
CFLAGS environment variable is defined, don't override CFLAGS variable with
the OPT variable anymore.

Initial patch written by David Malcolm.

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
(cherry picked from commit 86082c22d2)
2019-03-15 16:03:50 +01:00
Miss Islington (bot) 0b9bd5b4c3
Fix typo duplicate period in a docstring in the zipfile module. (GH-12326)
(cherry picked from commit 53c2935dac)

Co-authored-by: nick sung <sungboss2004@gmail.com>
2019-03-14 21:52:59 -07:00
Victor Stinner 9818360ed9
bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276) (GH-12331)
Fix an unlikely memory leak on conversion from string to float in the
function _Py_dg_strtod() used by float(str), complex(str),
pickle.load(), marshal.load(), etc.

Fix an unlikely memory leak in _Py_dg_strtod() on "undfl:" label:
rewrite memory management in this function to always release all
memory before exiting the function. Initialize variables to NULL, and
set them to NULL after calling Bfree() at the "cont:" label.

Note: Bfree(NULL) is well defined: it does nothing.

(cherry picked from commit 9776b0636a)
2019-03-14 17:12:01 +01:00
Serhiy Storchaka 783bed4c8d
[3.7] bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264). (GH-12322)
(cherry picked from commit d53fe5f407)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-03-14 10:47:27 +02:00