Commit Graph

27444 Commits

Author SHA1 Message Date
Vladimir Matveev b63a16febb [2.7] bpo-34603, ctypes/libffi_msvc: Fix returning structs from functions (GH-9258) (GH-9425)
Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
2018-09-19 13:48:21 -07:00
Serhiy Storchaka 29034baf58
[2.7] bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683). (GH-9400)
(cherry picked from commit 9bdb7be482)
2018-09-18 23:28:34 +03:00
xdegaye 57e70d3802 [2.7] bpo-19417: Add test_bdb.py (GH-5217) (GH-6156)
(cherry picked from commit 3fe33043ee)



https://bugs.python.org/issue19417
2018-09-15 23:09:14 -07:00
Shoham Peller ee78ba2c81 [2.7] closes bpo-8450: a better error message when http status line isn't received (GH-2825)
When the server has closed the connection before sending a status-line,
the client's error message should have a more descriptive error message

https://bugs.python.org/issue8450


https://bugs.python.org/issue8450
2018-09-14 16:28:08 -07:00
Benjamin Peterson 18e21883a4
[2.7] closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9267)
(cherry picked from commit a710ebd21b)
2018-09-13 11:24:07 -07:00
Chih-Hsuan Yen d919c60e69 [2.7] bpo-32502: Discard 64-bit (and other invalid) hardware addresses (GH-9125)
(cherry picked from commit 6b273f7f40)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
2018-09-11 13:54:57 -07:00
Benjamin Peterson 253279c616
[2.7] closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque with a bad __new__(). (GH-9179) 2018-09-11 13:41:57 -07:00
Miss Islington (bot) 9734024ec6 bpo-26544: Get rid of dependence from distutils in platform. (GH-8356) (GH-8952)
(cherry picked from commit 7d81e8f599)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-09-05 16:46:26 +02:00
Victor Stinner 7056ca880b
bpo-34530: Fix distutils find_executable() (GH-9049) (GH-9058)
distutils.spawn.find_executable() now falls back on os.defpath if the
PATH environment variable is not set.

(cherry picked from commit 39487196c8)
2018-09-04 11:40:29 +02:00
Miss Islington (bot) 5d594f3106
bpo-34007: Skip traceback tests if the Program Counter is not available. (GH-9018)
Sometimes some versions of the shared libraries that are part of the
traceback are compiled in optimised mode and the Program Counter (PC)
is not present, not allowing gdb to walk the frames back. When this
happens, the Python bindings of gdb raise an exception, making the
test impossible to succeed.
(cherry picked from commit f2ef51f8be)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-08-31 18:43:24 -04:00
Benjamin Peterson d8b103b8b3
closes bpo-34540: Convert shutil._call_external_zip to use subprocess rather than distutils.spawn. (GH-8985) 2018-08-29 21:59:21 -07:00
Tal Einat 491740f116
[2.7] bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864)
(cherry picked from commit 91cb298f81)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
2018-08-26 11:44:53 +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
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
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 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
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
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 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
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
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
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
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
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 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
Victor Stinner f2918881b7
bpo-33901: Fix test_gdbm for gdbm 1.15 (GH-7798) (GH-7818)
Fix test_gdbm.test_reorganize() on macOS with gdbm 1.15: add a
larger value to make sure that the file size changes.

(cherry picked from commit 13c79c677f)
2018-06-20 10:57:38 +02:00
Miss Islington (bot) b2dd5f1b66 bpo-33717: set terse to True when calling platform.platform in test.pythoninfo (GH-7797) (GH-7803)
(cherry picked from commit 71ca738f4c)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
2018-06-20 02:02:17 +08:00
Terry Jan Reedy c488558faa
[2.7] bpo-33856: Add "help" to the welcome message of IDLE (GH-7755) (GH-7758)
Make it the same as when one runs 'python'..
(cherry picked from commit 9d49f85064)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2018-06-16 18:15:18 -04:00
Victor Stinner e36f94f204
bpo-32962: Backport python-gdb.py and test_gdb.py from master (GH-7726)
* bpo-32962: python-gdb catchs ValueError on read_var() (GH-7692)

python-gdb now catchs ValueError on read_var(): when Python has no
debug symbols for example.

(cherry picked from commit 019d33b7a4)

* bpo-32962: python-gdb catchs UnicodeDecodeError (GH-7693)

python-gdb now catchs UnicodeDecodeError exceptions when calling
string().

(cherry picked from commit d22fc0bc7d)

bpo-29367: python-gdb.py now supports also method-wrapper
(wrapperobject) objects.

(cherry picked from commit 611083331d)
2018-06-15 23:59:56 +02:00
Xiang Zhang 1889c4cbd6
bpo-29456: Fix bugs in unicodedata.normalize: u1176, u11a7 and u11c3 (GH-1958) (GH-7704)
Hangul composition check boundaries are wrong for the second character
([0x1161, 0x1176) instead of [0x1161, 0x1176]) and third character ((0x11A7, 0x11C3)
instead of [0x11A7, 0x11C3])..
(cherry picked from commit d134809cd3)

Co-authored-by: Wonsup Yoon <pusnow@me.com>
2018-06-15 21:26:55 +08:00
Zachary Ware f6645ef027
bpo-28222: Don't fail if pygments is not available (GH-7564)
We can't just skip the test if docutils is available,
but pygments is not because the purpose of the test
was testing a bug in _check_rst_data().

(cherry-picked from b5bb404cca)
2018-06-09 13:50:23 -05:00
Victor Stinner b4f8bc56c1
bpo-33718: regrtest: use "xxx then yyy" result if re-run (GH-7521) (GH-7562)
If tests are re-run, use "xxx then yyy" result format (ex: "FAILURE
then SUCCESS") to show that some failing tests have been re-run.

Add also test_regrtest.test_rerun_fail() test.

(cherry picked from commit c45fc7673e)
2018-06-09 18:59:19 +02:00
Miss Islington (bot) 4e6bd247aa
bpo-11874: fix assertion failure in argparse metavar handling (GH-1826)
- bugfix and test for fragile metavar handling in argparse (see
  bpo-24089, bpo-14046, bpo-25058, bpo-11874)
- also fixes some incorrect tests that did not make 1-element tuples correctly
(cherry picked from commit 66f02aa32f)

Co-authored-by: wim glenn <wim.glenn@gmail.com>
2018-06-08 18:28:02 -07:00
Serhiy Storchaka 23999158f9
[2.7] bpo-33751: Fix test_file. (GH-7378) (GH-7445)
testModeStrings and testTruncateOnWindows were depended on
a file leaked in other tests.

Also improve cleaning up after tests.
(cherry picked from commit c2745d2d05)
2018-06-08 20:24:19 +03:00
Victor Stinner 02b4d67a38
bpo-31731: test_io hangs with --huntrleaks: exclude it (GH-7459)
test_io hangs with --huntrleaks: exclude the test in regrtest.
2018-06-06 23:33:31 +02:00
Victor Stinner 67b7158d53
bpo-33773: Fix test.support.fd_count() on Linux/FreBSD (GH-7421) (GH-7456)
Substract one because listdir() opens internally a file
descriptor to list the content of the /proc/self/fd/ directory.

Add test_support.test_fd_count().

Move also MAXFD code before msvcrt.CrtSetReportMode(), to make sure
that the report mode is always restored on failure.

(cherry picked from commit 492d6424a7)
2018-06-06 19:04:50 +02:00
Serhiy Storchaka 3014d6eb7f
[2.7] bpo-33767: Fix improper use of SystemError by mmap.mmap objects (GH-7381) (GH-7432)
Raise TypeError instead of SystemError for unsupported operations.
(cherry picked from commit e9e3976057)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-06-05 19:51:37 +03:00