I have a small piece of code that I've set up to run as a scheduled task once a day. I've tested this code locally and it works fine. My local Python version is 3.8+ for better context. This is the callback in the task logs.
with requests.get(urlbase, {**params, 'storeid': id['class'][1].split('_')[1]}) as resp:
^
SyntaxError: invalid syntax
Now I'm not sure exactly why this would raise a syntax error except that perhaps the task environment is not actually running Python 3.8 as it should. I don't quite remember when ** dict merging was added to Python but I'm pretty sure it's been around in Python 3 for a while.
Is there a way to verify what Python version the scheduled task runs on? If it is running on something <3.8 (or even 2.x) is there a way to force it to use a 3.8 environment?