[Python-Dev] (Licensing question) backport of shutil.copyfile() functionality

Inada Naoki songofacandy at gmail.com
Mon Mar 11 22:54:31 EDT 2019

On Tue, Mar 12, 2019 at 8:38 AM Giampaolo Rodola' <g.rodola at gmail.com> 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

As you can see, PSF license doesn't force you to use PSF license. (not
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:
#   * ...

Inada Naoki  <songofacandy at gmail.com>

More information about the Python-Dev mailing list