[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2022-03-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: The os module provides a pretty low level simple shim over platform APIs. It is better for logic like this to live in a higher level application library rather than make big assumptions on the part of the user. ``` try: os.fdatasync(fd) except

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2022-03-19 Thread Cebtenzzre
Change by Cebtenzzre : -- nosy: +cebtenzzre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-10-20 Thread Ned Deily
Change by Ned Deily : -- nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-08-23 Thread George Melikov
George Melikov added the comment: PR rebased and ready to review. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
George Melikov added the comment: I want to add that it's a usual practice: - https://github.com/libuv/libuv/pull/1580/files/bdd987a9b4347164e31e22d2d5ce06fbb5ebc859 - https://rev.ng/gitlab/revng/qemu/commit/6f1953c4c14566d3303709869fd26201828b3ccf --

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
George Melikov added the comment: If there is a way not to sync data - you should use neither fdatasync nor fsync. So IMHO if someone wants to sync data and want to use fdatasync - I see the only way on MacOS is to use fsync(). > Note also that this change will not help to run code with

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: fsync() may be slower than fdatasync(). There may be cases in which you prefer to not call fsync() or call it less often if POSIX fdatasync() is not available. To do this you should know whether Python fdatasync() calls POSIX fdatasync() or fsync(). The

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
Change by George Melikov : -- keywords: +patch pull_requests: +17893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18516 ___ Python tracker ___

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
New submission from George Melikov : POSIX fdatasync() is similar to fsync() but it tries not to sync non-needed metadata. If POSIX OS doesn't have it - it's safe to use fsync() (If we need to sync data to disk - we have to use one of these functions). This change will help to run code with