petobens / poet-v

Vim Meets Poetry and Pipenv Virtual Environments
MIT License
88 stars 10 forks source link

Fix Python 3.5 compatibility for pathlib #10

Closed leoluyi closed 4 years ago

leoluyi commented 4 years ago

Fix Path object in shutil

petobens commented 4 years ago

Won't this break on windows?

from pathlib import Path, PureWindowsPath

l = Path('/home/pedro/')
w = PureWindowsPath('c:\\windows')
print(str(l)) # /home/pedro
print(str(w)) # c:\window
print(l.as_posix()) # /home/pedro
print(w.as_posix()) # c:/windows
petobens commented 4 years ago

@tamago324 can you try this out?

tamago324 commented 4 years ago

@tamago324 can you try this out?

@petobens Yes. I'll give it a try!

tamago324 commented 4 years ago

@petobens I was able to confirm that it worked fine on Windows.

petobens commented 4 years ago

@tamago324 thanks! Merging

tamago324 commented 4 years ago

@petobens Thank you so much!