Skip to content

Commit e1b7c6f

Browse files
authored
Fixed segfault on py312+ (#617)
1 parent 51e9c00 commit e1b7c6f

File tree

4 files changed

+9
-30
lines changed

4 files changed

+9
-30
lines changed

docs/source/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ Glossary
3737
Releases
3838
---------------------
3939

40+
v4.1.1
41+
=====================
42+
- Fixed segmentation-fault crash when using Python 3.12+.
43+
44+
4045
v4.1.0
4146
=====================
4247
- New message period types:

src/daf/__init__.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,5 @@
1818
from .responder import *
1919
from .messagedata import *
2020

21-
import sys
22-
import warnings
2321

24-
25-
VERSION = "4.1.0"
26-
27-
28-
if sys.version_info.minor == 12 and sys.version_info.major == 3:
29-
warnings.warn(
30-
"DAF's support on Python 3.12 is limited. Web browser features and"
31-
" SQL logging are not supported in Python 3.12. Please install Python 3.11 instead."
32-
" Additional GUI may be unstable on Python 3.12"
33-
)
22+
VERSION = "4.1.1"

src/daf_gui/main.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
"""
22
Main file of the DAF GUI.
33
"""
4-
from importlib.util import find_spec
5-
from pathlib import Path
6-
74
import tk_async_execute as tae
8-
import subprocess
9-
import json
10-
115
import ttkbootstrap as ttk
126

137
from ttkbootstrap.toast import ToastNotification
@@ -21,11 +15,10 @@
2115
from .connector import *
2216
from .tabs import *
2317

24-
import tkinter as tk
2518
import ttkbootstrap.dialogs.dialogs as tkdiag
2619
import ttkbootstrap.style as tkstyle
20+
import tkinter as tk
2721

28-
import sys
2922
import os
3023
import daf
3124

@@ -115,14 +108,6 @@ def __init__(self) -> None:
115108
self.win_main.protocol("WM_DELETE_WINDOW", self.close_window)
116109
self.tabman_mf.select(1)
117110

118-
if sys.version_info.minor == 12 and sys.version_info.major == 3:
119-
tkdiag.Messagebox.show_warning(
120-
"DAF's support on Python 3.12 is limited. Web browser features and"
121-
" SQL logging are not supported in Python 3.12. Please install Python 3.11 instead.\n"
122-
"Additional GUI can be unstable on Python 3.12",
123-
"Compatibility warning!"
124-
)
125-
126111
def init_menu(self):
127112
"Initializes GUI toolbar menu"
128113
menu = ttk.Menu(self.win_main)

src/daf_gui/tabs/analytics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ async def analytics_load_history():
9292
it.ObjectReference.from_object(logger), getter_history, **param_object_params
9393
)
9494
items = convert_to_object_info(items)
95-
lst_history.clear()
96-
lst_history.insert(tk.END, *items)
95+
tae.tk_execute(lst_history.clear)
96+
tae.tk_execute(lst_history.insert, tk.END, *items)
9797

9898
def show_log(listbox: ListBoxScrolled):
9999
selection = listbox.curselection()

0 commit comments

Comments
 (0)