Skip to content

Commit 43970a3

Browse files
committed
Fix Python 3.14 compatibility. Closes #180
1 parent 5937ab8 commit 43970a3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

keepmenu/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import argparse
55
import configparser
66
from contextlib import closing
7+
import multiprocessing
78
from multiprocessing import Event, Process, Pipe
89
from multiprocessing.managers import BaseManager
910
import os
@@ -17,6 +18,10 @@
1718
import keepmenu
1819
from keepmenu.keepmenu import DmenuRunner
1920

21+
# Python 3.14 changes the default to 'forkserver' on Linux.
22+
# Set to 'fork' for backward compatibility.
23+
multiprocessing.set_start_method('fork')
24+
2025

2126
def find_free_port():
2227
"""Find random free port to use for BaseManager server

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ classifiers = [
3232
"Programming Language :: Python :: 3.11",
3333
"Programming Language :: Python :: 3.12",
3434
"Programming Language :: Python :: 3.13",
35+
"Programming Language :: Python :: 3.14",
3536
"Topic :: Utilities",
3637
]
3738
dependencies = [

0 commit comments

Comments
 (0)