hit9 / skylark

No longer maintained. A micro python orm for mysql and sqlite3.

Home Page:http://skylark.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uhhh, this seems kinda weird, but...

coleifer opened this issue · comments

I'm the author of Peewee ORM and I hope you don't take this amiss but I kind of feel like you've ripped off a fair bit of my project.

The class hierarchy is remarkably similar, leading me to believe you've lifted quite a bit of my code and ideas without any attribution. You changed the names slightly in some cases, so Node -> Leaf, Expression -> Expr, but Field and FieldDescriptor you decided to keep.

The code for your Leaf class is a DEAD-RINGER for Node in peewee, even down to the factory method used for generating expressions which is completely idiosyncratic.

Peewee:

class Node(object):
    def _e(op, inv=False):
        """
        Lightweight factory which returns a method that builds an Expression
        consisting of the left-hand and right-hand operands, using `op`.
        """
        def inner(self, rhs):
            if inv:
                return Expression(rhs, op, self)
            return Expression(self, op, rhs)
        return inner

"Skylark":

class Leaf(object):

    def _e(op_type, invert=False):
        def e(self, right):
            if invert:
                return Expr(right, self, op_type)
            return Expr(self, right, op_type)
        return e

The APIs are also extremely similar, for instance .select(), fn.FUNCTION(...), .alias(...)... Even the internal APIs like database .execute() and .execute_sql(), even my implementation of the Transaction context manager!

You've even gone so far as to begin your single-file ORM with ascii art of a bird for god's sake!

I can get past the copying and pasting of my code. I used a permissive license so I understand that it's your right to, if you want to, take as much or as little of Peewee's code.

The thing that I am having a hard time understanding is why you stole my idea of using ASCII art of a bird at the top of the file! That's my thing dude, come on.

Hi, @coleifer I am a follower of you. And this project started as a practice 2 years ago. I even don't use it often and really, I started this when I'm in school, copy your design.

I'm glad to remove this project and this artwork if you are desired to.

The thing that I am having a hard time understanding is why you stole my idea of using ASCII art of a bird at the top of the file! That's my thing dude, come on.

This art, I will stop using it, since you are unhappy to see this .. I haven't maintained this project for 2 years and I really started this on the top of yours, thanks to your design and I will find another logo or just remove it. I maintain all artworks here https://github.com/hit9/artworks, if you mind the bird in that repo too, I'm glad to remove it.

Sorry again to let you feel unhappy.

The names (Expr or Leaf etc.) and some ideas are indeed from yours awesome peewee.

But there are many ideas different from peewee.

And, how do you think this way:

  1. I will add the reference to peewee in my README and docs.
  2. I will mention your peewee and this issue in my license.
  3. I will change or remove the current logo (the bird)

Feel sorry again and share your opinions please.

Thanks for offering to make changes to your project. Per the peewee license,

Copyright (c) 2010 Charles Leifer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

So the copyright should be included with the source.

Additionally, and this is just my personal preference, the ASCII art thing was really something of a personal touch I added to the peewee code. It felt very bad to me to have not only large chunks of code taken without attribution or following the license, but also to have even my "personal touches" copied.

@coleifer Please checkout the HEAD on the master:

  • peewee license was added.
  • peewee reference was added.
  • this issue ref was added.
  • logo was removed.

Are these changes ok ?

Sorry again for your issue.

Thanks, that is great!