Visitar URL original
Needs a COPYRIGHT/LICENSE file · Issue #143 · faif/python-patterns · GitHub
Skip to content

Needs a COPYRIGHT/LICENSE file #143

Description

@yarikoptic

I haven't checked if any of the examples is simply completely copied from the web, when it would need to retain original copyright/license notice, or all of them could be claimed to be owned by contributors to this repository, but the point is that there should some clear statement on copyright/licenses for the files and possibly for the collection as a whole as well.

Activity

  1. faif commented on May 21, 2016

    @faif
    Owner

    Most files include a reference to the original source. If there's nothing it most likely means that I forgot to add the reference so it's good if we can still do that

  2. yarikoptic commented on Aug 15, 2016

    @yarikoptic
    ContributorAuthor

    Reference is not a copyright/license statement.
    Imho issue wasnt addressed - users would still have no clue after cloning this repo either they could reuse the code from it or not
    Just my 1c

  3. fkromer commented on Aug 15, 2016

    @fkromer

    I do agree with @yarikoptic . The license issue has to be considered if someone would like to use the code in software that is either a "commercial product" or used in the internal enterprise infrastructure.

  4. reopened this on Aug 15, 2016
  5. csaez commented on Aug 15, 2016

    @csaez

    Really? I mean, these are simple snippets showing design patterns for learning purposes, none of this code is usable as it is on a production environment... do we really need to license this?

  6. faif commented on Aug 15, 2016

    @faif
    Owner

    @csaez That's exactly my thought. In general it's not a good practice to copy/paste blindly and use such code in production. I don't think that cloning the repo is a problem. But let's see what @yarikoptic and @fkromer think :)

  7. fkromer commented on Aug 15, 2016

    @fkromer

    If one distributes code under a license (e.g. one of these common open source licenses) it is clearly stated if it may be used commercially and if so under what conditions. But if there is not any licensing I do not know what licensing is applied "implicitly". However one should at least check if the referenced sources of the code state some licensing information which would imply a license for the package I guess. If e.g. one of the referenced code would have been licensed under GNU AGPLv3 (condition: same license) this package should be licensed also under this license. But I am no expert related to licensing :)

  8. yarikoptic commented on Aug 16, 2016

    @yarikoptic
    ContributorAuthor

    There are multiple aspects here

    1. as @fkromer pointed out, you cannot copy/paste (i.e. use directly) code which comes without license terms
    2. many snippets probably were originally released under some license which mandates (all MIT, BSD, etc...) to maintain copyright/license statement associated with the code, so just copy/pasting it here without maintaining copyright/license statement might already be in violation with the terms under which it was released/shared
    3. 1 and 2 has nothing to do with "production" per se ;)
  9. chfw commented on Aug 16, 2016

    @chfw

    for your information, here is a non-lawer's view on open licenses on pycon 2016

  10. jalanb commented on Mar 5, 2017

    @jalanb

    What is needed for a full resolution of this issue is to scan the repo for all separate instances of copied text, try to determine where each originated, and check any original licensing. Only after that scan can an appropriate license be considered for the project. Such scans are straightforward given the right tools.

    If there is no obvious licensing for a snippet, then it's safer to assume that full copyright protection will be enforced at some future time by a high-functioning psychopath with more lawyers than you. I advise clients to avoid unkown snippets completely. The worst.

    Open Source licenses such at these may not discriminate against fields of endeavor such as commercial use. But they do restrict distribution of propietary copies to varying degrees. I don't think that's a problem here, as a primarily educational project I imagine that python-patterns would also like to restrict distribution of "less open" copies.

    I agree with @yarikoptic that full attribution is required for each snippet. Again, a scanning tool will make finding the correct attributions easier.

    @csaez makes an interesting point.

    none of this code is usable as it is on a production environment... do we really need to license this?

    If the disclaimer of warranty in most licenses were to be "flipped", so that it restricts use in any "production environment", then more of the other OSI Licenses could be compatible. If it is made plain that the code / text is for reading by people only, and is not licensed for running then the project maintainers need not care further. This would still be an OSI License, as they have no opinion on non-discriminatory usage restrictions. And I think it captures well how I think python-patterns should be distributed.

    But, I'd like to hear a lawyer argue that a "production environment" is a "field of endeavor" before suggesting anyone takes this idea too seriously.

    If a new license were to be created, then I think the same effect (as prohibiting use in "production enviroments") could be achieved by only licensing derivatives to be used as documentation, not executables. I think there's a better argument for that, as "documentation" does not discriminate on field of endevor or persons (they all use docs).

    If e.g. one of the referenced code would have been licensed under GNU AGPLv3 (condition: same license) this package should be licensed also under this license

    This is true in general, but it's not just a case of "we'll have to adopt which is most restrictive", as there can be incompatibilities between licenses at various restriction levels. "One of the referenced code would have been licensed under GNU AGPLv3" which is incompatible with the original BSD. But, turns out that the BSD examples are much nicer that the ones under GPL, so an alternative conclusion could be "we won't use the GPL code".

    I asked StackExchange about it too.

  11. z-a-f commented on Jul 3, 2017

    @z-a-f

    If you don't want to have a license, you don't have to. Also, according to GitHub's Terms of Service, you allow others to view, fork, and use the code here.

    However, there is a caveat here: From a user perspective, when I see no license, I am assuming there is no explicit permission for me to modify and/or distribute the code. In such situations, I would prefer not to use it. This problem is not necessarily about using it in production, but also sharing it as an academic resource, or as a training material.

    Another problem is protecting yourself, especially in the USA. The thing is that, unlike the rest of the world, USA doesn't have a "loser pays" rule in courts: you will have to pay for your own lawyer if you are sued, even if you win! That creates a potential for frivolous lawsuit cases that happen because of "lack of warning" -- some people can sue in a hope that you will pay them just not to hire an expensive lawyer 😄 Even knifes here in the US have a warning "Blades are sharp", duh!!!

    About giving credit to other resources and to the author: If you used other resources to prepare this material, you absolutely have to give credit where it is due. Depending on how much of the original material is still present, you either will need to have a copy of the other license, or give a citation to the resource. The rule of thumb I use in academia: if someone else's code makes 50%-100% if your core code base, the original license should stay and a citation has to be made. If someone's code makes up 5-50% of your core code, at least a citation has to be there. Otherwise, I usually mention the other code as minor contribution. This is usually pretty subjective, so at least a citation has to be made.

  12. sprshr commented on Jun 17, 2022

    @sprshr

    After many years since @yarikoptic opened this issue, this repository is still lacking a proper license. I assume that the repository owner is having a hard time finding one. choosealicense.com is a helpful source for choosing a license. I hope it helps.

  13. faif commented on Jun 20, 2022

    @faif
    Owner

    It's not about the difficulty of choosing a license. We simply can't add one license for all code because I didn't write all the code in this repo. Some examples were copied from the Internet and we would need to contact the original authors and ask them about using a license. If someone is willing to do that, be my guest (I am not).

  14. cdorsman commented on Jul 19, 2025

    @cdorsman
    Contributor

    It's not about the difficulty of choosing a license. We simply can't add one license for all code because I didn't write all the code in this repo. Some examples were copied from the Internet and we would need to contact the original authors and ask them about using a license. If someone is willing to do that, be my guest (I am not).

    I think you need to take it more cautiously. It is already a difficult situation.

    Not having a license means there is a chance that the repository potentially could be shut down. For all the effort that has been done by multiple developers through out the years, as an owner of the repository I would think that is something to avoid.

  15. faif commented on Jul 20, 2025

    @faif
    Owner

    Why would they shut it down? When there’s no explicit license I think the assumption is “all rights reserved”.

  16. cdorsman commented on Jul 20, 2025

    @cdorsman
    Contributor

    Why would they shut it down? When there’s no explicit license I think the assumption is “all rights reserved”.

    That wouldn't be a problem if all code was written by you and parts weren't taken from external sources or contributed by others. Then yes, you are right.

    But it means that no-one cannot fork and/or modify the code as well.

    From GitHub docs: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository#choosing-the-right-license

    You're under no obligation to choose a license. However, without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work.

    But in this case. The repo does contain copied work from different sources. And people have been forking and contributing while it shouldn't be the case.

    So, the problem is more substantial and complex than you are saying.

    I would say: As long as this matter is not being resolved where the project has a non-restrictive license that makes it possible to make contributions. The project should make any effort to resolve this matter. Until then any contributions and forking should be prohibited.

  17. faif commented on Jul 20, 2025

    @faif
    Owner

    I’m not going to prohibit forking or contributing, this is against the idea of this repo. I’ve created it as an educational reference and it will remain as such. If they decide to shut it down, then so be it, the code will live through the different forks and the internet archive.

  18. grimley517 commented on Jul 22, 2025

    @grimley517
    Contributor

    Regarding forking.

    Image

    Under the terms of use for GitHub. Forking is allowed through the covering terms of service. The lack of a license does not in any way restrict forking. What people fork it for can be problematic though. If someone wants to use a significant portion of these examples in a book then @faif may be able to sue for a share of the profits.

    Regarding contributing. copyright has no effect on contributions. It's implicit that @faif owns the repo, and whatever is contributed then belongs to @faif.

    Although I do agree that a license would be useful. Particularly in terms of clarity of what people can do with this code. also to protect yourself if someone does use this code, and wants to claim for a warranty, or liability due to having used it.

    Since this isn't really a library, but a reference.
    My suggestion would be an academic license or a Creative Commons license.

  19. jalanb commented on Jul 24, 2025

    @jalanb

    We simply can't add one license for all code because I didn't write all the code in this repo

    That doesn't stop licensing all the code you did write in the repository

    That's a simple tweak to the boilerplate license filles.

    And then, anyone else is free to fork the repository as they wish, and decide how they wish to treat "other contributors' code" independently.

    You don't even have to be explicit in the license about other contributors (although adding CONTRIBUTORS.md would be nice).

    Even assuming that Fred might not have a direct right to copy others' code via your repo, they are all OSS anyway, and Fred probly has other rights to copy them. Once Fred sorts all that out, you just happen to have a handy cache of all those files in this repo.

    Adding permission for your own code to be copied/forked on is the best, simplest, solution (IMHO)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions