python: Fix upstream bugs #27177 and #25750

27177 was merged but not backported to 2.7.
There is currently an open PR for 25750.
This commit is contained in:
Timo Kaufmann 2018-04-24 16:03:25 +02:00 committed by Frederik Rietdijk
parent 55c54d2bfe
commit f2f7c4287f

View file

@ -58,6 +58,24 @@ let
# if DETERMINISTIC_BUILD env var is set
./deterministic-build.patch
# Fix python bug #27177 (https://bugs.python.org/issue27177)
# The issue is that `match.group` only recognizes python integers
# instead of everything that has `__index__`.
# This bug was fixed upstream, but not backported to 2.7
(fetchpatch {
name = "re_match_index.patch";
url = "https://bugs.python.org/file43084/re_match_index.patch";
sha256 = "0l9rw6r5r90iybdkp3hhl2pf0h0s1izc68h5d3ywrm92pq32wz57";
})
# "`type_getattro()` calls `tp_descr_get(self, obj, type)` without actually owning a reference to "self".
# In very rare cases, this can cause a segmentation fault if "self" is deleted by the descriptor."
# https://github.com/python/cpython/pull/6118
(fetchpatch {
name = "type_getattro.patch";
url = "https://github.com/python/cpython/pull/6118/commits/8c6da2d7e7e719c40fb539b7f7cb7583cccc5527.patch";
sha256 = "11v9yx20hs3jmw0wggzvmw39qs4mxay4kb8iq2qjydwy9ya61nrd";
})
] ++ optionals (x11Support && stdenv.isDarwin) [
./use-correct-tcl-tk-on-darwin.patch
] ++ optionals stdenv.isLinux [