Repository: joke2k/faker

Issue:
text-unidecode is released under the Artistic license
`text-unidecode` is released under the Artistic license v1.0, which is considered non-free by the FSF (and therefore not compatible with the GPL). I believe this clause is also of concern to commercial users of faker too:

> 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own.

Not being able to charge a fee for the software is problematic for those of us who are contractors, for example.

I realise there aren't really any good alternatives (`unidecode` is GPL licensed as pointed out in #628 , `isounidecode` doesn't support Python 3), so would a patch making `text-unidecode` an optional dependency be acceptable?


Discussion:
According to https://en.wikipedia.org/wiki/Artistic_License, the Artistic license allows linking from code with a different license.

I think 'this Package' in 'You may not charge a fee for this Package' refers to `text-unidecode`, not to `Faker`.
> According to https://en.wikipedia.org/wiki/Artistic_License, the Artistic license allows linking from code with a different license.

That's true of the any FOSS license, surely? The problem of license compatibility comes from two licenses having conflicting terms. E.g. you can't use Apache licensed code with a GPLv2 project due to Apache's patent clause conflicting with the GPLv2's "no additional restrictions" clause.

With regard to the Artistic license v1.0, I think it's clause 5 (the restrictions on commercial use) that make it non-free in the eyes of the FSF.

> I think 'this Package' in 'You may not charge a fee for this Package' refers to text-unidecode, not to Faker.

Yes, that's how I understood it too. But I can't distribute Faker without text-unidecode.
Also, it appears I was wrong about `isounidecode` - it does support Python 3, it just doesn't advertise it.
@moggers87 Can you send a PR that replaces `text-unidecode` with `isounidecode`? I'm ok with replacing it if the build passes on all configurations
Did something change with the license of text-unidecode?
Sorry, I closed it by accident
@fcurella I came across this issue when packaging dependencies for inclusion in the Fedora distribution and wanted to mention that it is still problematic.

The "Artistic 1.0" license is explicitely listed in incompatible licenses here: https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Bad_Licenses

> These are software licenses which are NOT OKAY for Fedora. Nothing in Fedora is permitted to use these licenses. They're either non-free or deprecated.

It is documented on [gnu.org](http://www.gnu.org/licenses/license-list.html#ArtisticLicense) as:

> Artistic License 1.0 (#ArtisticLicense)
> We cannot say that this is a free software license because it is too vague; some passages are too clever for their own good, and their meaning is not clear. We urge you to avoid using it, except as part of the disjunctive license of Perl.

@dmsimard I 100% agree with you.

The problem is that we don't have any decent alternative. If you can think of any solution, please let us know (and possibly send a PR ;)
@fcurella I am actually not familiar with faker but it looks like the only place where text-unidecode is used is here: https://github.com/joke2k/faker/blob/c412d56e6a8f3681cfa1b75ef6ed47bc9798825d/faker/providers/internet/__init__.py#L126

Surely there could be an alternative implementation ?
Unicode became standard in [python3](https://docs.python.org/3/howto/unicode.html) and python2 is end-of-life in [5 months](https://pythonclock.org/).
@dmsimard 

We use `text-unidecode` for transliteration, ie: taking Unicode data and trying to represent it in US-ASCII characters. For example `u'какой` -> `u'kakoi'`

> Surely there could be an alternative implementation ?

There is one, but it's not actively maintained. See https://github.com/joke2k/faker/pull/728

> Unicode became standard in python3 and python2 is end-of-life in 5 months.

In 5 months, we can finally drop Python2. But we'll still need a library for transliteration.
text-unidecode has switched its license in version 1.3 to GPL+ or Artistic.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -66,7 +66,7 @@
     install_requires=[
         "python-dateutil>=2.4",
         "six>=1.10",
-        "text-unidecode==1.2",
+        "text-unidecode==1.3",
     ],
     tests_require=[
         "validators>=0.13.0",


Test patch: