8000 Remove reference to old Tk/Windows bug. by anntzer · Pull Request #14632 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Remove reference to old Tk/Windows bug. #14632

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

Merged
merged 1 commit into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed 8000 to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions examples/user_interfaces/embedding_in_tk_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,7 @@ def on_key_press(event):

canvas.mpl_connect("key_press_event", on_key_press)


def _quit():
root.quit() # Stops mainloop.
# The following is necessary on Windows to prevent
# Fatal Python Error: PyEval_RestoreThread: NULL tstate
root.destroy()


button = tkinter.Button(master=root, text="Quit", command=_quit)
button = tkinter.Button(master=root, text="Quit", command=root.quit)
button.pack(side=tkinter.BOTTOM)

tkinter.mainloop()
# If you put root.destroy() here, it will cause an error if the window is
# closed with the window manager.
4 changes: 0 additions & 4 deletions lib/matplotlib/backends/_backend_tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,6 @@ def resize(self, width, height):
self.toolbar.configure(width=width)

def show(self):
"""
this function doesn't segfault but causes the
PyEval_RestoreThread: NULL state bug on win32
"""
with _restore_foreground_window_at_end():
if not self._shown:
def destroy(*args):
Expand Down
0