Commit Graph

80783 Commits

Author SHA1 Message Date
Zackery Spytz 7e4ff9796c [2.7] bpo-34236: Remove mistakenly backported Test6012 in test_capi.py. (GH-8681)
This was backported by mistake in ef19fd2.
2018-08-06 16:47:48 +03:00
Terry Jan Reedy 9027502e99
[2.7] bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673)
The change in the mini language floating point and decimal table
is consistent with 'Exponential notation' and clarifies that we
are referring to the output notation, not an object type.

(cherry picked from commit 28c7f8c8ce)
2018-08-06 09:03:44 -04:00
Miss Islington (bot) 396afbf771
Fix docstring of Profiler class (GH-8651)
(cherry picked from commit 2ebd3813af)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-08-03 02:43:18 -07:00
Terry Jan Reedy 24a54da945
[2.7] bpo-34275: Make IDLE calltips always visible on Mac. (GH-8639) (GH-8644)
Some MacOS-tk combinations need .update_idletasks().
The call is both unneeded and innocuous on Linux and Windows.
Patch by Kevin Walzer.

(cherry picked from commit 9beaef6225)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-08-02 23:40:20 -04:00
Victor Stinner dd4d8b4d80
Fix compilation warnings on Windows (GH-8627)
* Fix compilation warning in _ctypes module on Window

(cherry picked from commit 20f11fe43c)

* Fix compilation warnings on Windows 64-bit

(cherry picked from commit 725e421222)

* Fix compiler warning in unicodeobject.c

Explicitly case to Py_UNICODE to fix the warning:

Objects\unicodeobject.c(4225): warning C4244: '=' :
conversion from 'long' to 'Py_UNICODE', possible loss of data

The downcast cannot overflow since we check that value <= 0x10ffff.
2018-08-02 18:02:59 +02:00
Victor Stinner 6a6b248347
bpo-29565: Fix compilation for C89 (GH-8626)
Use a local scope for the 'i' variable.
2018-08-02 17:40:11 +02:00
Victor Stinner 3243f8c1fb
bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64 (GH-168) (GH-8625)
Fixed bpo-29565: Corrected ctypes passing of large structs by value.

Added code and test to check that when a structure passed by value
is large enough to need to be passed by reference, a copy of the
original structure is passed. The callee updates the passed-in value,
and the test verifies that the caller's copy is unchanged. A similar
change was also added to the test added for bpo-20160 (that test was
passing, but the changes should guard against regressions).

(cherry picked from commit a86339b83f)
2018-08-02 16:47:26 +02:00
Tal Einat 894940b109
[2.7] bpo-34120: fix IDLE freezing after closing dialogs (GH-8603)
Added missing .grab_release() calls to all places where we call .grab_set().

(cherry picked from commit 10ea9409ce)
2018-08-02 10:21:49 +03:00
Serhiy Storchaka 48c8bf21f9
[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479) 2018-07-31 09:09:36 +03:00
Miss Islington (bot) dc9039da23
bpo-27671: Update FAQ about why len is function (GH-8432)
(cherry picked from commit c48e26dcad)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-07-30 22:58:12 -07:00
Andrés Delfino 5e980f09b6 [2.7] Use 'for example' instead of 'in other words' in compound statement doc (GH-8401)
(cherry picked from commit 6921ef7bef)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-30 12:16:35 -07:00
Xtreak 2bea771609 bpo-34229: Check start and stop of slice object to be long when they are not int in PySlice_GetIndices (GH-8480) 2018-07-26 19:20:34 +03:00
Miss Islington (bot) 1c8f6553ad
bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208)
(cherry picked from commit c0f0a7669c)

Co-authored-by: Aaron Ang <aaronang@users.noreply.github.com>
2018-07-25 10:40:09 -07:00
Miss Islington (bot) 613cbf3d4d
Fix site module documentation. (GH-8441)
The script will exit with the number 0 (zero), instead of the letter O.
(cherry picked from commit 95d34c2a37)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
2018-07-24 09:27:12 -07:00
Tal Einat f7e60a6948
[2.7] bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8427)
(cherry picked from commit bde782bb59)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2018-07-24 00:38:34 +03:00
Serhiy Storchaka fbcb6fae62
bpo-34189: Remove a file backported by accident. (GH-8419) 2018-07-23 22:32:09 +03:00
Miss Islington (bot) 7868426c1f
bpo-33336, imaplib: Legalize MOVE command (GH-6569)
imaplib now allows MOVE command in IMAP4.uid() (RFC 6851:
IMAP MOVE Extension) and potentially as a name of supported
method of IMAP4 object.
(cherry picked from commit caa331d492)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2018-07-23 07:07:03 -07:00
Serhiy Storchaka 46cb5fd706
[2.7] bpo-34189: Add simple tests for new Tk widget options. (GH-8396). (GH-8400)
(cherry picked from commit e271ca78e3)
(cherry picked from commit c75c1e0e8a)
2018-07-22 22:15:16 +03:00
Zackery Spytz 041a4ee945 bpo-25943: Check for integer overflow in bsddb's DB_join(). (GH-8392) 2018-07-22 19:53:56 +03:00
Zackery Spytz 3252205077 bpo-25943: Fix potential heap corruption in bsddb's _db_associateCallback() (GH-8337)
There was a missing check for integer overflow, several function calls
were not checked for failure, and allocated memory was not freed if an
error occurred.
2018-07-21 11:27:44 +03:00
Zachary Ware c5bc6e477e
[2.7] Enable GUI testing on Travis Linux builds via Xvfb (GH-7887)
(cherry picked from commit b12112b5ba)
2018-07-19 21:51:42 -05:00
Miss Islington (bot) 1fb24b6e83 Clarify ValueError's broad applicability (GH-8313) (GH-8316)
(cherry picked from commit feabae9617)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-07-17 13:23:52 -07:00
Serhiy Storchaka fc153d1279
[2.7] bpo-34068: iobase_close could call PyObject_SetAttrString with an exception set (GH-8282). (GH-8312) (GH-8314)
(cherry picked from commit 28f07364f0)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>.
(cherry picked from commit cc13016658)
2018-07-17 18:15:46 +03:00
Miss Islington (bot) a45fa39d85
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
(cherry picked from commit 993030aac5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-11 14:53:17 -07:00
Serhiy Storchaka ef19fd200d
[2.7] bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192). (GH-8255)
(cherry picked from commit 504373c59b)

Also backport tests for skipitem() and handling errors.
2018-07-11 19:49:17 +03:00
Tal Einat 6f036bb67d
[2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) (#8225)
Actually just one fix on the 2.7 branch.

Contributed by Bradley Laney.

(cherry picked from commit 6b490b5db4)
2018-07-10 13:28:09 +03:00
Benjamin Peterson dc39a59bc7
[2.7] prefix internal sqlite symbols with _pysqlite_ (GH-8215). (GH-8217)
(cherry picked from commit 7762e4d387)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 22:36:49 -07:00
Benjamin Peterson 695ecd9dc6
[2.7] delete some unused pysqlite forward declarations (GH-8211). (GH-8214)
(cherry picked from commit d6d4432724)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 21:12:57 -07:00
Serhiy Storchaka 789f95ac97
[2.7] Fixed several assertTrue() that were intended to be assertEqual(). (GH-8191) (GH-8202)
Fixed also testing the "always" warning filter.
(cherry picked from commit b796e7dcdc)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-07-09 20:00:53 +03:00
Serhiy Storchaka b1e6e5615a
bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) (GH-8196)
(cherry picked from commit 2a9b8babf0).
(cherry picked from commit 7c43b80150)
2018-07-09 14:39:06 +03:00
Miss Islington (bot) 3a98ddd136
bpo-33888: Use CPython instead of Python in the FAQ (GH-7767)
Make the change where discussing the CPython implementation of lists and dicts.
(cherry picked from commit 8d41278045)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-07 16:32:57 -07:00
Benjamin Peterson 3707dfaf45
[2.7] closes bpo-34050: Fix link in SSL docs (GH-8173). (GH-8179)
(cherry picked from commit 9c5ba09748)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
2018-07-07 15:48:07 -07:00
Andrés Delfino ad0fc8ddba [2.7] bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510). (GH-8171)
(cherry picked from commit b6bb77c2b8)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-08 00:10:18 +03:00
Pablo Galindo 8902a1d14e
[2.7] bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) (#8126)
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..
(cherry picked from commit 3cf1f154ed)

Co-authored-by: Bumsik Kim <k.bumsik@gmail.com>
2018-07-07 00:54:09 +01:00
Ammar Askar 7829bba45d [2.7] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) (#8133)
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.

(cherry picked from commit c4ef4896ea)
2018-07-06 13:23:13 +03:00
Serhiy Storchaka 9720f60f2a
[2.7] bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336). (GH-8107)
(cherry picked from commit fc05e68d8f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-05 12:20:19 +03:00
Miss Islington (bot) bfee59018f
Don't export pending_threadfunc from _testcapi. (GH-8075)
(cherry picked from commit b4588c2fff)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-03 22:48:45 -07:00
Miss Islington (bot) 292ce153fc bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8066)
(cherry picked from commit 831c29721d)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-07-03 15:37:36 +03:00
Victor Stinner 53fafafa34
bpo-33735: Fix test_multiprocessing random failure (GH-8059) (GH-8061)
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()

(cherry picked from commit 23401fb960)
2018-07-03 13:43:24 +02:00
Serhiy Storchaka 9b84cc8771
[2.7] bpo-33974: Fix passing special characters to ttk widgets. (GH-7986) (GH-8021)
Fix passing lists and tuples of strings containing special characters
'"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
(cherry picked from commit 5bb5bbfca8)
2018-06-30 13:34:56 +03:00
Zackery Spytz 0464de0f9a [2.7] bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918). (GH-8013)
(cherry picked from commit 23db935bcf)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-06-29 23:07:13 +03:00
Ned Deily 11ba050986
Update 2.7 doc templates for 3.7.0 (GH-7996) 2018-06-28 15:20:35 -04:00
Miss Islington (bot) bcb1ac8265
bpo-33958: Doc: Remove unused variable in example (GH-7927)
(cherry picked from commit 62b6cea6b8)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <srinivasreddy@users.noreply.github.com>
2018-06-27 23:37:17 -07:00
Benjamin Peterson 468f97b464
[2.7] closes bpo-33956: update vendored expat to 2.2.5 (GH-7925)
(cherry picked from commit 4e21100fa7)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-06-26 20:56:58 -07:00
Ned Deily f79386f669
bpo-29514: Make magic number test work for candidates (GH-7946) 2018-06-26 23:55:36 -04:00
Victor Stinner 5430c14aba
[2.7] bpo-33873: Backport regrtest from master (GH-7936)
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2b25)

* bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.

(cherry picked from commit cac4fef886)

* 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.

(cherry picked from commit 58ed7307ea)
2018-06-26 23:57:12 +02:00
Zachary Ware 16137fe22f bpo-27780: Make pgen.c C89 compliant (GH-7915) 2018-06-25 20:40:15 -07:00
Tal Einat 78209734a0
[2.7] bpo-33952: Fix typo in str.upper() documentation (GH-7898) (GH-7905)
(cherry picked from commit 4a6e746079)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-25 13:47:23 +03:00
Tal Einat aa770b7096
[2.7] bpo-33943: Add references in the docs for logging.basicConfig (GH-7858) (GH-7902)
Adds references to info about file modes, `time.strftime()`, string formatting
syntaxes, and logging levels.

(cherry picked from commit a8ddf85a84)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-25 09:52:35 +03:00
native-api b18f098357 bpo-33711: Fix license generation error in installer build script (GH-7241) 2018-06-24 17:50:23 -05:00