Commit Graph

1705 Commits

Author SHA1 Message Date
Zackery Spytz 68ddb59417 [2.7] bpo-22851: Fix a segfault when accessing generator.gi_frame.f_restricted. (GH-9348)
Frame's field f_tstate is NULL when the generator is exhausted.
2018-10-13 12:25:05 +03:00
Christian Heimes 18b20bad75 [2.7] bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) (GH-9394)
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623.
(cherry picked from commit cb5778f00c)

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



https://bugs.python.org/issue34623
2018-09-18 06:13:09 -07:00
tzickel f64c813de8 bpo-25083: Python can sometimes create incorrect .pyc files (GH-8449)
Python 2 never checked for I/O error when reading .py files and
thus could mistake an I/O error for EOF and create incorrect .pyc
files.
This adds an check for this and aborts on an error.
2018-09-10 11:46:14 -07:00
Serhiy Storchaka 48c8bf21f9
[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479) 2018-07-31 09:09:36 +03:00
Benjamin Peterson 482fac7499
[2.7] properly free memory in pgen. (GH-7869) (closes bpo-27780
(cherry picked from commit 9ac11a752a)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-06-22 21:04:21 -07:00
Benjamin Peterson 0d7d26bce4 2.7.15+ 2018-04-29 16:22:11 -07:00
Benjamin Peterson ca079a3ea3 bump to 2.7.15 2018-04-29 15:47:33 -07:00
Florian Weimer 0b91f8a668 Indicate that _PyGC_Head is only 8-byte aligned. (closes bpo-33374)
By spec, the "long double" in _PyGC_Head requires the union to always be 16-byte
aligned. However, obmalloc only yields 8-byte alignment. Compilers including GCC
8 are starting to use alignment information to do store-merging. So, the "long
double" needs to be changed to a simple "double" as was long ago done in Python
3 by e348c8d154. For 2.7, we need to add some
dummy padding to make sure _PyGC_Head stays the same size.
2018-04-29 12:18:33 -07:00
Benjamin Peterson bad9a580ca 2.7.15rc1 version bump 2018-04-14 15:06:30 -07:00
Miss Islington (bot) 4029064716
Fix typo in Include/objimpl.h, the word "has" was missing (GH-5568) (GH-5571)
It now reads: ...be aware that Python has no control over...
(cherry picked from commit 517da1e58f)

Co-authored-by: Alexey <forestbiiird@gmail.com>
2018-02-12 00:06:48 -08:00
Miss Islington (bot) 6ccdad7b1f bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284) (#5295)
glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.
(cherry picked from commit e768c86ef4)
2018-01-24 10:51:39 +01:00
Miss Islington (bot) 6ba0b583d6 bpo-25720: Fix the method for checking pad state of curses WINDOW (GH-4164) (#4213)
Modify the code to use ncurses is_pad() instead of checking WINDOW
_flags field.  If your platform does not provide the is_pad(), the
existing way that checks the field will be enabled.

Note: This change does not drop support for platforms where do not
have both WINDOW _flags field and is_pad().
(cherry picked from commit 8bc7d63560)
2017-11-01 14:36:48 +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
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
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
Benjamin Peterson a72d15c97f consistently use Py_TYPE, Py_REFCNT, and correct initializer macros (#3563)
This no-op change makes 2.7 more consistent with 3.x to ease comparison and backports.
2017-09-13 21:20:29 -07:00
Benjamin Peterson c707893f9c version bumps for 2.7.14rc1 2017-08-26 11:18:30 -07:00
Victor Stinner 2c7085fd7b bpo-27593: Get SCM build info from git instead of hg (#1327)
Based on commit 5c4b0d063a by Ned
Deily, which is based on original patches by Brett Cannon and Steve
Dower.

Remove also the private _Py_svnversion() function and SVNVERSION
variable.

Note: Py_SubversionRevision() and Py_SubversionShortBranch() are
unchanged, they are part of the public API.
2017-05-02 16:55:50 +02:00
Serhiy Storchaka 89f9eb5b19 bpo-29943: Remove the PySlice_GetIndicesEx() macro. (#1050) 2017-04-16 10:08:47 +03:00
Serhiy Storchaka 079f21f873 bpo-29935: Fixed error messages in the index() method of tuple and list (#887) (#907) (#910)
when pass indices of wrong type.
(cherry picked from commit d4edfc9abf)
(cherry picked from commit bf4bb2e430)
2017-03-30 20:32:18 +03:00
Serhiy Storchaka ed45f739b6 Issue #27867: Fixed merging error. 2017-02-04 11:10:25 +02:00
Serhiy Storchaka 522a60c10d Issue #27867: Silenced may-be-used-uninitialized warnings after
using PySlice_GetIndicesEx() in debug builds.
2017-02-04 11:04:00 +02:00
Serhiy Storchaka 3efe32ed48 Issue #27867: Replaced function PySlice_GetIndicesEx() with a macro. 2017-01-25 13:22:06 +02:00
Antoine Pitrou f939b3c0f7 Issue #28427: old keys should not remove new values from
WeakValueDictionary when collecting from another thread.
2016-12-27 15:08:27 +01:00
Benjamin Peterson 2df5adb92e prepare for 2.7.14 dev 2016-12-03 13:12:03 -08:00
Benjamin Peterson 33b2d786e7 python 2.7.13rc1 2016-12-03 12:38:47 -08:00
Martin Panter ed82604e3f Issue #25701: Document that some C APIs can both set and delete items
Also document that using the dedicated functions to delete items is
preferred. Using PyObject_SetAttr/String() and PySequence_SetItem/Slice() for
deletion is deprecated.
2016-11-30 10:32:40 +00:00
Benjamin Peterson 0f5497e4c5 remove trailing whitespace 2016-09-19 22:16:36 -07:00
Martin Panter ca56dd4767 Issue #28139: Fix messed up indentation
Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.
2016-09-17 07:54:55 +00:00
sashk fd2f85d6e4 Issue #27806: Fix 32-bit builds on macOS Sierra 10.12 broken by removal of
deprecated QuickTime/QuickTime.h header file.  Patch by sashk.
2016-09-16 09:08:45 -04:00
Martin Panter 6507657ddd Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
Martin Panter 99496760c7 Fix some spelling errors 2016-08-20 08:00:53 +00:00
Ned Deily b97001ef46 Issue #10910: Update FreedBSD version checks for the ctype UTF-8 workaround.
The original problem has been fixed in newer versions of FreeBSD.
Patch by Dimitry Andric of the FreeBSD project.
2016-08-15 03:04:36 -04:00
Ned Deily 98ba455b9a Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
Patch by Ronald Oussoren.
2016-08-15 02:59:31 -04:00
Martin Panter 3d36f0f712 Spelling and grammar fixes in code comments and documentation 2016-07-28 02:37:04 +00:00
Martin Panter a850ef698e Issue #27626: Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
2016-07-28 01:11:04 +00:00
Martin Panter e2eacc02bc Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2016-07-28 03:04:04 +00:00
Martin Panter b362f75f6e Issue #25523: Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
to fix the grammar.
2015-11-02 03:37:02 +00:00
Benjamin Peterson 0c67a5f3bf post 2.7.12 version 2016-06-25 14:04:38 -07:00
Benjamin Peterson 1fae982b9b 2.7.12 final 2016-06-25 14:03:21 -07:00
Benjamin Peterson 1563f164e5 2.7.12 release candidate 1 2016-06-11 14:46:26 -07:00
Martin Panter 8d496add74 Issue #27171: Fix typos in documentation, code comments, and tests 2016-06-02 10:35:44 +00:00
Martin Panter 4f23cabc16 Corrections for a/an in code comments and documentation 2016-05-08 13:45:55 +00:00
Serhiy Storchaka 9a118f1dc3 Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 09:37:36 +03:00
Martin Panter 6a8163a928 Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
This affects documentation and code comments.
2016-04-15 02:14:19 +00:00
Serhiy Storchaka 763a61ca95 Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
2016-04-10 18:05:12 +03:00
Serhiy Storchaka bc62af1bbe Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:51:18 +03:00
Martin Panter 3c38dccf22 Fix typos in documentation and comments 2016-04-05 06:19:42 +00:00