"vscode:/vscode.git/clone" did not exist on "4d1d5b569f55dd613bea26714eb1ad931a10be35"
  • vincedovy's avatar
    Fix json WindowsPath crash (#8662) · a536e775
    vincedovy authored
    
    
    * Add check for WindowsPath in to_json_string
    
    On Windows, os.path.join returns a WindowsPath. to_json_string does not convert this from a WindowsPath to a string. Added check for WindowsPath to to_json_saveable.
    
    * Remove extraneous convert to string in test_check_path_types (tests/others/test_config.py)
    
    * Fix style issues in tests/others/test_config.py
    
    * Add unit test to test_config.py to verify that PosixPath and WindowsPath (depending on system) both work when converted to JSON
    
    * Remove distinction between PosixPath and WindowsPath in ConfigMixIn.to_json_string(). Conditional now tests for Path, and uses Path.as_posix() to convert to string.
    
    ---------
    Co-authored-by: default avatarVincent Dovydaitis <vincedovy@gmail.com>
    Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
    a536e775
configuration_utils.py 32 KB