async-tkinter-loop 0.10.3__tar.gz → 0.10.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {async_tkinter_loop-0.10.3 → async_tkinter_loop-0.10.4}/PKG-INFO +2 -2
- {async_tkinter_loop-0.10.3 → async_tkinter_loop-0.10.4}/async_tkinter_loop/async_tkinter_loop.py +6 -1
- {async_tkinter_loop-0.10.3 → async_tkinter_loop-0.10.4}/pyproject.toml +6 -5
- {async_tkinter_loop-0.10.3 → async_tkinter_loop-0.10.4}/LICENSE +0 -0
- {async_tkinter_loop-0.10.3 → async_tkinter_loop-0.10.4}/README.md +0 -0
- {async_tkinter_loop-0.10.3 → async_tkinter_loop-0.10.4}/async_tkinter_loop/__init__.py +0 -0
- {async_tkinter_loop-0.10.3 → async_tkinter_loop-0.10.4}/async_tkinter_loop/mixins.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: async-tkinter-loop
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.4
|
|
4
4
|
Summary: Asynchronous mainloop implementation for tkinter
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
21
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
22
|
Provides-Extra: examples
|
|
23
23
|
Requires-Dist: Pillow (>=10.3.0,<13.0.0) ; extra == "examples"
|
|
24
|
-
Requires-Dist: customtkinter (>=5
|
|
24
|
+
Requires-Dist: customtkinter (>=5,<6) ; extra == "examples"
|
|
25
25
|
Requires-Dist: httpx (>=0.23.1,<0.29.0) ; extra == "examples"
|
|
26
26
|
Requires-Dist: typing-extensions
|
|
27
27
|
Project-URL: Documentation, https://insolor.github.io/async-tkinter-loop/
|
{async_tkinter_loop-0.10.3 → async_tkinter_loop-0.10.4}/async_tkinter_loop/async_tkinter_loop.py
RENAMED
|
@@ -53,6 +53,8 @@ def async_mainloop(root: tk.Tk, event_loop: asyncio.AbstractEventLoop | None = N
|
|
|
53
53
|
|
|
54
54
|
P = ParamSpec("P")
|
|
55
55
|
|
|
56
|
+
_tasks = set()
|
|
57
|
+
|
|
56
58
|
|
|
57
59
|
def async_handler(
|
|
58
60
|
async_function: Callable[P, Coroutine[Any, Any, None]],
|
|
@@ -106,9 +108,12 @@ def async_handler(
|
|
|
106
108
|
button = tk.Button("Press me", command=some_async_function)
|
|
107
109
|
```
|
|
108
110
|
"""
|
|
111
|
+
|
|
109
112
|
@wraps(async_function)
|
|
110
113
|
def wrapper(*handler_args) -> None:
|
|
111
114
|
loop = event_loop or get_event_loop()
|
|
112
|
-
loop.create_task(async_function(*handler_args, *args, **kwargs))
|
|
115
|
+
task = loop.create_task(async_function(*handler_args, *args, **kwargs))
|
|
116
|
+
_tasks.add(task)
|
|
117
|
+
task.add_done_callback(_tasks.discard)
|
|
113
118
|
|
|
114
119
|
return wrapper
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "async-tkinter-loop"
|
|
3
|
-
version = "0.10.
|
|
3
|
+
version = "0.10.4"
|
|
4
4
|
description = "Asynchronous mainloop implementation for tkinter"
|
|
5
5
|
authors = ["insolor <insolor@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -21,19 +21,19 @@ classifiers = [
|
|
|
21
21
|
python = "^3.10"
|
|
22
22
|
Pillow = {version = ">=10.3.0,<13.0.0", optional = true}
|
|
23
23
|
httpx = {version = ">=0.23.1,<0.29.0", optional = true}
|
|
24
|
-
customtkinter = {version = "
|
|
24
|
+
customtkinter = {version = ">=5,<6", optional = true}
|
|
25
25
|
typing-extensions = "*"
|
|
26
26
|
|
|
27
27
|
[tool.poetry.group.dev.dependencies]
|
|
28
|
-
pytest = ">=7.4,<
|
|
28
|
+
pytest = ">=7.4,<10.0"
|
|
29
29
|
pytest-cov = ">=4.1,<8.0"
|
|
30
30
|
pytest-timeout = "^2.0.1"
|
|
31
|
-
ruff = ">=0.4.7,<0.
|
|
31
|
+
ruff = ">=0.4.7,<0.16.0"
|
|
32
32
|
customtkinter = "^5.2.1"
|
|
33
33
|
|
|
34
34
|
[tool.poetry.group.docs.dependencies]
|
|
35
35
|
mkdocs = "^1.5.2"
|
|
36
|
-
mkdocstrings = {extras = ["python"], version = ">=0.22,<
|
|
36
|
+
mkdocstrings = {extras = ["python"], version = ">=0.22,<1.1"}
|
|
37
37
|
mkdocs-material = "^9.2.5"
|
|
38
38
|
|
|
39
39
|
[tool.poetry.extras]
|
|
@@ -53,6 +53,7 @@ ignore = [
|
|
|
53
53
|
"D", # Warning about docstrings are suppressed for now
|
|
54
54
|
"ANN002",
|
|
55
55
|
"ANN003",
|
|
56
|
+
"COM812", # Conflicts with the formatter
|
|
56
57
|
]
|
|
57
58
|
fixable = ["ALL"]
|
|
58
59
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|