This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author joshuaavalon
Recipients joshuaavalon, paul.moore, steve.dower, tim.golden, zach.ware
Date 2018-07-08.10:57:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1531047443.22.0.56676864532.issue34069@psf.upfronthosting.co.za>
In-reply-to
Content
from shutil import move
from pathlib import Path

a = Path("s")
b = Path("a.txt")

move(b, a)


This will throw AttributeError: 'WindowsPath' object has no attribute 'rstrip'

From the document, it should able to move:

If the destination is an existing directory, then src is moved inside that directory. If the destination already exists but is not a directory, it may be overwritten depending on os.rename() semantics.

If a = Path("s/a.txt"), it does not throw error.

Enviroment:
  Window 10
  Python 3.7.0
History
Date User Action Args
2018-07-08 10:57:23joshuaavalonsetrecipients: + joshuaavalon, paul.moore, tim.golden, zach.ware, steve.dower
2018-07-08 10:57:23joshuaavalonsetmessageid: <1531047443.22.0.56676864532.issue34069@psf.upfronthosting.co.za>
2018-07-08 10:57:23joshuaavalonlinkissue34069 messages
2018-07-08 10:57:22joshuaavaloncreate