From 6805375e1bfd5860a622cead47f0844f66a9c49a Mon Sep 17 00:00:00 2001 From: Vaclav Petras Date: Wed, 8 May 2024 23:34:28 -0400 Subject: [PATCH] grass.script: Make grass_path keyword only in init (#3689) 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 (and 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