Repository navigation
v0.1.1
Added
deadlinefor a whole HTTP request.HTTPClient(deadline=...)and the
deadline=keyword ofrequest()andredirect()take the seconds a request may
take, redirects and the reading of the body included (None, the default, is no
limit). Each wait's timeout is held to the time that remains andTimeoutErroris
raised once it has passed;timeoutstill bounds each wait. A read already blocked
can overrun the deadline by at most its timeout. A value that is not a number is
TypeError, one that is not positiveValueError. It works over every transport.
Fixed
copy(overwrite=True)no longer destroys the old target when the copy fails.
An existing file was removed before the new content was written, so a source that
failed half way left no file, or a partial one. The old file is kept until the
new content is complete: it is written to a hidden.NAME.<hex>.pathapi-tmp
sibling and renamed over it, and a class whose write stream commits on close is
written to directly. A class that cannot rename writes the sibling and then writes
it over the target. If you list the directory while a copy runs, you may see that
sibling.pathlib.Path(src).copy(target)(3.14) onto aPathof this library refuses
unsafe child names._copy_from()joined every listed name onto the target; a
name that is not one component (.., a separator, on a Windows target a drive or
a trailing dot) now raisesValueErrorbefore anything is written for it, as
copy(recursive=True)does. A source that lists such names needs a copy that
skips them.- The shipped transport suite names the file of its tests wherever it is run
from.python -m pathapi.http.testing(andrun()) roots pytest at the suite's
own directory unless--rootdiris given, so node ids keep their file when the
checkout and the installed package are on different drives.
Full Changelog: v0.1.0...v0.1.1