I found a nice Python class on a website devoted to nice Python gists - and on its web page (but not in the source code) it has the author's name and says it is PSF licensed - which wikipedia says is BSD-style and even allows for proprietization.

I fixed a bug and added a feature. But it is >90% the same code.

What I want to do is include it in a repo where all the code is covered by Apache 2.0 license, and where all the code has it's own license/copyright header - which claims copyright for the company owning the repo and names Apache 2.0 as the license

I certainly put a header at the top of it naming the contributor, naming the PSF license, and including the URL where I found it.

Can I/Do I also put our company license/copyright header (described above) on it?

  • 1. For this topic, probably opensource.org/license/python-2-0 is a better reference source than Wikipedia. 2. Could you link to the the actual PSF license text that applies to your case?
    – Brandin
    Feb 26 at 7:15
  • @Brandin - TY, done
    – davidbak
    Feb 26 at 16:06

1 Answer 1


Including the file in an otherwise Apache-licensed project is fine. For clarity sake, if there is a central location that states that all source code is under the Apache 2.0 license, I would recommend that you add something like "unless noted otherwise" there.

What you cannot do is just blindly slap a copyright notice and Apache license header on a third-party file. But you can license your changes to the file under the Apache license and add the license/copyright header for that reason.

  • To license the changes to the file is it sufficient to say something about "changes relative to the source at the such-and-such URL" or do I have to mark/notate the lines somehow?
    – davidbak
    Feb 26 at 16:07
  • 1
    @davidbak, it is even sufficient to state something like "adapted from" where you have the link to the original project. Feb 27 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.