smart_open
smart_open copied to clipboard
fix design issues inside ssh.py
The functional design in ssh.py was broken.
All other modules share these design characteristics:
- module.open: accepts module-specific keyword parameters
- module.open_uri function: accepts a URI and transport_params dict, function signature common across all modules
- module.open_uri unpacks transport_params dict and passes it to module.open
The SSH submodule, on the other hand, violates these characteristics. ssh.open_uri passes transport_params to ssh.open as-is, without unpacking them. It looks like this snuck into the code in this commit 4e676833 and then further developed more recently in 269c3a2a.
This PR brings ssh.py back in line with the common design characteristics shared by other submodules.
@mrk-its and @wbeardall Can you please review?