BUG: SystemError in df.sum
- [x] closes #30886
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Hmm that's strange. Is there an upstream issue for this? @scoder any idea if this is an issue in cython vs further upstream? Planning to merge this later today. No issues in merging but if this is the resolution I guess the question is do we need to worry about this in other places where Cython / f-strings are used? Something to keep an eye on / debug for sure. I'm not really sure where to start on that (the linked issue has a bit more information). Disallowing fstrings in Cython code is certainly one option. Thanks @jbrockmendel!