Commit Graph

11685 Commits

Author SHA1 Message Date
Steve Dower 98a4dcefbb
bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017) 2019-05-01 15:00:27 +00:00
Victor Stinner f4edd39017
bpo-28552: Fix distutils.sysconfig for empty sys.executable (GH-12875) (GH-12949)
bpo-28552, bpo-7774: Fix distutils.sysconfig if sys.executable is
None or an empty string: use os.getcwd() to initialize project_base.

Fix also the distutils build command: don't use sys.executable if
it's evaluated as false (None or empty string).
2019-04-25 13:16:02 +02:00
Victor Stinner 44a2c4aaf2
bpo-36605: make tags: parse Modules/_io directory (GH-12789) (GH-12815)
"make tags" and "make TAGS" now also parse Modules/_io/*.c
and Modules/_io/*.h.

(cherry picked from commit 21a74a9d77)
2019-04-13 02:50:24 +02:00
Victor Stinner 9c14061a2c
bpo-36560: Fix reference leak hunting in regrtest (GH-12744) (GH-12745)
Fix reference leak hunting in regrtest: compute also deltas (of
reference count and file descriptor count) during warmup, to ensure
that everything is initialized before starting to hunt reference
leaks.

Other changes:

* Replace gc.collect() with support.gc_collect() in clear_caches()
* dash_R() is now more quiet with --quiet option (don't display
  progress).
* Precompute the full range for "for it in range(repcount):" to
  ensure that the iteration doesn't allocate anything new.
* dash_R() now is responsible to call warm_caches().

(cherry picked from commit 5aaac94eeb)
2019-04-09 18:01:17 +02:00
Zackery Spytz fd83a823a6 bpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660) (GH-12678)
(cherry picked from commit 487b73ab39)
2019-04-03 21:59:51 +03:00
Miss Islington (bot) dffe90ee0e
bpo-36459: Fix a possible double PyMem_FREE() due to tokenizer.c's tok_nextc() (12601)
Remove the PyMem_FREE() call added in cb90c89.  The buffer will be
freed when PyTokenizer_Free() is called on the tokenizer state.
(cherry picked from commit cda139d1de)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-03-28 07:44:21 -07:00
Miss Islington (bot) 600aca47f0
bpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605)
(cherry picked from commit d5a5a33f12)

Co-authored-by: Philipp A <flying-sheep@web.de>
2019-03-27 15:23:19 -07:00
Miss Islington (bot) 6cbb4c0795
bpo-33832: Add "magic method" glossary entry (GH-7630)
(cherry picked from commit f760610bdd)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-03-26 18:26:14 -07:00
Miss Islington (bot) c0dce6aa2c bpo-36430: Fix a possible reference leak in itertools.count(). (GH-12551) (GH-12554)
(cherry picked from commit 0523c39e77)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-03-26 00:55:35 -07:00
Julien Palard 07b8018d75
[2.7] bpo-35564: add master_doc='contents' to conf.py (GH-12462)
(cherry picked from commit fc8284e220)

Co-authored-by: Jean-François B <jfbu@free.fr>
2019-03-20 10:40:59 +01:00
stratakis d9c6564f90 [2.7] bpo-18368: Fix memory leaks in PyOS_StdioReadline() when realloc() fails (GH-12334)
(cherry picked from commit 9ae513caa7)
2019-03-19 11:43:20 +01:00
Stéphane Wirtel f70b884ad7 bpo-36337: socket.send()/sendall() use Py_ssize_t (GH-12397)
Fix buffer overflow in send() and sendall() methods of socket.socket
for data larger than 2 GiB.
2019-03-19 02:56:28 +01:00
Julien Palard 869652b426
[2.7] bpo-35605: Fix documentation build for sphinx<1.6 (GH-12413)
(cherry picked from commit dfc8fc15fa989acba3c372572e52bbcb5ab38a37)
2019-03-18 19:11:30 +01:00
Victor Stinner 37f6971777
bpo-36235: Fix CFLAGS in distutils customize_compiler() (GH-12236) (GH-12349)
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:44 +01:00
Victor Stinner b14057877f
bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276) (GH-12332)
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:19:52 +01:00
stratakis 2dd6e079ae [2.7] bpo-36289: Fix a possible reference leak in the io module (GH-12329)
Fix a reference leak in _bufferedreader_read_all():
_io.BufferedIOMixin.read() leaks a reference on 'data'
when it reads the whole file content but flush() fails.
2019-03-14 16:35:40 +01:00
stratakis fb3336acfd [2.7] bpo-36291: Fix a possible reference leak in the json module (GH-12330)
Fix a reference leak in json if parsing a floating point number fails.

If PyOS_string_to_double() fails in _match_number_str():
decrement numstr ref counter.
2019-03-14 16:22:46 +01:00
stratakis 2832ad5335 [2.7] bpo-36212: Fix two possible reference leaks in the hotshot module (GH-12327)
Fix reference leaks in _hotshot.LogReaderType on PyTuple_New() failure.
2019-03-14 16:10:58 +01:00
Victor Stinner 701af605df
bpo-36234: test_os: check TypeError for invalid uid type (GH-12235)
Patch written by David Malcolm.

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
2019-03-11 13:59:43 +01:00
Miss Islington (bot) 55438d7139
bpo-35807: Upgrade ensurepip bundled pip and setuptools (GH-12189)
* Update pip to 19.0.3
* Update setuptools to 40.8.0
(cherry picked from commit 01e0f439f5)

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2019-03-08 13:45:01 -08:00
Steve Dower e37ef41289
bpo-36216: Add check for characters in netloc that normalize to separators (GH-12201) 2019-03-07 09:08:45 -08:00
stratakis b2aefd77e1 [2.7] bpo-36186: Fix linuxaudiodev.linux_audio_device() error handling (GH-12163)
Fix linuxaudiodev.linux_audio_device() error handling:
close the internal file descriptor if it fails to open the device.
2019-03-06 15:11:56 +01:00
Stéphane Wirtel 84772e0ab4 [2.7] bpo-36019: Use pythontest.net in urllib network tests (GH-11941) (GH-12177)
Use test_support.TEST_HTTP_URL (pythontest.net) instead of http://www.example.com/.
2019-03-05 15:18:58 +01:00
T. Wouters d9bf7f4198
[2.7] bpo-36149 Fix potential use of uninitialized memory in cPickle (#12105)
Fix off-by-one bug in cPickle that caused it to use uninitialised memory on truncated pickles read from FILE*s.
2019-03-04 10:52:07 -08:00
Christian Heimes 84b5ac9ba6 [2.7] bpo-36179: Fix ref leaks in _hashopenssl (GH-12158) (GH-12166)
Fix two unlikely reference leaks in _hashopenssl. The leaks only occur in
out-of-memory cases. Thanks to Charalampos Stratakis.

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

https://bugs.python.org/issue36179.
(cherry picked from commit b7bc283ab6)

Co-authored-by: Christian Heimes <christian@python.org>



https://bugs.python.org/issue36179
2019-03-04 09:10:45 -08:00
stratakis 710dcfd2f4 [2.7] bpo-13096: Fix memory leak in ctypes POINTER handling of large values (GH-12100) 2019-03-04 16:40:25 +01:00
Benjamin Peterson 9eb17b1a9f Delete old NEWS file. 2019-03-02 11:10:59 -08:00
Benjamin Peterson d31b1ec4b6 Merge branch 'release-2.7.16' into 2.7 2019-03-02 11:09:56 -08:00
Benjamin Peterson 10b8873e4d Make 2.7.16 release note. 2019-03-02 10:17:10 -08:00
Ned Deily 59e824b4fc bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original patch by Kevin Walzer. (GH-12034) 2019-03-02 10:14:24 -08:00
Ned Deily 453100f60e
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original patch by Kevin Walzer. (GH-12034) 2019-03-01 18:12:45 -05:00
Dima Pasechnik b545ba0a50 [2.7] bpo-36106: resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027) (GH-12050)
The standard math library (libm) may follow IEEE-754 recommendation to
include an implementation of sinPi(), i.e. sinPi(x):=sin(pi*x).
And this triggers a name clash, found by FreeBSD developer
Steve Kargl, who worked on putting sinpi into libm used on FreeBSD
(it has to be named "sinpi", not "sinPi", cf. e.g.
https://en.cppreference.com/w/c/experimental/fpext4).
2019-02-26 12:41:15 +02:00
Ned Deily b5213f4def
[2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12015) 2019-02-24 03:33:19 -05:00
Ned Deily 72ff2f7554
bpo-26386: Re-enable missing widget testcases in test_ttk_guionly. (GH-12014) 2019-02-24 03:04:19 -05:00
Stéphane Wirtel c611db4942 [2.7] bpo-35126: Fix a mistake in FAQ about converting number to string (GH-11911)
https://bugs.python.org/issue35126
2019-02-19 01:26:02 -08:00
Tzu-ping Chung d5409eb6c2 [2.7] bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one character (GH-4517) (GH-11749)
Add one char to MsiSummaryInfoGetProperty() output
Based on the patch in [bpo-1104](https://bugs.python.org/issue1104) by Anthony Tuininga (atuining) and Mark McMahon (markm)
(cherry picked from commit 2de576e16d)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>





https://bugs.python.org/issue1104
2019-02-18 19:06:10 -08:00
Benjamin Peterson 44039c2cf1 Collect 2.7.16rc1 release notes. 2019-02-16 11:01:44 -08:00
stratakis 2149a9ad7a [2.7] bpo-32947: Fixes for TLS 1.3 and OpenSSL 1.1.1 (GH-8761) (GH-11876)
Backport of TLS 1.3 related fixes from 3.7.

Misc fixes and workarounds for compatibility with OpenSSL 1.1.1 from git
master and TLS 1.3 support. With OpenSSL 1.1.1, Python negotiates TLS 1.3 by
default. Some test cases only apply to TLS 1.2.

OpenSSL 1.1.1 has added a new option OP_ENABLE_MIDDLEBOX_COMPAT for TLS
1.3. The feature is enabled by default for maximum compatibility with
broken middle boxes. Users should be able to disable the hack and CPython's test suite needs
it to verify default options

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 2a4ee8aa01)
2019-02-15 18:27:44 +01:00
stratakis b8eaec697a [2.7] bpo-28043: improved default settings for SSLContext (GH-10608)
The options OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE,
OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE, OP_NO_SSLv2 (except
for PROTOCOL_SSLv2), and OP_NO_SSLv3 (except for PROTOCOL_SSLv3)
are set by default. The initial cipher suite list contains only
HIGH ciphers, no NULL ciphers and MD5 ciphers (except for PROTOCOL_SSLv2).

(cherry picked from commit 358cfd426c)
2019-02-15 15:24:11 +01:00
stratakis c49f63c176 [2.7] bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976) (GH-8760) (GH-10607)
Change TLS 1.3 cipher suite settings for compatibility with OpenSSL
1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by
default.

Also update multissltests to test with latest OpenSSL.

Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 3e630c541b)
Co-authored-by: Christian Heimes <christian@python.org>
2019-02-15 14:17:12 +01:00
Victor Stinner 826a8b7081
bpo-35746: Credit Colin Read and Nicolas Edet (GH-11866)
Add credit for the cert parser vulnerability. Mention also Cisco
TALOS-2018-0758 identifier.
2019-02-15 12:34:17 +01:00
Miss Islington (bot) 06b15424b0
bpo-35746: Fix segfault in ssl's cert parser (GH-11569)
Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
distribution points with empty DP or URI correctly. A malicious or buggy
certificate can result into segfault.

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

https://bugs.python.org/issue35746
(cherry picked from commit a37f52436f)

Co-authored-by: Christian Heimes <christian@python.org>
2019-01-15 15:11:52 -08:00
Serhiy Storchaka 1462234baf
[2.7] bpo-8765: Deprecate writing unicode to binary streams in Py3k mode. (GH-11127) 2019-01-15 14:34:48 +02:00
Serhiy Storchaka 555755ecff
[2.7] bpo-35552: Fix reading past the end in PyString_FromFormat(). (GH-11276) (GH-11534)
Format character "%s" in PyString_FromFormat() no longer read memory
past the limit if precision is specified.
(cherry picked from commit d586ccb04f)
2019-01-12 11:20:50 +02:00
Serhiy Storchaka 08a81df050
bpo-33817: Fix _PyString_Resize() and _PyUnicode_Resize() for empty strings. (GH-11515) 2019-01-12 09:22:52 +02:00
Sanyam Khurana 02e33d9567 [2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#11482)
* bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff

* [2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639).
(cherry picked from commit cbb1645993)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2019-01-09 11:03:03 -08:00
Ned Deily c540c4ec61 Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)"
This reverts commit aa58050843.

Due to regressions found with using Tk 8.6.9.1, build the python.org
macOS installers with Tcl/Tk 8.6.8 as used in previous releases.
2018-12-27 15:18:51 -05:00
Myles Borins d9a2aca839 [2.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10978)
(cherry picked from 0854b92cd2)
2018-12-20 15:29:34 -05:00
Zackery Spytz f347c6eb75 bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175) (GH-11249)
(cherry picked from commit 842acaab13)
2018-12-20 19:38:52 +02:00
Victor Stinner ea6b322829
bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) (GH-11213)
check_environ() of distutils.utils now catchs KeyError on calling
pwd.getpwuid(): don't create the HOME environment variable in this
case.

(cherry picked from commit 17d0c0595e)
2018-12-18 17:34:51 +01:00