Skip to content

Commit

Permalink
cpython: Fix upstream bugs NixOS#27177 and NixOS#25750
Browse files Browse the repository at this point in the history
27177 was merged but not backported to 2.7.
There is currently an open PR for 25750.
  • Loading branch information
timokau committed Apr 26, 2018
1 parent 6e623fb commit 66f866a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkgs/development/interpreters/python/cpython/2.7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,24 @@ let

./properly-detect-curses.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 [
Expand Down

0 comments on commit 66f866a

Please sign in to comment.