Skip to content

Commit 4191051

Browse files
committed
CHANGES:
- Python 3.14 not supported yet
1 parent eff27a8 commit 4191051

File tree

7 files changed

+22
-19
lines changed

7 files changed

+22
-19
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,12 @@ DCSServerBot supports a lot of them already which can add some quality of life.
150150
You need the following software to run DCSServerBot:
151151

152152
#### a) Python
153-
You need to have [Python](https://www.python.org/downloads/) 3.10 or higher installed. Please make sure that you tick "Add python.exe to PATH"
154-
during your Python installation.<br>
153+
You need to have [Python](https://www.python.org/downloads/) 3.10 - 3.13 installed.
154+
Please make sure that you tick "Add python.exe to PATH" during your Python installation.
155+
156+
> [!IMPORTANT]
157+
> As of today, Python 3.14 is not supported yet.
158+
> Please do not try to run DCSServerBot on 3.14, it will most likely fail.
155159
156160
#### b) PostgreSQL
157161
DCSServerBot needs a database to store information in. I decided to use [PostgreSQL](https://www.postgresql.org/download/), as it has great performance

install.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ if errorlevel 9009 (
1515
exit /B 9009
1616
)
1717

18-
python -c "import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)" >NUL 2>&1
18+
python -c "import sys; sys.exit(0 if (3,10) <= sys.version_info < (3,14) else 1)" >NUL 2>&1
1919
if errorlevel 1 (
2020
echo.
2121
echo *** ERROR ***
22-
echo DCSServerBot requires Python 3.10 or newer.
22+
echo DCSServerBot requires Python >= 3.10 and < 3.14.
2323
exit /B 1
2424
)
2525

install.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,10 @@ def configure_no_discord() -> tuple[dict, dict]:
273273
def install(self, config_dir: str, user: str, database: str):
274274
global _
275275

276-
major_version = int(platform.python_version_tuple()[1])
277-
if major_version <= 8:
278-
print(f"""
279-
[red]!!! Your Python 3.{major_version} installation is not supported, you might face issues. Please use 3.9 or higher!!![/]
280-
""")
276+
if not ((3,10) <= sys.version_info < (3,14)):
277+
print(f"[red]!!! Python {sys.version_info.major}.{sys.version_info.minor} is not supported."
278+
f"DCSServerBot requires Python >= 3.10 and < 3.14 !!![/]")
279+
exit(-1)
281280
print("""
282281
[bright_blue]Hello! Thank you for choosing DCSServerBot.[/]
283282
DCSServerBot supports everything from single server installations to huge server farms with multiple servers across

mizedit.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ if errorlevel 9009 (
99
exit /B 9009
1010
)
1111

12-
python -c "import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)" >NUL 2>&1
12+
python -c "import sys; sys.exit(0 if (3,10) <= sys.version_info < (3,14) else 1)" >NUL 2>&1
1313
if errorlevel 1 (
1414
echo.
1515
echo *** ERROR ***
16-
echo DCSServerBot requires Python 3.10 or newer.
16+
echo DCSServerBot requires Python >= 3.10 and < 3.14.
1717
exit /B 1
1818
)
1919

run.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ if errorlevel 9009 (
1515
exit /B 9009
1616
)
1717

18-
python -c "import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)" >NUL 2>&1
18+
python -c "import sys; sys.exit(0 if (3,10) <= sys.version_info < (3,14) else 1)" >NUL 2>&1
1919
if errorlevel 1 (
2020
echo.
2121
echo *** ERROR ***
22-
echo DCSServerBot requires Python 3.10 or newer.
22+
echo DCSServerBot requires Python >= 3.10 and < 3.14.
2323
exit /B 1
2424
)
2525

run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,10 @@ async def run_node(name, config_dir=None, no_autoupdate=False) -> int:
255255
Main.reveal_passwords(args.config)
256256
exit(-2)
257257

258-
# Check versions
259-
if int(platform.python_version_tuple()[0]) < 3 or int(platform.python_version_tuple()[1]) < 10:
260-
log.error("You need Python 3.10 or higher to run DCSServerBot!")
261-
exit(-2)
258+
# Require Python >= 3.10 and < 3.14
259+
if not ((3,10) <= sys.version_info < (3,14)):
260+
print("ERROR: DCSServerBot requires Python >= 3.10 and < 3.14.")
261+
sys.exit(-2)
262262

263263
# Add certificates
264264
os.environ["SSL_CERT_FILE"] = certifi.where()

update.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ if errorlevel 9009 (
88
exit /B 9009
99
)
1010

11-
python -c "import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)" >NUL 2>&1
11+
python -c "import sys; sys.exit(0 if (3,10) <= sys.version_info < (3,14) else 1)" >NUL 2>&1
1212
if errorlevel 1 (
1313
echo.
1414
echo *** ERROR ***
15-
echo DCSServerBot requires Python 3.10 or newer.
15+
echo DCSServerBot requires Python >= 3.10 and < 3.14.
1616
exit /B 1
1717
)
1818

0 commit comments

Comments
 (0)