Monkey patch of glob.glob breaks root_dir kwarg
AaronDMarasco opened this issue · comments
MWE:
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import glob
>>> glob.glob("*steam*", root_dir="/tmp/")
['steam_chrome_shmem_uid1000_spid18613', 'steamHMDDCa', 'steam']
>>> import sh
>>> sh.__version__
'2.0.6'
>>> glob.glob("*steam*", root_dir="/tmp/")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: glob() got an unexpected keyword argument 'root_dir'
>>>
From what I can tell looking at the source, the library simply forwards all kwargs
but I don't know enough to trace it.
Encountered in python 3.10.5 and 3.10.12.
The "you seem to forward kwargs
" seems to be talking about develop
which I saw here on github. When I edit the file locally, it doesn't do that. So maybe this is already fixed in develop
but not yet released.
Dupe of #708 I guess.
Thanks for bringing this to my attention. Version 2.0.7 is released with the glob fix