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 LimaAlphaHotel
Recipients LimaAlphaHotel
Date 2020-06-18.16:45:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org>
In-reply-to
Content
The mailbox library, in particular the Mailbox class I'm using, does not support the new Path object requiring a clumsy `mbx = Maildir(str(some_path_obj))` to use with a Path instance.

It currently blows up if passed a Path directly (does not support startswith) - perhaps a simple solution is to coerce whatever is passed into a string inside `__init__`?

Could this support be added?

I feel that strings representing paths should be discouraged as a general principal now we have a truly portable object to represent paths, and supporting Path in all places it makes logical sense (without breaking backwards compatibility, if implemented as I suggest with coercion by `str(...)` inside the module) in the core library seems like a good thing to me.
History
Date User Action Args
2020-06-18 16:45:48LimaAlphaHotelsetrecipients: + LimaAlphaHotel
2020-06-18 16:45:48LimaAlphaHotelsetmessageid: <1592498748.35.0.391421735484.issue41026@roundup.psfhosted.org>
2020-06-18 16:45:48LimaAlphaHotellinkissue41026 messages
2020-06-18 16:45:48LimaAlphaHotelcreate