New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python-2.7.14: Fix #27177 and #25750 #39555
Conversation
cea8788
to
dad5c4a
Compare
@@ -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 taht has `__index__`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "taht" -> "that"
# Fix python bug #27177 (https://bugs.python.org/issue27177) | ||
# The issue is that `match.group` only recognizes python integers | ||
# instead of everything taht has `__index__`. | ||
# This bug was fixed upstream, but not backported to 2.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do any of the other python versions (3.4, 3.5, ..) in-tree need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, everything <= 3.6 should have this issue. I only applied the patch for 2.7 because I only need it for 2.7 (for sage) and I wanted to minimize rebuilds. Since no 3.4/3.5 software seems to need it, I don't think its strictly necessary. Should I add it to 3.4 and 3.5 anyways?
|
||
# "`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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, reading that PR suggests this should be applied to all python versions (although it does say backporting to 2.7 is the most important since it's most problematic there).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats true, I also only applied this to 2.7 to minimize rebuilds. But since this is a crashing bug, here it might really be a good idea to add it to all versions. Especially since the other PR triggers rebuilds across all versions anyways -- but that only matters if this gets merged before those builds run (which is a bit optimistic).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimizing mass rebuilds isn't really needed, I believe. On staging we have a large rebuild almost every week, and python2 by itself is probably the worst part.
I'm not sure, sorry. Hopefully our python maintainer or someone else can lend us some insight or make the judgement call. |
I'm on holidays now and won't be able to review until Monday earliest. |
Okay, there is absolutely no hurry. I just wanted to avoid a double rebuild, but rebuilds probably aren't that rare anyways. Thanks for taking the time out of your holidays to let me know. |
Sorry for the wait. This looks good to me. It's a pity the OP of the first one did not push that one further. @vcunat can you take this into account in the 2.7.15 bump. I've been without broadband for some days now and it looks like it will be for a bit longer. |
This apparently doesn't conflict with #40005 in any way (except trivial conflict in our patch list). Neither issue from this PR seems to have a fix upstreamed to 2.7 yet. With 2.7.15, I'm not sure about the risks, but perhaps it's safe enough to just merge to staging directly. |
Yeah the "well technically not a bug" answer is not very helpful. python2 apparently really is on the last days of life support.
I guess @FRidh only meant to merge both PRs into staging at the same time. |
Yes, I think so. The real problem in staging ATM is that it already contains several thousand build regressions for weeks, so someone will have to resolve them... |
It was rejected pretty explicitly. No point in fighting a lost battle. |
For the record: we have been using both patches for quite some time in SageMath without any problems. The first one just adds some functionality which didn't exist before and the second one fixes an obvious bug but doesn't change any functionality. |
27177 was merged but not backported to 2.7. There is currently an open PR for 25750.
Looks like #40005 is in master now (and can be closed). I have rebased. Can we merge this? |
Success on x86_64-linux (full log) Attempted: python Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: python Partial log (click to expand)
|
Thanks! (ofBorg failure is a timeout) |
Motivation for this change
I originally wanted to include this in the sage PR, but since a world-rebuilding python PR (#39517 by @dtzWill) was just merged into staging maybe its better to only rebuild all python2.7 packages on linux once.
Python Issue 27177: Regex match.group doesn't support index, only standard integers. This was fixed, but not backported to 2.7. sage needs that because it uses its own integers by default. I tried to monkey-patch around this, but apparently you can't monkey-patch
re
.Python Issue 25750 leads to occasional crashes, especially on python 2.7. There is an upstream PR in the making.
As requested previously, there is now a branch with the sage package. This is not yet PR-ready though, contains unneeded patches, duplication, TODOs etc. I will rewrite history on that branch.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)