Commit Graph

80695 Commits

Author SHA1 Message Date
Benjamin Peterson 67dafd5c20
[2.7] Issue GH-18560: Fix potential NULL pointer dereference in sum(). (GH-8892)
(cherry picked from commit 704e2d374f)

Co-authored-by: Christian Heimes <christian@cheimes.de>
2018-08-23 22:28:39 -07:00
Miss Islington (bot) 45ee452751
closes bpo-34474: Python/bltinmodule.c: Add missing NULL check in builtin_sum_impl() (GH-8872)
Reported by Svace static analyzer.
(cherry picked from commit 2b824b2538)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-24 01:13:19 -04:00
Miss Islington (bot) ea21206626
closes bpo-34477: Objects/typeobject.c: Add missing NULL check to type_init() (GH-8876)
Reported by Svace static analyzer.
(cherry picked from commit f6247aac08)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-24 00:51:46 -04:00
Miss Islington (bot) 5c437d6fd8
Make it more clear that setUpClass runs before each class, not "class run" (GH-8844)
(cherry picked from commit c33bb5d401)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2018-08-23 10:59:06 -04:00
Alexey Izbyshev 5223ce2131 [2.7] bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name(). (GH-8852) (GH-8858)
Reported by Svace static analyzer.
(cherry picked from commit 28853a249b)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2018-08-22 14:46:51 +03:00
Zackery Spytz eb9a1c01d0 [2.7] bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833). (GH-8849)
(cherry picked from commit 3e26e42c90)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-08-22 08:54:17 +03:00
Xiang Zhang 95f9e14e33
[2.7] bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) (GH-8838)
(cherry picked from commit 4c8555773a)
2018-08-20 23:15:07 +08:00
Sergey Fedoseev ae1f012729 bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Realloc(). (GH-8785) 2018-08-17 08:36:15 +03:00
Christian Heimes 2ec530cd55
[2.7] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (GH-8791)
Read from data socket to avoid "[SSL] shutdown while in init" exception
during shutdown of the dummy server.

Signed-off-by: Christian Heimes <christian@python.org>

<!-- issue-number: [bpo-34391](https://www.bugs.python.org/issue34391) -->
https://bugs.python.org/issue34391
<!-- /issue-number -->.
(cherry picked from commit 1590c39336)

Co-authored-by: Christian Heimes <christian@python.org>
2018-08-16 21:38:44 +02:00
Miss Islington (bot) 00aebabc71
closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439)
Avoid undefined pointer arithmetic with NULL.
(cherry picked from commit 7c4ab2afb1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-08-15 02:59:11 -04:00
Christian Heimes 1f34aece28
[2.7] bpo-34399: 2048 bits RSA keys and DH params (GH-8762) (GH-8765)
Downstream vendors have started to deprecate weak keys. Update all RSA keys
and DH params to use at least 2048 bits.

Finite field DH param file use RFC 7919 values, generated with

    certtool --get-dh-params --sec-param=high

Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 88bfd0bce0)

Co-authored-by: Christian Heimes <christian@python.org>
2018-08-14 16:53:04 +02:00
Serhiy Storchaka d1c5e278a1
[2.7] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567). (GH-8691)
(cherry picked from commit 8f7bb100d0)
2018-08-06 18:06:14 +03:00
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