[mark] Mark https://discuss.python.org/u/mark
September 24Thanks for the answers. Ill have to keep an eye out for these other license then.
As long as you retain the copyright notices, you can use the CPython source code subject to the PSF license.
Do I also have to retain copyright notices from contributors that clearly signed
the agreement?
Yes, because the licenses with which the contributor licensed the code
to the PSF (AFL or Apache) have this as a precondition, just like the
PSF license does.
Under the PSF, what are generally the exact copyright notices I need to retain?
Is it whats in the license, Copyright © 2001-2020 Python Software Foundation;
All Rights Reserved, all of whats here
https://docs.python.org/3/copyright.html?highlight=copyright, or something else?
In general: all that’s applicable.
The page lists the Python license
stack, which applies to all CPython code written by the contributors,
and it includes separate licenses for code which was incorporated into
the CPython code from other sources (those are not covered by the contrib
agreements and thus cannot be relicensed). Not all of the latter will
apply in your case.
Note that the section on incorporated code is not necessarily
complete. As is custom, we always leave the copyright notices
of incorporated code with the code, so it is possible to determine
the source and the license on that code. The unittest files you
want to use are an example of 3rd party licenses missing from the
section.
I think by now, you probably understand the mess CPython is when it
comes to licenses It’s a fairly old project and has a very long
history of contributors, with the contributor agreements only
starting to have a simplifying effect early in the 2000s.
In your case, you should copy the Python LICENSE file
(cpython/LICENSE at main · python/cpython · GitHub) to e.g. LICENSE.Python,
leave the unittext copyright notice in the code and add an explanation
of where the code you extracted originates to your README or LICENSE file.
Cheers,