Commit Graph

80380 Commits

Author SHA1 Message Date
Serhiy Storchaka 8cbf4e1064
[2.7] bpo-31893: Fixed select.kqueue(). (GH-4166) (#4193)
* Fixed the layout of the kqueue_event structure on OpenBSD and NetBSD.
* Fixed the comparison of the kqueue_event objects..
(cherry picked from commit b9052a0f91)
2017-10-31 16:13:52 +02:00
Serhiy Storchaka e0fc1af67a
[2.7] bpo-31891: Fix building the curses module on NetBSD. (GH-4165). (#4194)
(cherry picked from commit baac01e629)
2017-10-31 16:12:35 +02:00
Victor Stinner 1d481822a6
bpo-31629: Add support.SaveSignals (#4183) (#4188)
test_curses now saves/restores signals. On FreeBSD, the curses module
sets handlers of some signals, but don't restore old handlers when
the module is deinitialized.

(cherry picked from commit 19f68301a1)
2017-10-31 03:44:55 -07:00
Serhiy Storchaka 107f3cc791
[2.7] bpo-20047: Make bytearray methods partition() and rpartition() rejecting (GH-4158) (#4163)
separators that are not bytes-like objects..
(cherry picked from commit a2314283ff)
2017-10-29 12:25:38 +02:00
Serhiy Storchaka 7c622be4f2 bpo-30855: Fix winfo_id related Tkinter test on Windows. (#4121) 2017-10-26 00:28:02 +03:00
Benjamin Peterson 88d5e2c938 fix marshal uninitialized variable warnings (#4114)
GCC says:
../cpython/Python/marshal.c: In function ‘PyMarshal_WriteLongToFile’:
../cpython/Python/marshal.c:70:35: warning: ‘wf.ptr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                       else if ((p)->ptr != (p)->end) *(p)->ptr++ = (c); \
                                   ^~
../cpython/Python/marshal.c:70:47: warning: ‘wf.end’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                       else if ((p)->ptr != (p)->end) *(p)->ptr++ = (c); \
                                               ^~
../cpython/Python/marshal.c:77:10: warning: ‘wf.str’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (p->str == NULL)
         ~^~~~~

This isn't a real problem because if the file pointer is not NULL, the
string-related fields are never touched. But, it doesn't hurt to set the unused
fields to NULL.
2017-10-24 23:09:55 -07:00
Serhiy Storchaka 04c0a4038e [2.7] bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. (GH-4111). (#4112)
(cherry picked from commit f52dff611c)
2017-10-24 23:35:22 +03:00
Serhiy Storchaka ef346a2473 [2.7] bpo-31667: Fix gettext related links. (GH-3860) (#4100)
* Fix incorrect links.
* Remove redundant links.
* Add signatures and index entries for gettext related
functions in the locale module.
(cherry picked from commit c02a1f4ad8)
2017-10-24 10:59:17 +03:00
Serhiy Storchaka 5ef883b096 [2.7] bpo-31752: Fix possible crash in timedelta constructor called with custom integers. (GH-3947) (#4088)
Bad remainder in divmod() in intermediate calculations caused an assertion failure..
(cherry picked from commit 4ffd4653a7)
2017-10-23 19:57:04 +03:00
Serhiy Storchaka f7d19b0464 [2.7] bpo-28286: Add tests for the mode argument of GzipFile. (GH-4074). (#4077)
(cherry picked from commit bcbdd2f8db)
2017-10-22 14:54:05 +03:00
Serhiy Storchaka 4dc05c34ac Fix py3k warnings in 1/0 in tests. (#4072) 2017-10-22 12:15:41 +03:00
Miss Islington (bot) 8fa0648f89 Update TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. (GH-3998) (GH-4040)
The word "difference" from missing the sentence.
This clarifies that it compares the difference between the two objects.
(cherry picked from commit 032a6480e3)
2017-10-18 10:30:05 -07:00
Riccardo Coccioli 27b951c633 [2.7] bpo-31334: Fix timeout in select.poll.poll() (GH-3277) (#4034)
Always pass -1, or INFTIM where defined, to the poll() system call when
a negative timeout is passed to the poll.poll([timeout]) method in the
select module. Various OSes throw an error with arbitrary negative
values..
(cherry picked from commit 6cfa927ceb)
2017-10-18 15:04:04 +03:00
Serhiy Storchaka ed267e3305 [2.7] bpo-31786: Make functions in the select module blocking when timeout is a small negative value. (GH-4003). (#4031)
(cherry picked from commit 2c15b29aea)
2017-10-18 11:28:35 +03:00
Victor Stinner 355393e743 [2.7] bpo-31733, bpo-31692: Document 2 new env vars in What's New in Python 2.7 (GH-4019)
bpo-31733, bpo-31692: Document the new PYTHONSHOWREFCOUNT and
PYTHONSHOWALLOCCOUNT environment variables.
2017-10-17 13:13:13 -07:00
Victor Stinner 7b4ba62e38 [2.7] bpo-31692: Add PYTHONSHOWALLOCCOUNT env var (GH-3927)
bpo-31692, bpo-19527:

* Add a new PYTHONSHOWALLOCCOUNT environment variable, similar to
  the Python 3 "-X showalloccount" option
* When Python is compiled with COUNT_ALLOCS, the new
  PYTHONSHOWALLOCCOUNT environment variable now has to be set to dump
  allocation counts into stderr on shutdown. Moreover, allocations
  statistics are now dumped into stderr rather than stdout.
* Add @test.support.requires_type_collecting decorator: skip test if
  COUNT_ALLOCS is defined
* Fix tests for COUNT_ALLOCS: decorate some methods with
  @requires_type_collecting
* test_sys.test_objecttypes(): update object type when COUNT_ALLOCS
  is defined
2017-10-17 02:25:23 -07:00
Victor Stinner 3c082a7fdb bpo-31733: Add PYTHONSHOWREFCOUNT env var (GH-3932)
Add a new PYTHONSHOWREFCOUNT environment variable. In debug mode,
Python now only print the total reference count if PYTHONSHOWREFCOUNT
is set.
2017-10-17 01:35:19 -07:00
vyas45 50cef52372 [2.7] bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993) 2017-10-16 21:23:43 +03:00
Serhiy Storchaka 9aa60245a0 [2.7] bpo-30058: Fixed buffer overflow in select.kqueue.control(). (GH-1095). (#3976)
(cherry picked from commit de07210077)
2017-10-13 00:13:11 +03:00
Ned Deily 356b68023d bpo-31766: restore 3.5 to docs version switchers (#3971) 2017-10-12 14:24:23 -04:00
Oren Milman fb3bb8d5d5 [2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3952) 2017-10-12 17:39:01 +03:00
Oren Milman f15058a697 [2.7] bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text and Element.tail (GH-3924) (#3950) 2017-10-11 16:29:12 +03:00
Elvis Pranskevichus cfe1aefcbd bpo-31681: Make sure pkgutil.get_data closes files properly (#3875)
Also remove an obsolete note about
backward compat with old Pythons.
2017-10-09 10:55:54 -04:00
Victor Stinner cc4b6f1c62 bpo-31719: Fix test_regrtest.test_crashed() on s390x (#3912)
Add a new _testcapi._read_null() function to crash Python in a
reliable way on s390x.

On s390x, ctypes.string_at(0) returns an empty string rather than
crashing.
2017-10-09 00:52:06 -07:00
Miss Islington (bot) 7440655bc5 bpo-31720: msilib documentation, change MsiError into MSIError (GH-3914) (GH-3916)
(cherry picked from commit 28f713601d)
2017-10-07 09:00:42 -07:00
Rohit Balasubramanian c829bbf68f bpo-31507: Add docstring to parseaddr function in email.utils.parseaddr (GH-3647) (GH-3735)
(cherry picked from commit 9e7b9b21fe)
2017-10-06 22:29:54 -07:00
Miss Islington (bot) 2fb8e93859 [2.7] remove tabs from getcompiler.c (GH-3892) (#3894)
(cherry picked from commit a8ed11742b)
2017-10-05 08:41:31 -07:00
Serhiy Storchaka 328b5d0e64 [2.7] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (#3876)
when pass a string larger than 2 GiB.

Decrease memory requirements for Tcl's bigmem tests..
(cherry picked from commit 27c623c845)
2017-10-04 21:37:53 +03:00
Ned Deily 8d614bebb6 Remove retired and security branches from active docs (#3881) 2017-10-03 23:06:13 -04:00
Oren Milman 13da1a60f1 [2.7] bpo-31478: Prevent unwanted behavior in _random.Random.seed() in case the arg has a bad __abs__() method (GH-3596) (#3845) 2017-10-03 00:31:42 +03:00
Victor Stinner 20cbc1d29f bpo-31158: Fix nondeterministic read in test_pty (#3808) (#3853)
(cherry picked from commit e6f62f69f0)
2017-10-02 02:58:09 -07:00
Serhiy Storchaka 1163fb9be0 [2.7] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) (#3838)
(cherry picked from commit f4ea642cb6)
2017-09-30 22:52:25 +03:00
Oren Milman 40d736bcf4 [2.7] bpo-31285: Don't raise a SystemError in warnings.warn_explicit() in case __loader__.get_source() has a bad splitlines() method. (GH-3219) (#3823)
(cherry picked from commit 91fb0af)
2017-09-30 17:06:55 +03:00
Victor Stinner 8b83687bdf bpo-28129: fix ctypes crashes (#386) (#3800)
* init commit, with initial tests for from_param and fields __set__ and __get__, and some additions to from_buffer and from_buffer_copy

* added the rest of tests and patches. probably only a first draft.

* removed trailing spaces

* replace ctype with ctypes in error messages

* change back from ctypes instance to ctype instance

(cherry picked from commit 1bea762d9e)
2017-09-28 07:31:40 -07:00
Victor Stinner b4920d562b bpo-31593: test_socketserver waits child processes (#3786) 2017-09-27 03:02:57 -07:00
Miss Islington (bot) 9bfa55bfea [2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3780)
(cherry picked from commit 30b61b51e0)
2017-09-27 09:52:44 +03:00
Serhiy Storchaka 81691b0548 [2.7] bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (GH-3254). (#3781)
(cherry picked from commit 57c2561c8c)
2017-09-27 09:24:39 +03:00
Serhiy Storchaka 4954b8dc53 [2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3779)
(cherry picked from commit d6238a76c6)
2017-09-27 08:44:03 +03:00
Serhiy Storchaka d0b9dc3367 [2.7] bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (GH-1557). (#3772)
(cherry picked from commit c740e4fe8a)
2017-09-26 23:15:36 +03:00
Serhiy Storchaka 19eb87d857 [2.7] bpo-31579: Fixed a possible leak in enumerate() with large indices. (GH-3753). (#3761)
(cherry picked from commit 0e950dd22b)
2017-09-26 09:11:27 +03:00
Serhiy Storchaka d94a65a069 bpo-25732: Make functools.total_ordering implementing __ne__. (#3748)
Patch by Raymond Hettinger.
2017-09-25 14:41:34 +03:00
Victor Stinner 5f5da728ae bpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570) (#3745)
Non-regression tests for the Expat 2.2.3 UTF-8 decoder bug.

(cherry picked from commit e6d9fcbb8d)
2017-09-25 01:43:56 -07:00
Igor Filatov cf7197ae43 [2.7] bpo-31351: Set return code in ensurepip when pip fails (GH-3734)
Previously ensurepip would always report success, even if the
pip installation failed.

(cherry picked from commit 9adda0cdf8)
2017-09-25 11:03:24 +10:00
Zachary Ware da86874a3d [2.7] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3700)
Use prefixed macro names for the `authoraddress` function, add T2A to the font encoding in LaTeX sources to support Cyrillic characters in the PDF documentation, and replace the deprecated `font_size` config option with `pointsize`.
(cherry picked from commit da9b4cfb48)
2017-09-22 13:41:10 -05:00
Christian Heimes 5b6452d412 bpo-31533: fix broken link to OpenSSL docs (GH-3674) (GH-3676)
(cherry picked from commit 19e4d93)
2017-09-20 13:23:09 -07:00
Benjamin Peterson 7795321c56 a post 2.7.14 world 2017-09-16 11:31:32 -07:00
Benjamin Peterson 5537987220 merge 2.7.14 release branch 2017-09-16 11:30:58 -07:00
Benjamin Peterson 84471935ed 2.7.14 final version bumps 2017-09-16 10:38:35 -07:00
Michael Seifert 41376241e3 bpo-29916: Include PyGetSetDef in C API extension documentation. (#831) (#3609)
(cherry picked from commit da67e0d644)
2017-09-16 14:30:07 +03:00
Christian Heimes fd39e2a684 bpo-31474: Fix -Wint-in-bool-context warnings (#3581)
Signed-off-by: Christian Heimes <christian@python.org>
2017-09-15 20:27:23 +02:00