mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Branch on python 3.12+ shutil.rmtree in make_tempdir
This commit is contained in:
parent
1adf79414e
commit
76d94b31f2
|
@ -1068,7 +1068,10 @@ def make_tempdir() -> Generator[Path, None, None]:
|
|||
rmfunc(path)
|
||||
|
||||
try:
|
||||
shutil.rmtree(str(d), onerror=force_remove)
|
||||
if sys.version_info >= (3, 12):
|
||||
shutil.rmtree(str(d), onexc=force_remove)
|
||||
else:
|
||||
shutil.rmtree(str(d), onerror=force_remove)
|
||||
except PermissionError as e:
|
||||
warnings.warn(Warnings.W091.format(dir=d, msg=e))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user