ArcGIS Pro : Python cache for custom toolbox
ArcGIS Desktop versus ArcGIS Pro : custom toolbox
I am writing Python scripts and modules for a toolbox. Everything (toolbox, scripts, modules) is kept in one folder ("Toolbox Version 1"). The tool scripts import from the modules (e.g. "import helper"). Some modules import from others in the same folder.
To make a new version of the toolbox, I can simply copy the folder as "Toolbox Version 2" and work there. The scripts are enhanced and the <helper> module is revised. The Python files are revised, but not renamed.
ArcGIS Desktop (10.6.1) executes the tools in both toolboxes promptly and correctly.
ArcGIS Pro : ???????
In ArcGIS Pro 2.2.4, a toolbox's first-time use involves a lengthy wait (nearly a minute) before starting (for even the simplest script). Presumably, Pro is caching all of the Python for the project.
New project. Add Toolbox Version 1. Click on a script tool. Wait 45 seconds while the unexplained activity proceeds. Run the tools ... Time passes ... Add Toolbox Version 2. Will the new <helper> module be used? No, the old cached <helper> is used. Will removing Toolbox Version 1 do the trick? No. You will have to remove both toolboxes, save the project, and exit ArcGIS Pro.