Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
On Tue, Mar 12, 2019 at 6:29 AM Terry Reedy wrote: > On 3/11/2019 10:54 PM, Inada Naoki wrote: > > >> Hello, > >> some time ago I contributed a couple of patches to speedup > shutil.copy*() functions: > >> https://bugs.python.org/issue33671 > >> https://bugs.python.org/issue33695 > > You retain copyright on the code you contributed. > https://mail.python.org/mailman/listinfo/python-dev > I didn't write shutil.copytree()'s code though, and I'd need to copy it. -- Giampaolo - http://grodola.blogspot.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
On Tue, Mar 12, 2019 at 05:32:35PM -0700, Gregory P. Smith wrote: > If you might want some of this contributed back to Python later on, you > should not use the GPL. Giampaolo can always change the licence of his work later. You can't take away the GPL from work you've already released, but you can relicense the same work under any other terms. The problem may be if others have contributed to Giampaolo's library under the GPL, and they refuse to re-licence their contributions. I am not a lawyer, but it may be that he can work around that by requiring that contributors assign their copyright in the contribution to him. But that may discourage contributors. But since Giampaolo seems to be thinking of using the MIT licence, the point may be moot :-) -- Steven ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
On Tue, Mar 12, 2019 at 2:55 PM Giampaolo Rodola' wrote: > > > On Tue, Mar 12, 2019 at 3:01 AM Glenn Linderman > wrote: > >> On 3/11/2019 4:35 PM, Giampaolo Rodola' wrote: >> >> Hello, >> some time ago I contributed a couple of patches to speedup shutil.copy*() >> functions: >> https://bugs.python.org/issue33671 >> https://bugs.python.org/issue33695 >> I would like to backport both functionalities so that they can be used on >> Python 2.7 and <3.8 and put it on PYPI. In order to do so I will basically >> have to copy some parts of shutil module (copytree() function + the >> unit-tests I added in BPO-33671 and a couple of other things). Are there >> constraints regarding this in terms of license? Am I supposed to use GPL? >> (I was thinking about using MIT) >> >> Note: in this package called "zerocopy" I will probably want to expose >> other functionalities such as tee(), splice() and CopyFileEx and >> TransmitFile on Windows, so it's probably gonna be half a backport and half >> a brand new project. >> >> Thanks. >> >> >> Thanks for the contributions. I don't know about the licensing. >> >> I wonder if you should make two packages, though... one just exactly a >> backport of the shutil speedups, and the second containing the new >> functionalities. >> > > That was my initial thought as well (a "backports.shutil_copy" module > targeting copy* functions only), but (especially after playing with this > today) I think I have something a bit more ambitious in mind. I'm currently > experimenting with different things which could be baked in a third-party > lib and possibly contributed back to Python later on: > If you might want some of this contributed back to Python later on, you should not use the GPL. 1) on OSX we could use f/copyfile() syscall to copy file attrs/metadata; > that may be useful to speedup shutil.copystat() and shutil.copymode() > 2) copytree() on OSX could take advantage of f/copyfile() + > COPYFILE_RECURSIVE (which is probably too platform-specific for inclusion) > 3) on Linux we could use copy_file_range() as a replacement for > os.sendfile() in shutil.copyfile() (it's supposed to be faster) > 4) on Linux ioctl() + FICLONE could be used to implement CoW (copy on > write) instantaneous copies, and could be added as shutil.cow_copyfile() > (haven't look into Windows yet) > 5) I was thinking about backporting socket.socket.sendfile() as well, > which uses os.sendfile() on POSIX but not TransmitFile on Windows (asyncio > does though) > 6) another idea (but I'm not sure if it's possible, as I still have to > dig into that) is a new socket recvfile() function boosted up by tee() / > splice() on Linux, which maybe could be contributed back as > socket.socket.recvfile() > > -- > Giampaolo - http://grodola.blogspot.com > > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/greg%40krypto.org > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
On Tue, Mar 12, 2019 at 3:01 AM Glenn Linderman wrote: > On 3/11/2019 4:35 PM, Giampaolo Rodola' wrote: > > Hello, > some time ago I contributed a couple of patches to speedup shutil.copy*() > functions: > https://bugs.python.org/issue33671 > https://bugs.python.org/issue33695 > I would like to backport both functionalities so that they can be used on > Python 2.7 and <3.8 and put it on PYPI. In order to do so I will basically > have to copy some parts of shutil module (copytree() function + the > unit-tests I added in BPO-33671 and a couple of other things). Are there > constraints regarding this in terms of license? Am I supposed to use GPL? > (I was thinking about using MIT) > > Note: in this package called "zerocopy" I will probably want to expose > other functionalities such as tee(), splice() and CopyFileEx and > TransmitFile on Windows, so it's probably gonna be half a backport and half > a brand new project. > > Thanks. > > > Thanks for the contributions. I don't know about the licensing. > > I wonder if you should make two packages, though... one just exactly a > backport of the shutil speedups, and the second containing the new > functionalities. > That was my initial thought as well (a "backports.shutil_copy" module targeting copy* functions only), but (especially after playing with this today) I think I have something a bit more ambitious in mind. I'm currently experimenting with different things which could be baked in a third-party lib and possibly contributed back to Python later on: 1) on OSX we could use f/copyfile() syscall to copy file attrs/metadata; that may be useful to speedup shutil.copystat() and shutil.copymode() 2) copytree() on OSX could take advantage of f/copyfile() + COPYFILE_RECURSIVE (which is probably too platform-specific for inclusion) 3) on Linux we could use copy_file_range() as a replacement for os.sendfile() in shutil.copyfile() (it's supposed to be faster) 4) on Linux ioctl() + FICLONE could be used to implement CoW (copy on write) instantaneous copies, and could be added as shutil.cow_copyfile() (haven't look into Windows yet) 5) I was thinking about backporting socket.socket.sendfile() as well, which uses os.sendfile() on POSIX but not TransmitFile on Windows (asyncio does though) 6) another idea (but I'm not sure if it's possible, as I still have to dig into that) is a new socket recvfile() function boosted up by tee() / splice() on Linux, which maybe could be contributed back as socket.socket.recvfile() -- Giampaolo - http://grodola.blogspot.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
On 3/11/2019 10:54 PM, Inada Naoki wrote: Hello, some time ago I contributed a couple of patches to speedup shutil.copy*() functions: https://bugs.python.org/issue33671 https://bugs.python.org/issue33695 You retain copyright on the code you contributed. I would like to backport both functionalities so that they can be used on Python 2.7 and <3.8 and put it on PYPI. In order to do so I will basically have to copy some parts of shutil module (copytree() function + the unit-tests I added in BPO-33671 and a couple of other things). Are there constraints regarding this in terms of license? Am I supposed to use GPL? (I was thinking about using MIT) First of all, I'm sorry if I'm wrong. I'm not lawyer. You can use both of GPL and MIT. Users can use your package under it. On the other hand, when you publish your package, *you* should follow PSF license. Read this. https://docs.python.org/3/license.html """ 3. In the event Licensee prepares a derivative work that is based on or incorporates Python 3.7.2 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 3.7.2. """ As you can see, PSF license doesn't force you to use PSF license. (not "copyleft") In fact, the PSF lawyer says one should not use the 'PSF license' as it is specilized for the PSF and Python. All you need is "brief summary of the changes made to Python". I think it can be: # Copyright 2001- Python Software Foundation. # Copyright 2019- Your Name # # Following code is from Python standard library (Lib/shutil.py) # # Changelog: # * ... -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
On Tue, Mar 12, 2019 at 8:38 AM Giampaolo Rodola' wrote: > > Hello, > some time ago I contributed a couple of patches to speedup shutil.copy*() > functions: > https://bugs.python.org/issue33671 > https://bugs.python.org/issue33695 > I would like to backport both functionalities so that they can be used on > Python 2.7 and <3.8 and put it on PYPI. In order to do so I will basically > have to copy some parts of shutil module (copytree() function + the > unit-tests I added in BPO-33671 and a couple of other things). Are there > constraints regarding this in terms of license? Am I supposed to use GPL? (I > was thinking about using MIT) > First of all, I'm sorry if I'm wrong. I'm not lawyer. You can use both of GPL and MIT. Users can use your package under it. On the other hand, when you publish your package, *you* should follow PSF license. Read this. https://docs.python.org/3/license.html """ 3. In the event Licensee prepares a derivative work that is based on or incorporates Python 3.7.2 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 3.7.2. """ As you can see, PSF license doesn't force you to use PSF license. (not "copyleft") All you need is "brief summary of the changes made to Python". I think it can be: # Copyright 2001- Python Software Foundation. # Copyright 2019- Your Name # # Following code is from Python standard library (Lib/shutil.py) # # Changelog: # * ... Regards, -- Inada Naoki ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
Things in the standard library are already covered by the PSF license so that is what should be kept on backports from the stdlib to earlier versions. I do recommend keeping your backported stuff and new functionality separate (separate packages ideally, but that'll depend on how intertwined things are) as Glenn also suggested so that your additional functionality can work on modern Python interpreters without requiring your backported package. Keep things labelled backports strictly API compatible with a fixed version of the stdlib. It lets people using them migrate _to_ the stdlib easier in the future. my 2 cents as the subprocess32 maintainer, -gps On Mon, Mar 11, 2019 at 4:35 PM Giampaolo Rodola' wrote: > Hello, > some time ago I contributed a couple of patches to speedup shutil.copy*() > functions: > https://bugs.python.org/issue33671 > https://bugs.python.org/issue33695 > I would like to backport both functionalities so that they can be used on > Python 2.7 and <3.8 and put it on PYPI. In order to do so I will basically > have to copy some parts of shutil module (copytree() function + the > unit-tests I added in BPO-33671 and a couple of other things). Are there > constraints regarding this in terms of license? Am I supposed to use GPL? > (I was thinking about using MIT) > > Note: in this package called "zerocopy" I will probably want to expose > other functionalities such as tee(), splice() and CopyFileEx and > TransmitFile on Windows, so it's probably gonna be half a backport and half > a brand new project. > > Thanks. > > -- > Giampaolo - http://grodola.blogspot.com > > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/greg%40krypto.org > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
On 3/11/2019 4:35 PM, Giampaolo Rodola' wrote: Hello, some time ago I contributed a couple of patches to speedup shutil.copy*() functions: https://bugs.python.org/issue33671 https://bugs.python.org/issue33695 I would like to backport both functionalities so that they can be used on Python 2.7 and <3.8 and put it on PYPI. In order to do so I will basically have to copy some parts of shutil module (copytree() function + the unit-tests I added in BPO-33671 and a couple of other things). Are there constraints regarding this in terms of license? Am I supposed to use GPL? (I was thinking about using MIT) Note: in this package called "zerocopy" I will probably want to expose other functionalities such as tee(), splice() and CopyFileEx and TransmitFile on Windows, so it's probably gonna be half a backport and half a brand new project. Thanks. Thanks for the contributions. I don't know about the licensing. I wonder if you should make two packages, though... one just exactly a backport of the shutil speedups, and the second containing the new functionalities. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] (Licensing question) backport of shutil.copyfile() functionality
Hello, some time ago I contributed a couple of patches to speedup shutil.copy*() functions: https://bugs.python.org/issue33671 https://bugs.python.org/issue33695 I would like to backport both functionalities so that they can be used on Python 2.7 and <3.8 and put it on PYPI. In order to do so I will basically have to copy some parts of shutil module (copytree() function + the unit-tests I added in BPO-33671 and a couple of other things). Are there constraints regarding this in terms of license? Am I supposed to use GPL? (I was thinking about using MIT) Note: in this package called "zerocopy" I will probably want to expose other functionalities such as tee(), splice() and CopyFileEx and TransmitFile on Windows, so it's probably gonna be half a backport and half a brand new project. Thanks. -- Giampaolo - http://grodola.blogspot.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com