File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 types ,
3737 upload_api_v4 ,
3838 utils ,
39+ VERSION ,
3940)
4041from .camm import camm_builder , camm_parser
4142from .gpmf import gpmf_parser
@@ -799,8 +800,14 @@ def _maybe_create_persistent_cache_instance(
799800 LOG .debug ("Dry-run mode enabled, skipping caching upload file handles" )
800801 return None
801802
803+ # Different python/CLI versions use different cache (dbm) formats.
804+ # Separate them to avoid conflicts
805+ py_version_parts = [str (part ) for part in sys .version_info [:3 ]]
806+ version = f"py_{ '_' .join (py_version_parts )} _{ VERSION } "
807+
802808 cache_path_dir = (
803809 Path (constants .UPLOAD_CACHE_DIR )
810+ .joinpath (version )
804811 .joinpath (api_v4 .MAPILLARY_CLIENT_TOKEN .replace ("|" , "_" ))
805812 .joinpath (
806813 user_items .get ("MAPSettingsUserKey" , user_items ["user_upload_token" ])
@@ -812,6 +819,7 @@ def _maybe_create_persistent_cache_instance(
812819 # Sanitize sensitive segments for logging
813820 sanitized_cache_path = (
814821 Path (constants .UPLOAD_CACHE_DIR )
822+ .joinpath (version )
815823 .joinpath ("***" )
816824 .joinpath ("***" )
817825 .joinpath ("cached_file_handles" )
You can’t perform that action at this time.
0 commit comments