From 75c291e8a14bfc6d3f4e123408593afc97faf092 Mon Sep 17 00:00:00 2001 From: Vaclav Petras Date: Mon, 6 May 2024 09:43:15 -0400 Subject: [PATCH] grass.script: Make grass_path keyword only in init This makes the grass_path parameter a keyword-only argument (PEP 3102). While this technically breaks the 8.0 API for 8.4, the documentation only shows grass_path as a keyword argument, grass_path is required to be a keyword argument when location and mapset are omitted, and given the automation triggered by grass_path=None, any usage of grass_path is likely limited (the usage would have to be as positional argument to trigger the incompatibility). --- python/grass/script/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/grass/script/setup.py b/python/grass/script/setup.py index 9ff4fa3ddc8..1acc2f9de6b 100644 --- a/python/grass/script/setup.py +++ b/python/grass/script/setup.py @@ -268,7 +268,7 @@ def setup_runtime_env(gisbase=None, *, env=None): env["PYTHONPATH"] = path -def init(path, location=None, mapset=None, grass_path=None): +def init(path, location=None, mapset=None, *, grass_path=None): """Initialize system variables to run GRASS modules This function is for running GRASS GIS without starting it with the