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 bignose
Recipients bignose, ethan.furman, georg.brandl, serhiy.storchaka
Date 2016-02-29.18:39:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456771141.01.0.174153415211.issue26362@psf.upfronthosting.co.za>
In-reply-to
Content
> I have read the thread on Python-list

Thank you, and thanks for linking to that discussion.

> and still don't understand the purpose of your idea.

The purpose is to get a public API for making temporary filesystem paths with the same properties as are produced by ‘tempfile’, specifically as produced by a ‘tempfile._get_candidate_names’ generator.

The paths will be used in unit tests and will never touch the filesystem.

Some have suggested using ‘uuid’ or other random-generator APIs. Using an API that isn't explicitly designed to produce valid filesystem paths is both risky (the algorithm may not exactly produce the right behaviour), and confusing (a reader seeing use of an unrelated API will not find it obvious why that API was used for generating a filesystem path).

The unit tests need paths with properties that are already implemented in ‘tempfile’, so it seems unreasonable to suggest that functionality should be re-implemented elsewhere since it is already in the standard library.

The request is for a “get the next path generated by a ‘tempfile._get_candidate_names’ generator”, with an approved and documented public API. One suggested name is ‘tempfile.makepath’.
History
Date User Action Args
2016-02-29 18:39:01bignosesetrecipients: + bignose, georg.brandl, ethan.furman, serhiy.storchaka
2016-02-29 18:39:01bignosesetmessageid: <1456771141.01.0.174153415211.issue26362@psf.upfronthosting.co.za>
2016-02-29 18:39:01bignoselinkissue26362 messages
2016-02-29 18:39:00bignosecreate