1

I'm writing an open source Python module.

Within my code is a function which I have adapted from a function which I found in an other open source package.

If that other package was a direct dependency of my project, then great, I would just list it as a requirement.

However, I don't want to include that other project as a dependency, because:

  1. it does some other things which aren't relevant to my project, and
  2. even if I did include it as a dependency, only to use this one function, the function as it's written still wouldn't work as I need it to.

So, how should I give credit to this other package? Is it OK to just list it in an "acknowledgements" section in the README?

7
  • 2
    What license is the module you're copying the function from under? – Philip Kendall Jul 13 '20 at 17:30
  • I just checked and they don't even list a license in their repo – ignoring_gravity Jul 13 '20 at 17:31
  • 1
    How big is the function? Is it possible to reverse engineer the functionality, and write one that does what you need? Otherwise, you should contact the author and have them provide you with an explicit license. – Juan Jul 13 '20 at 18:38
  • It's pretty small - I ended up implementing my own version. This has served as a reminder to always include a license in anything I publish :) – ignoring_gravity Jul 14 '20 at 16:03
  • Any idea why this was downvoted? – ignoring_gravity Jul 14 '20 at 16:05
6

From one of your comments:

I just checked and they don't even list a license in their repo

In that case, you have no right to use the code from that module. Try and forget everything you've seen of their code and implement the function on your own.

2
  • Great, thanks. What if it was a project using, e.g., the MIT license? – ignoring_gravity Jul 13 '20 at 17:36
  • 4
    If it is MIT licensed, you would have to follow the conditions in the MIT license. If it were SomeOtherLicense licensed, you would have to follow the conditions in SomeOtherLicense. – Philip Kendall Jul 13 '20 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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