_jsmin.py license

22 views
Skip to first unread message

Mike Orr

unread,
Aug 9, 2010, 5:39:15 PM8/9/10
to Douglas Crockford, Pedro Algarvio, Domen Kozar, pylons...@googlegroups.com
Dear Douglas Crawford (and Domen Kozar and Pedro Algarvio)--

I am the maintainer of WebHelpers (webhelpers.groovie.org), a Python
library that has included _jsmin.py for several years. Recently, a
Fedora Linux maintainer informed me that the license is not OSS
compatible per their definition, and so they'd have to remove the
module from their distribution.

http://bitbucket.org/bbangert/webhelpers/issue/39/non-free-license-of-_jsminpy-taints

Complaint: "The license in _jsmin.py is not a recognized
OSS-compatible license and has the problematically non-libre "Good,
not Evil" clause."

License clause: "The Software shall be used for Good, not Evil."

I'm writing to ask permission to drop this clause from the license. Or
even better for our users, to put the module under the WebHelpers
license which is a similar MIT-style license:

===
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author or contributors may not be used to endorse or
promote products derived from this software without specific prior
written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
===

If not, I'll have to remove _jsmin.py from WebHelpers, because we want
it and Pylons in all Linux distributions.


Domen and Pedro--

If _jsmin.py goes, minify.py might have to go too. It has no fallback
implementation for Javascript compression, and the remaining CSS
compression functionality might look funny all alone. As in, it would
raise user questions like, Why can I compress this but not that?" On
another note, a user has submitted a patch to minify application code
and external Javascript libraries (e.g., jQuery) together. Do you
think this patch looks like a good idea, and would you like to
incorporate it upstream?

http://groups.google.com/group/pylons-devel/browse_thread/thread/b08e97c6cb709e04

--
Mike Orr <slugg...@gmail.com>

Mike Orr

unread,
Aug 9, 2010, 6:25:08 PM8/9/10
to Pedro Algarvio, Domen Kozar, pylons...@googlegroups.com
Crockford has spoken, so _jsmin.py will have to go. The Fedora people
also contacted him earlier and got a similar response. I don't know
why he's so obstinate: is a joke in a license really more important
than giving the code to everybody who might benefit from it (which
would seem to be the purpose of an MIT-style license).


---------- Forwarded message ----------
From: Douglas Crockford <dou...@crockford.com>
Date: Mon, Aug 9, 2010 at 2:50 PM
Subject: Re: _jsmin.py license
To: Mike Orr <slugg...@gmail.com>


 I don't care what you do so long as you respect my license.

Domen Kožar

unread,
Aug 9, 2010, 7:09:24 PM8/9/10
to Mike Orr, Pedro Algarvio, pylons...@googlegroups.com
We can make it as optional dependency and provide something else as
default minimizer.

I guess jokes make the world spin, literally.

Domen

signature.asc

Mike Orr

unread,
Aug 9, 2010, 9:42:14 PM8/9/10
to Domen Kožar, Pedro Algarvio, pylons...@googlegroups.com
I found a "jsmin" package on PyPI with the same code. (Actually more
efficient code, it says, but it's derived from yours and has the same
license.) I changed the helper to use the "jsmin" package if
installed, otherwise to pass Javascript through unchanged and issue a
warning. The CSS minification is unaffected. The "_jsmin" module now
raises ImportError and has an explanation in comments.

I released WebHelpers 1.1 with these changes because Fedora's alpha
freeze was a few days ago, and they said the change was small enough
it might make it past the freeze. (It doesn't have the other pending
patch for cascading, because that would be an API change.)

--Mike

--
Mike Orr <slugg...@gmail.com>

Néstor Salceda

unread,
Aug 10, 2010, 8:48:31 AM8/10/10
to pylons-devel
Hey!

I've done some several tests with other minificators. And I would
like to share my thoughts:

* Javascript Minification:

I've tried with YUI Compressor[0] and Closure Compiler[1]. Finally,
I've chosen Closure Compiler. Because it compress more, the
performance is not bad and as a reference is the compressor used by
jQuery.

The good: Compress more than jsmin.
The bad: Dependency Java.

* CSS MInification

I've tried with YUI Compressor and CSSUtils. And I've chosen YUI
Compressor.

The good: Compress more than CSSUtils.
The bad: Dependency with Java.

CSSUtils has a bug, when compressing stuff like: width: 10.5% and it's
transformed to 1.5% And this breaks my layout.

Finally, I've to say that in my case I already have some stuff which
depends on Java, then the dependency doesn't matter. And if someone
wants a patch, I will post it :)

[0] http://developer.yahoo.com/yui/compressor/
[1] http://code.google.com/closure/compiler/

Néstor.
> >> >http://bitbucket.org/bbangert/webhelpers/issue/39/non-free-license-of...
> >> >http://groups.google.com/group/pylons-devel/browse_thread/thread/b08e...
>
> --
> Mike Orr <sluggos...@gmail.com>

Mike Orr

unread,
Aug 10, 2010, 12:59:43 PM8/10/10
to pylons...@googlegroups.com
So is it worth keeping minify in WebHelpers? I guess we should leave
it there for backward compatibility in any case. If you especially
recommend any of these other approaches, I can put a paragraph in the
docs about it.

--Mike

> --
> You received this message because you are subscribed to the Google Groups "pylons-devel" group.
> To post to this group, send email to pylons...@googlegroups.com.
> To unsubscribe from this group, send email to pylons-devel...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
>
>

--
Mike Orr <slugg...@gmail.com>

Néstor Salceda

unread,
Aug 13, 2010, 11:39:28 AM8/13/10
to pylons-devel
I'm not sure.

If minify is kept, we could get a nice velocity passing to
production. But keeping it in pylons-core is a trouble with the jsmin
license. Anyway, I agree with the backward compatibility.

I'm not sure about this, but perhaps we could maintain a page in the
wiki with some community packages that are excluded from pylons-core
but closely related to pylons. By example MinWebHelpers[0] could be
there. Or using the Pypi trove classifier for pylons (Framework ::
Pylons)

About the other approaches, I'm pretty impressed with the Google
Closure Compiler and with YUI Compressor. Perhaps you can write a
paragraph mentioning the software available to perform the
minification.

http://docs.fubar.si/minwebhelpers/

Néstor.
> Mike Orr <sluggos...@gmail.com>

Mike Orr

unread,
Aug 13, 2010, 1:04:34 PM8/13/10
to pylons...@googlegroups.com
I've already released 1.1 with _jsmin removed, and am trying to get
into the next Fedora version even though it's a few days after their
Alpha cutoff. So we might as well leave the rest of it in there for
backward compatibility. The whats_new says:

"""
*webhelpers.pylonslib.minify*: The Javascript minification code was removed
due to a non-free license. **The helper now minifies Javascript only if the
"jsmin" package is installed.** Otherwise it issues a warning and leaves the
Javascript unchanged. CSS minification is not affected. Details are in
webhelpers/pylonslib/_minify.py .
"""

I haven't announced 1.1 due to the pending larger change in the HTML
builder in 1.2. No reason for people to upgrade twice within a month.

--Mike

The whats_new says:

Reply all
Reply to author
Forward
0 new messages