#1032522 emacs-gtk: Pausing at an open quote causes emacs to freeze when editing Python

Package:
emacs-gtk
Source:
emacs-gtk
Description:
GNU Emacs editor (with GTK+ GUI support)
Submitter:
Hans-Christoph Steiner
Date:
2023-12-13 05:15:02 UTC
Severity:
normal
#1032522#5
Date:
2023-03-08 16:08:28 UTC
From:
To:
Dear Maintainer,

    * What led up to the situation?

I've been editing Python in emacs for over a decade.  I'm working on
fdroidserver right now, an old Python code base.

    * What exactly did you do (or not do) that was effective (or
      ineffective)?

While editing Python code, if I pause after typing an open quote, like
' or """, then emacs will totally freeze and has to be killed.  The
window won't draw updates if I resize it.  Specifically, this has to
be typed in a class function, for example, typing at this point:
https://gitlab.com/fdroid/fdroidserver/-/blob/ae2b33dab38f7e76fc6ca5245c8e3fa44224802f/tests/index.TestCase#L68

And adding:

     foo = '

will cause it to crash every time.

    * What was the outcome of this action?

emacs is frozen, and it is pegging the one CPU.

    * What outcome did you expect instead?

It should just let me type code!


It seems to be related to:
https://www.reddit.com/r/emacs/comments/z0oye9/emacs_freezes_when_opening_a_python_file/

#1032522#10
Date:
2023-12-13 05:12:01 UTC
From:
To:
I missed this report while researching, so I ended up filing this one:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058574

It looks like it was an upstream issue where certain code in python.el
was brought into emacs 28.2, but didn't make it to 29.