Skip to content

Commit db9d321

Browse files
committed
fix: temporary prevent Python3.14
1 parent f672159 commit db9d321

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

docs/Changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Changelog
22

3-
## 1.1.3 (unreleased)
3+
## 1.1.3 (2025-10-09)
44
* enh (TextInterface): Esc raises Cancelled in countdown
55
* enh (run): settings accepts subclasses (-> shorter notation)
66
* enh: [CliSettings][mininterface.settings.CliSettings]
77
* fix: Countdown won't stop on Alt+Tab.
8+
* fix: temporary prevent Python3.14
89

910
## 1.1.2 (2025-10-01)
1011
* feat: timeout parameter for alert & confirm

mininterface/_mininterface/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class Env:
9090
# NOTE docs that
9191
# m = run([Env, Env2]) -> .env will be the chosen one.
9292

93+
# NOTE In Python3.14, type(self).__annotations__ will work.
9394
self._adaptor = self.__annotations__["_adaptor"](self, settings)
9495

9596
def __enter__(self) -> "Self":

mininterface/_mininterface/adaptor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class BackendAdaptor(ABC):
2626

2727
def __init__(self, interface: "Mininterface", settings: UiSettings | None):
2828
self.interface = interface
29+
# NOTE self.__annotations__ will pose problem at Python3.14
2930
self.facet = interface.facet = self.__annotations__["facet"](self, interface.env)
3031
self.settings = settings or self.__annotations__["settings"]()
3132

mininterface/_tk_interface/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ def prevent_submit(event):
165165
# Only prevent form submission, don't affect Tab navigation
166166
return None # Allow event propagation for other handlers
167167

168-
for tag, field_form in zip(flatten(form), flatten(nested_widgets)):
168+
fform = list(flatten(form))
169+
for tag, field_form in zip(fform, flatten(nested_widgets)):
169170
tag: Tag
170171
field_form: FieldForm
171172
label1: Widget = field_form.label
@@ -193,8 +194,7 @@ def prevent_submit(event):
193194
match tag:
194195
case SelectTag():
195196
grid_info = widget.grid_info()
196-
single = len(dict_removed_main(form)) == 1
197-
wrapper = SelectInputWrapper(master, tag, grid_info, widget, adaptor, single)
197+
wrapper = SelectInputWrapper(master, tag, grid_info, widget, adaptor, len(fform) == 1)
198198
select_tag = True
199199
variable = wrapper.variable_wrapper
200200
# since tkinter variables do not allow objects,

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "mininterface"
7-
version = "1.1.2"
7+
version = "1.1.3"
88
description = "A minimal access to GUI, TUI, CLI and config"
99
authors = ["Edvard Rejthar <[email protected]>"]
1010
license = "LGPL-3.0-or-later"
@@ -13,7 +13,8 @@ readme = "README.md"
1313

1414
[tool.poetry.dependencies]
1515
# Minimal requirements (dialogs with partial .form support (m.form(dict) or m.form(dataclass_instance))
16-
python = "^3.10"
16+
python = ">=3.10,<3.14"
17+
# python = "^3.10" NOTE when tyro accepts Python3.14, get this line back
1718
simple_term_menu = "*"
1819
annotated-types = "*"
1920
# Basic requirements (CLI and full .form support (m.form(dataclass_class))

0 commit comments

Comments
 (0)