[issue2628] ftplib Persistent data connection

2021-10-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Hello. I added some initial comments to the PR, but I'm sort of skeptical about this. It must be noted that: 1) very few FTP servers probably support this feature (https://en.wikipedia.org/wiki/File_Transfer_Protocol#Data_transfer_modes) 2) the specs

[issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)

2021-10-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > So using copy_file_range (if available) should be the most generic solution, > which includes copy-on-write support, and server-side copy support. Doesn't this imply to pass some flag to copy_file_range()? "man copy_file_range" sa

[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2021-05-10 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- pull_requests: +24674 pull_request: https://github.com/python/cpython/pull/26024 ___ Python tracker <https://bugs.python.org/issue43

[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2021-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > The question seems to be is if it should be okay to _GiveUpOnFastCopy after a > partial (incomplete) copy has already occurred via sendfile. I think it should not. For posterity: my rationale for introducing _USE_CP_SENDFILE was to allow

[issue42014] shutil.rmtree calls onerror with different function than failed

2020-11-10 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: -giampaolo.rodola ___ Python tracker <https://bugs.python.org/issue42014> ___ ___ Python-bugs-list mailing list Unsub

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2020-07-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sorry, after re-reading Eryk's comment, it seems I'm not correct about CopyFileEx. -- ___ Python tracker <https://bugs.python.org/issue30

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2020-07-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Since the need to copy file ownership is common, I think there could be space for a new copy3() function which copies ownership + extended attributes (where possible). In detail: - on Windows this can be achieved by using CopyFileEx, which would also

[issue41271] Add support for io_uring to cpython

2020-07-17 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker <https://bugs.python.org/issue41271> ___ ___ Python-bugs-list mailing list Unsub

[issue39673] Map errno==ETIME to TimeoutError

2020-05-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sigh! I misread the OP's post and thought the proposal was to add TimeoutError which I forgot existed. Sorry for the noise and please disregard my previous comment. -- ___ Python tracker <ht

[issue39673] Map errno==ETIME to TimeoutError

2020-05-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm -1 about TimeoutError because the concept of "timeout" is generic enough to be often implemented as a custom exception, which poses questions re. backward/forward compatibilty. E.g. in psutil I have "TimeoutExpired", also

[issue37873] unittest: execute tests in parallel

2020-04-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker <https://bugs.python.org/issue37873> ___ ___ Python-bugs-list mailing list Unsub

[issue39380] ftplib uses latin-1 as default encoding

2020-03-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: +1 from me as well. @SebastianGPedersen could you update the PR (constructor + doc changes)? -- ___ Python tracker <https://bugs.python.org/issue39

[issue4080] unittest: display time used by each test case

2020-02-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I updated the PR for Python 3.9. I think it's ready to be merged. Can someone involved in unittest take a look at it? -- ___ Python tracker <https://bugs.python.org/issue4

[issue4080] unittest: display time used by each test case

2020-02-15 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue4080> ___ ___ Python-bugs-list mailin

[issue39488] test_largefile: TestSocketSendfile.test_it() uses too much disk space

2020-01-29 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- keywords: +patch pull_requests: +17637 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18261 ___ Python tracker <https://bugs.python.org/issu

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-27 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- assignee: docs@python -> giampaolo.rodola resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset cf9d00554715febf21cf94950da4f42723b80498 by Giampaolo Rodola (mbarkhau) in branch '3.8': [3.8] bpo-39390 shutil: fix argument types for ignore callback (GH-18122) https://github.com/python/cpython/commit

[issue39380] ftplib uses latin-1 as default encoding

2020-01-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It's been a long time since I implemented UTF-8 support in pyftpdlib, but long story short is that: - most recent servers are supposed to use UTF-8 by default - such servers must include "UTF-8" in the FEAT command response - some servers may en

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I don't think we need to change anything on < 3.8, but 3.8 and 3.9 will always convert *src* to str via os.fspath(), which IMO is more consistent (e.g. os.path.* functions and others do the s

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: For completeness, a similar problem is present also on python < 3.8 if passing a pathlib.Path type as *src*: the callback function will receive a pathlib.Path type once, and then string types. -- ___ Pyt

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 88704334e5262c6cd395a0809d4ef810f33f3ca5 by Giampaolo Rodola (mbarkhau) in branch 'master': bpo-39390 shutil: fix argument types for ignore callback (GH-18122) https://github.com/python/cpython/commit/88704334e5262c6cd395a0809d4ef810f33f3ca5

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue39390> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Yes, thanks. Whoever got bit by this is either getting an exception or not the intended behavior (due to failed string comparison). I doubt anybody is relying on the new type checking since it's not documented. If they are, they are probably just doing

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Should not copytree convert arguments of the ignore callback to str and list > correspondingly? It should. I think it makes sense to just do this for Python 3.8.2 instead of updating the doc. -- ___

[issue39099] scandir.dirfd() method

2019-12-19 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Good point, I didn't consider that. I suppose you're right. =) Closing. -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue39099] scandir.dirfd() method

2019-12-19 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- keywords: +patch pull_requests: +17131 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17664 ___ Python tracker <https://bugs.python.org/issu

[issue39099] scandir.dirfd() method

2019-12-19 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : PR in attachment adds a new dirfd() method to the scandir() object (POSIX only). This can be be passed to os.* functions supporting the "dir_fd" parameter, and avoid opening a new fd as in: >>> dirfd = os.open("basename&quo

[issue39004] test_largefile: TestSocketSendfile.test_it() failed on AMD64 Fedora Stable Refleaks 3.x

2019-12-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 82374979ec7e01e23385dca1d02b2aa3de16fea5 by Giampaolo Rodola in branch 'master': bpo-39004: increment large sendfile() test timeout (GH-17552) https://github.com/python/cpython/commit/82374979ec7e01e23385dca1d02b2aa3de16fea5

[issue39004] test_largefile: TestSocketSendfile.test_it() failed on AMD64 Fedora Stable Refleaks 3.x

2019-12-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I suspect it's a timing problem (client disconnects, threaded server fails to detect that in time). Let's see what happens by incrementing the timeout when waiting for the thread to be join()ed (PR-17552

[issue39004] test_largefile: TestSocketSendfile.test_it() failed on AMD64 Fedora Stable Refleaks 3.x

2019-12-10 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- keywords: +patch pull_requests: +17026 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17552 ___ Python tracker <https://bugs.python.org/issu

[issue38906] copy2 doesn't copy metadata on Windows and MacOS

2019-11-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: If we use CopyFileExW in copy2(), then also copystat() and copymode() should be able to copy the same metadata/security-bits/etc as CopyFileExW. I don't know which Windows APIs should be used though. I sort of agree with Steven that CopyFileExW could

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-26 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 65c92c5870944b972a879031abd4c20c4f0d7981 by Giampaolo Rodola (Bruno P. Kinoshita) in branch '3.8': [3.8] bpo-38688, shutil.copytree: consume iterator and create list of entries to prevent infinite recursion (GH-17397) https://github.com

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-26 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- stage: patch review -> commit review versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue38688> ___ ___ Py

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 9bbcbc9f6dfe1368fe7330b117707f828e6a2c18 by Giampaolo Rodola (Bruno P. Kinoshita) in branch 'master': bpo-38688, shutil.copytree: consume iterator and create list of entries to prevent infinite recursion (GH-17098) https://github.com/python

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: PR-17098 as it stands re-introduces some stat() syscall. I suggest to just consume the iterator: it's a small change and it should fix the issue. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The speedup introduced in issue33695 is mostly because the number of os.stat() syscall was reduced from 6 to 1 per file (both by using scandir() and because stat() results are cached and passed around between function calls). As such, even if we

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: PR-17098 basically reverts https://bugs.python.org/issue33695. Not good. =) I think we can simply consume the iterator immediately as in: def copytree(src, ...): with os.scandir(src) as itr: entries = list(itr) return

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: To further elaborate on the creation time solution, the idea in pseudo-code is the following: class Popen: def __init__(self, ...): self._execute_child(...) try: self._ctime = get_create_time(self.pid) except

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-03 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Did someone propose a pull request to fix this issue by ignoring > ProcessLookupError? I misread your PR, sorry. I thought that was the effect. -- ___ Python tracker <https://bugs.python.org/i

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-11-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: -1 about the PR solution to suppress ProcessLookupError in case the process is gone. In psutil I solved the “pid reused problem” by using process creation time to identify a process uniquely (on start). A decorator can be used to protect the sensibile

[issue38480] resource.setrlimit() should raise PermissionError

2019-10-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It turns out there is a similar precedent which was solved in the same way: issue18787. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38480] resource.setrlimit() should raise PermissionError

2019-10-15 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- keywords: +patch pull_requests: +16360 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16804 ___ Python tracker <https://bugs.python.org/issu

[issue38480] resource.setrlimit() should raise PermissionError

2019-10-15 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : >>> import resource >>> high = 300 * 1024 * 1024 >>> resource.setrlimit(resource.RLIMIT_MEMLOCK, (high, high)) Traceback (most recent call last): File "", line 1, in ValueErro

[issue38378] os.sendfile() has improperly named parameter

2019-10-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I’m for renaming both. Since the function is about transmitting or copying (on Linux) files src_fd and dst_fd could also be good candidates. -- nosy: +giampaolo.rodola ___ Python tracker <ht

[issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x

2019-10-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Thanks. -- resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker <https://bugs.python.or

[issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x

2019-10-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Another approach is to change the timeout of 15 min for this super slow > buildbot. For example, set it to 20 min or 30 min. I think this makes more sense (set timeout to 25 min). -- ___ Python t

[issue37096] Add large-file tests for modules using sendfile(2)

2019-10-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sorry about that. I'm attaching a patch which skips those tests if there's not enough free disk space. If you confirm it works I'll make a PR. -- Added file: https://bugs.python.org/file48636/disk-space.patch

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Looks like it worked: https://buildbot.python.org/all/#/builders/176/builds/1383 -- ___ Python tracker <https://bugs.python.org/issue38

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue38319> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 94e165096fd65e8237e60de570fb609604ab94c9 by Giampaolo Rodola in branch 'master': bpo-38319: Fix shutil._fastcopy_sendfile(): set sendfile() max block size (GH-16491) https://github.com/python/cpython/commit

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- keywords: +patch pull_requests: +16077 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16491 ___ Python tracker <https://bugs.python.org/issu

[issue37096] Add large-file tests for modules using sendfile(2)

2019-09-29 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- components: +Tests -Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://

[issue37096] Add large-file tests for modules using sendfile(2)

2019-09-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 5bcc6d89bcb622a6786fff632fabdcaf67dbb4e2 by Giampaolo Rodola in branch 'master': bpo-37096: Add large-file tests for modules using sendfile(2) (GH-13676) https://github.com/python/cpython/commit/5bcc6d89bcb622a6786fff632fabdcaf67dbb4e2

[issue38244] example in ftplib.rst uses ftp.debian.org but it's not reachable

2019-09-26 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/i

[issue38244] example in ftplib.rst uses ftp.debian.org but it's not reachable

2019-09-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset a7414571a113815033fdc9f7abb3f5a24e44c472 by Giampaolo Rodola (Prateek Nayak) in branch 'master': bpo-38244: [Documentation] Fix unreliable link to sever in ftplib.rst (#16319) https://github.com/python/cpython/commit

[issue37791] Propose to deprecate `ignore_errors` and `onerror` parameters of `shutil.rmtree()`

2019-08-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: There’s too much code out there relying on both args (especially ignore_errors in unit tests) that would break for no real benefit. -- ___ Python tracker <https://bugs.python.org/issue37

[issue33408] Enable AF_UNIX support in Windows

2019-07-10 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker <https://bugs.python.org/issue33408> ___ ___ Python-bugs-list mailing list Unsub

[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm gonna reject this one, sorry Jeffrey. Reasons given in https://bugs.python.org/issue36422#msg346878 also apply here. -- resolution: -> rejected stage: patch review -> resolved status: open -&g

[issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point

2019-06-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > in case a filesystem has been mounted on the temporary directory, this can > lead to the entire filesystem being removed -1 That is expected behavior and the use case looks pretty unusual. Such a new parameter wouldn't even be supported by

[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I am not sure I understand the use case. Other than "unmounting a mount point" the other scenarios look unrealistic to me and also require a fd instead of a path. Also, if you want to unmount a path you can do so via *onerror* instead (unmoun

[issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)

2019-06-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Adding a new patch (still a PoC, will create a PR when I have something more solid). -- Added file: https://bugs.python.org/file48393/cow2.diff ___ Python tracker <https://bugs.python.org/issue37

[issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)

2019-06-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > I'm not sure that attempt to call unlink() if FICLONE fails is a good idea Agreed. > I dislike the *fallback* parameter of reflink(). Me too. A specific exception is better. > Why not exposing clonefile() as os.clonefile() but os._clonefil

[issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy)

2019-06-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Nope, it doesn't (see man page). We can simply use FICLONE (cp does the same). -- ___ Python tracker <https://bugs.python.org/issue37

[issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy)

2019-06-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: issue37157 is for reflink / CoW copy, this one is not. -- ___ Python tracker <https://bugs.python.org/issue37159> ___ ___

[issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy)

2019-06-04 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- title: Have shutil.copyfile() use copy_file_range() -> Use copy_file_range() in shutil.copyfile() (server-side copy) ___ Python tracker <https://bugs.python.org/issu

[issue37159] Have shutil.copyfile() use copy_file_range()

2019-06-04 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +StyXman, desbma, facundobatista, martin.panter, ncoghlan, neologix, pablogsal, petr.viktorin, vstinner ___ Python tracker <https://bugs.python.org/issue37

[issue26826] Expose new copy_file_range() syscall in os module.

2019-06-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Please open a new issue to discuss how it can used in shutil ;-) Use copy_file_range() in shutil.copyfile(): https://bugs.python.org/issue37159 -- ___ Python tracker <https://bugs.python.org/issu

[issue37159] Have shutil.copyfile() use copy_file_range()

2019-06-04 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : This is a follow up of issue33639 (zero-copy via sendfile()) and issue26828 (os.copy_file_range()). On [Linux 4.5 / glib 2.27] shutil.copyfile() will use os.copy_file_range() instead of os.sendfile(). According to my benchmarks performances

[issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)

2019-06-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm attaching an initial PoC using FICLONE on Linux and clonefile(3) on OSX. It is also possible to support Windows but it requires a ReFS partition to test against which I currently don't have. I opted for exposing reflink() as a separate function

[issue26826] Expose new copy_file_range() syscall in os module.

2019-06-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Actually "man copy_file_range" claims it can do server-side copy, meaning no network traffic between client and server if *src* and *dst* live on the same network fs. So I agree copy_file_range() should be preferred over sendfile() after all.

[issue26826] Expose new copy_file_range() syscall in os module.

2019-06-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I think data deduplication / CoW / reflink copy is better implemented via FICLONE. "cp --reflink" uses it, I presume because it's older than copy_file_range(). I have a working patch adding CoW copy support for Linux and OSX (but not Windows

[issue26826] Expose new copy_file_range() syscall in os module.

2019-06-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: shutil.copyfile() already uses sendfile() which basically provides the same performances. sendfile() should be preferred though because it’s supported since Linux 2.6.33. -- ___ Python tracker <ht

[issue34368] ftplib __init__ function can't handle 120 or 4xy reply when connect to the server

2019-05-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: >From RFC-959: If the server is unable to accept input right away, a 120 "expected delay" reply should be sent immediately and a 220 reply when ready. The user will then know not to hang up if there is a delay. Seems

[issue37096] Add large-file tests for modules using sendfile(2)

2019-05-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- keywords: +patch pull_requests: +13564 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13676 ___ Python tracker <https://bugs.python.org/issu

[issue37096] Add large-file tests for modules using sendfile(2)

2019-05-30 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : The need for this emerged in: https://bugs.python.org/issue36610#msg343948. We currently use sendfile(2) syscall in high-level shutil.copyfile() on Linux and socket.sendfile() on UNIX. In addition this PR also tests shutil.copyfile() implementation

[issue36610] os.sendfile can return EINVAL on Solaris

2019-05-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- assignee: -> giampaolo.rodola resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python

[issue36610] os.sendfile can return EINVAL on Solaris

2019-05-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 413d955f8ec88a7183f91d7ad8b0ff7def803de3 by Giampaolo Rodola in branch 'master': bpo-36610: shutil.copyfile(): use sendfile() on Linux only (GH-13675) https://github.com/python/cpython/commit/413d955f8ec88a7183f91d7ad8b0ff7def803de3

[issue24564] shutil.copytree fails when copying NFS to NFS

2019-05-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker <https://bugs.python.or

[issue24564] shutil.copytree fails when copying NFS to NFS

2019-05-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset f1487b323549e2360460383b4304f6592fb38e27 by Giampaolo Rodola (Miss Islington (bot)) in branch '3.7': bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369) https://github.com/python/cpython/commit

[issue36610] os.sendfile can return EINVAL on Solaris

2019-05-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I currently have no Solaris box to test this against and am currently short on time but I'm of the opinion that because of: > Sendfile on Solaris can raise EINVAL if offset is equal or bigger than the size > of the file (Python e

[issue36610] os.sendfile can return EINVAL on Solaris

2019-05-29 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- pull_requests: +13563 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13675 ___ Python tracker <https://bugs.python.org/issu

[issue24564] shutil.copytree fails when copying NFS to NFS

2019-05-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset a16387ab2d85f19665920bb6ff91a7e57f59dd2a by Giampaolo Rodola (Ying Wang) in branch 'master': bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369) https://github.com/python/cpython/commit

[issue36997] Document that spwd is considered harmful

2019-05-21 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker <https://bugs.python.org/issue36997> ___ ___ Python-bugs-list mailing list Unsub

[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2019-05-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 0a5b88e7f23b671d63896619b13148b0e4e2b5dd by Giampaolo Rodola (Miss Islington (bot)) in branch '3.7': bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212) (#13234) https://github.com/python/cpython

[issue22021] shutil.make_archive() root_dir do not work

2019-05-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: @cheryl.sabella don't have the bandwidth right now (traveling), sorry. -- ___ Python tracker <https://bugs.python.org/issue22

[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2019-05-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 79efbb719383386051c72f2ee932eeca8e033e6b by Giampaolo Rodola (Olexa Bilaniuk) in branch 'master': bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212) https://github.com/python/cpython/commit

[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2019-05-09 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- versions: +Python 3.7, Python 3.8 -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <https://bugs.python.org/issue24

[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2019-05-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch LGTM. I'd like to point out one thing for posterity. Current shutil code catches EPERM but not EACCES. While reviewing the patch I wondered whether simply catching (and ignoring) both error codes instead, but it turns out they are supposed to have

[issue36823] shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted')

2019-05-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: You should try to copy those offending files individually via shutil.copy2() instead copytree() in order to get the full exception. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes

2019-05-09 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- keywords: +patch pull_requests: +13133 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36850> ___ _

[issue36488] os.sendfile() on BSD, macOS don't return bytes sent on EINTR

2019-04-12 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- keywords: +patch pull_requests: +12734 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue36610] os.sendfile can return EINVAL on Solaris

2019-04-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Can you paste the traceback or are you able to reproduce the bug via a script? sendfile implementation is supposed to giveup if no data was sent on first call, so I suppose this happen later? If for any reason it turns out sendfile() is broken on Solaris

[issue35934] Add socket.create_server() utility function

2019-04-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: No problem. My bad that I mistyped the "BPO" thing. -- ___ Python tracker <https://bugs.python.org/issue35934> ___ ___

[issue35934] Add socket.create_server() utility function

2019-04-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Those are old failures (+/- 17 hours ago). I committed: https://github.com/python/cpython/pull/12735 ...which fixed them. -- ___ Python tracker <https://bugs.python.org/issue35

[issue17561] Add socket.bind_socket() convenience function

2019-04-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Fixed. There's a remaining failing BB: https://buildbot.python.org/all/#/builders/176/builds/185/steps/4/logs/stdio ...but the failure appears unrelated and it has been red for a while. -- resolution: -> fixed stage: patch review -> re

[issue36570] ftplib timeouts for misconfigured server

2019-04-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Please no. The mistake should be fixed in the misconfigured FTP server, not in ftplib, which should not make this event pass unnoticed or take arbitrary decisions. Filezilla is different than ftplib in that it's an end-user app. ftplib is not (e.g

[issue1756] -m broken in trunk

2019-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sorry, I accidentally referenced this BPO issue in my commit. -- ___ Python tracker <https://bugs.python.org/issue1

[issue17561] Add socket.bind_socket() convenience function

2019-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 8702b67dad62a9084f6c1823dce10653743667c8 by Giampaolo Rodola in branch 'master': BPO-17561: set create_server backlog default to None (GH-12735) https://github.com/python/cpython/commit/8702b67dad62a9084f6c1823dce10653743667c8

[issue1756] -m broken in trunk

2019-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 8702b67dad62a9084f6c1823dce10653743667c8 by Giampaolo Rodola in branch 'master': BPO-17561: set create_server backlog default to None (GH-12735) https://github.com/python/cpython/commit/8702b67dad62a9084f6c1823dce10653743667c8

  1   2   3   4   5   6   7   8   9   10   >