Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-babelfish for
openSUSE:Factory checked in at 2021-11-09 23:54:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-babelfish (Old)
and /work/SRC/openSUSE:Factory/.python-babelfish.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-babelfish"
Tue Nov 9 23:54:51 2021 rev:6 rq:930246 version:0.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-babelfish/python-babelfish.changes
2021-11-03 17:26:47.737354606 +0100
+++
/work/SRC/openSUSE:Factory/.python-babelfish.new.1890/python-babelfish.changes
2021-11-09 23:55:17.079973239 +0100
@@ -1,0 +2,9 @@
+Mon Nov 8 17:24:33 UTC 2021 - Luigi Baldoni <[email protected]>
+
+- Update to version 0.6.0
+ * Use poetry as build system
+ * Use pytest as test runner
+ * Move documentation to README
+ * Switch to "main" branch
+
+-------------------------------------------------------------------
Old:
----
babelfish-0.5.5.tar.gz
New:
----
babelfish-0.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-babelfish.spec ++++++
--- /var/tmp/diff_new_pack.3BSInu/_old 2021-11-09 23:55:17.635973522 +0100
+++ /var/tmp/diff_new_pack.3BSInu/_new 2021-11-09 23:55:17.635973522 +0100
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-babelfish
-Version: 0.5.5
+Version: 0.6.0
Release: 0
Summary: A Python library to work with countries and languages
License: BSD-3-Clause
@@ -45,12 +45,9 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%check
-%pyunittest discover -v
-
%files %{python_files}
%license LICENSE
-%doc README.rst
+%doc README.md
%{python_sitelib}/babelfish
%{python_sitelib}/babelfish-%{version}-py%{python_version}.egg-info
++++++ babelfish-0.5.5.tar.gz -> babelfish-0.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/HISTORY.rst
new/babelfish-0.6.0/HISTORY.rst
--- old/babelfish-0.5.5/HISTORY.rst 2015-10-31 14:10:36.000000000 +0100
+++ new/babelfish-0.6.0/HISTORY.rst 1970-01-01 01:00:00.000000000 +0100
@@ -1,125 +0,0 @@
-Changelog
-=========
-
-0.5.5
------
-**release date:** 2015-10-31
-
-* Fix hasattr on Country object when called with an invalid attribute
-
-0.5.4
------
-**release date:** 2015-01-24
-
-* Fix setuptools deprecation warning
-
-0.5.3
------
-**release date:** 2014-06-22
-
-* Better equality semantics for Language, Country, Script
-
-0.5.2
------
-**release date:** 2014-05-25
-
-* Babelfish objects (Language, Country, Script) are now picklable
-* Added support for Python 3.4
-
-
-0.5.1
------
-**release date:** 2014-01-26
-
-* Add a register method to ConverterManager to register without loading
-
-
-0.5.0
------
-**release date:** 2014-01-25
-
-**WARNING:** Backward incompatible changes
-
-* Simplify converter management with ConverterManager class
-* Make babelfish usable in place
-* Add Python 2.6 / 3.2 compatibility
-
-
-0.4.0
------
-**release date:** 2013-11-21
-
-**WARNING:** Backward incompatible changes
-
-* Add converter support for Country
-* Language/country reverse name detection is now case-insensitive
-* Add alpha3t, scope and type converters
-* Use lazy loading of converters
-
-
-0.3.0
------
-**release date:** 2013-11-09
-
-* Add support for scripts
-* Improve built-in converters
-* Add support for ietf
-
-
-0.2.1
------
-**release date:** 2013-11-03
-
-* Fix reading of data files
-
-
-0.2.0
------
-**release date:** 2013-10-31
-
-* Add str method
-* More explicit exceptions
-* Change repr format to use ascii only
-
-
-0.1.5
------
-**release date:** 2013-10-21
-
-* Add a fromcode method on Language class
-* Add a codes attribute on converters
-
-
-0.1.4
------
-**release date:** 2013-10-20
-
-* Fix converters not raising NoConversionError
-
-
-0.1.3
------
-**release date:** 2013-09-29
-
-* Fix source distribution
-
-
-0.1.2
------
-**release date:** 2013-09-29
-
-* Add missing files to source distribution
-
-
-0.1.1
------
-**release date:** 2013-09-28
-
-* Fix python3 support
-
-
-0.1
----
-**release date:** 2013-09-28
-
-* Initial version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/MANIFEST.in
new/babelfish-0.6.0/MANIFEST.in
--- old/babelfish-0.5.5/MANIFEST.in 2015-10-31 13:38:37.000000000 +0100
+++ new/babelfish-0.6.0/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-include LICENSE HISTORY.rst babelfish/data/iso-639-3.tab
babelfish/data/iso-3166-1.txt babelfish/data/iso15924-utf8-20131012.txt
babelfish/data/opensubtitles_languages.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/PKG-INFO new/babelfish-0.6.0/PKG-INFO
--- old/babelfish-0.5.5/PKG-INFO 2015-10-31 14:13:47.000000000 +0100
+++ new/babelfish-0.6.0/PKG-INFO 2021-08-09 19:02:28.398965000 +0200
@@ -1,169 +1,102 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: babelfish
-Version: 0.5.5
+Version: 0.6.0
Summary: A module to work with countries and languages
Home-page: https://github.com/Diaoul/babelfish
+License: BSD-3-Clause
+Keywords: language,country,locale
Author: Antoine Bertin
-Author-email: [email protected]
-License: BSD
-Description: BabelFish
- =========
-
- BabelFish is a Python library to work with countries and languages.
-
- .. image:: https://travis-ci.org/Diaoul/babelfish.png?branch=master
- :target: https://travis-ci.org/Diaoul/babelfish
-
- .. image:: https://coveralls.io/repos/Diaoul/babelfish/badge.png
- :target: https://coveralls.io/r/Diaoul/babelfish
-
- License
- -------
-
- BabelFish is licensed under the `3-clause BSD license
<http://opensource.org/licenses/BSD-3-Clause>`_.
- Copyright (c) 2013, the BabelFish authors and contributors.
-
-
- Changelog
- =========
-
- 0.5.5
- -----
- **release date:** 2015-10-31
-
- * Fix hasattr on Country object when called with an invalid attribute
-
- 0.5.4
- -----
- **release date:** 2015-01-24
-
- * Fix setuptools deprecation warning
-
- 0.5.3
- -----
- **release date:** 2014-06-22
-
- * Better equality semantics for Language, Country, Script
-
- 0.5.2
- -----
- **release date:** 2014-05-25
-
- * Babelfish objects (Language, Country, Script) are now picklable
- * Added support for Python 3.4
-
-
- 0.5.1
- -----
- **release date:** 2014-01-26
-
- * Add a register method to ConverterManager to register without loading
-
-
- 0.5.0
- -----
- **release date:** 2014-01-25
-
- **WARNING:** Backward incompatible changes
-
- * Simplify converter management with ConverterManager class
- * Make babelfish usable in place
- * Add Python 2.6 / 3.2 compatibility
-
-
- 0.4.0
- -----
- **release date:** 2013-11-21
-
- **WARNING:** Backward incompatible changes
-
- * Add converter support for Country
- * Language/country reverse name detection is now case-insensitive
- * Add alpha3t, scope and type converters
- * Use lazy loading of converters
-
-
- 0.3.0
- -----
- **release date:** 2013-11-09
-
- * Add support for scripts
- * Improve built-in converters
- * Add support for ietf
-
-
- 0.2.1
- -----
- **release date:** 2013-11-03
-
- * Fix reading of data files
-
-
- 0.2.0
- -----
- **release date:** 2013-10-31
-
- * Add str method
- * More explicit exceptions
- * Change repr format to use ascii only
-
-
- 0.1.5
- -----
- **release date:** 2013-10-21
-
- * Add a fromcode method on Language class
- * Add a codes attribute on converters
-
-
- 0.1.4
- -----
- **release date:** 2013-10-20
-
- * Fix converters not raising NoConversionError
-
-
- 0.1.3
- -----
- **release date:** 2013-09-29
-
- * Fix source distribution
-
-
- 0.1.2
- -----
- **release date:** 2013-09-29
-
- * Add missing files to source distribution
-
-
- 0.1.1
- -----
- **release date:** 2013-09-28
-
- * Fix python3 support
-
-
- 0.1
- ---
- **release date:** 2013-09-28
-
- * Initial version
-
-Keywords: babelfish language country locale
-Platform: UNKNOWN
+Author-email: [email protected]
+Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.2
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Topic :: Multimedia :: Video
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Topic :: Software Development :: Internationalization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Project-URL: Repository, https://github.com/Diaoul/babelfish
+Description-Content-Type: text/markdown
+
+# BabelFish
+BabelFish is a Python library to work with countries and languages.
+
+[](https://github.com/Diaoul/babelfish/actions/workflows/test.yml)
+
+## Usage
+BabelFish provides scripts, countries and languages from their respective ISO
+standards and a handy way to manipulate them with converters.
+
+### Script
+Script representation from 4-letter code (ISO-15924):
+```python
+>>> import babelfish
+>>> script = babelfish.Script('Hira')
+>>> script
+<Script [Hira]>
+```
+
+### Country
+Country representation from 2-letter code (ISO-3166):
+```python
+>>> country = babelfish.Country('GB')
+>>> country
+<Country [GB]>
+```
+
+Built-in country converters (name):
+```python
+>>> country = babelfish.Country('GB')
+>>> country
+<Country [GB]>
+```
+
+### Language
+Language representation from 3-letter code (ISO-639-3):
+```python
+>>> language = babelfish.Language("eng")
+>>> language
+<Language [en]>
+```
+
+Country-specific language:
+```python
+>>> language = babelfish.Language('por', 'BR')
+>>> language
+<Language [pt-BR]>
+```
+
+Language with specific script:
+```python
+>>> language = babelfish.Language.fromalpha2('sr')
+>>> language.script = babelfish.Script('Cyrl')
+>>> language
+<Language [sr-Cyrl]>
+```
+
+Built-in language converters (alpha2, alpha3b, alpha3t, name, scope, type and
opensubtitles):
+```python
+>>> language = babelfish.Language('por', 'BR')
+>>> language.alpha2
+'pt'
+>>> language.scope
+'individual'
+>>> language.type
+'living'
+>>> language.opensubtitles
+'pob'
+>>> babelfish.Language.fromalpha3b('fre')
+<Language [fr]>
+```
+
+## License
+BabelFish is licensed under the [3-clause BSD
license](http://opensource.org/licenses/BSD-3-Clause>)
+
+Copyright (c) 2013, the BabelFish authors and contributors.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/README.md
new/babelfish-0.6.0/README.md
--- old/babelfish-0.5.5/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/babelfish-0.6.0/README.md 2021-08-09 19:02:09.032979500 +0200
@@ -0,0 +1,75 @@
+# BabelFish
+BabelFish is a Python library to work with countries and languages.
+
+[](https://github.com/Diaoul/babelfish/actions/workflows/test.yml)
+
+## Usage
+BabelFish provides scripts, countries and languages from their respective ISO
+standards and a handy way to manipulate them with converters.
+
+### Script
+Script representation from 4-letter code (ISO-15924):
+```python
+>>> import babelfish
+>>> script = babelfish.Script('Hira')
+>>> script
+<Script [Hira]>
+```
+
+### Country
+Country representation from 2-letter code (ISO-3166):
+```python
+>>> country = babelfish.Country('GB')
+>>> country
+<Country [GB]>
+```
+
+Built-in country converters (name):
+```python
+>>> country = babelfish.Country('GB')
+>>> country
+<Country [GB]>
+```
+
+### Language
+Language representation from 3-letter code (ISO-639-3):
+```python
+>>> language = babelfish.Language("eng")
+>>> language
+<Language [en]>
+```
+
+Country-specific language:
+```python
+>>> language = babelfish.Language('por', 'BR')
+>>> language
+<Language [pt-BR]>
+```
+
+Language with specific script:
+```python
+>>> language = babelfish.Language.fromalpha2('sr')
+>>> language.script = babelfish.Script('Cyrl')
+>>> language
+<Language [sr-Cyrl]>
+```
+
+Built-in language converters (alpha2, alpha3b, alpha3t, name, scope, type and
opensubtitles):
+```python
+>>> language = babelfish.Language('por', 'BR')
+>>> language.alpha2
+'pt'
+>>> language.scope
+'individual'
+>>> language.type
+'living'
+>>> language.opensubtitles
+'pob'
+>>> babelfish.Language.fromalpha3b('fre')
+<Language [fr]>
+```
+
+## License
+BabelFish is licensed under the [3-clause BSD
license](http://opensource.org/licenses/BSD-3-Clause>)
+
+Copyright (c) 2013, the BabelFish authors and contributors.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/README.rst
new/babelfish-0.6.0/README.rst
--- old/babelfish-0.5.5/README.rst 2015-10-31 13:38:37.000000000 +0100
+++ new/babelfish-0.6.0/README.rst 1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-BabelFish
-=========
-
-BabelFish is a Python library to work with countries and languages.
-
-.. image:: https://travis-ci.org/Diaoul/babelfish.png?branch=master
- :target: https://travis-ci.org/Diaoul/babelfish
-
-.. image:: https://coveralls.io/repos/Diaoul/babelfish/badge.png
- :target: https://coveralls.io/r/Diaoul/babelfish
-
-License
--------
-
-BabelFish is licensed under the `3-clause BSD license
<http://opensource.org/licenses/BSD-3-Clause>`_.
-Copyright (c) 2013, the BabelFish authors and contributors.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/babelfish/__init__.py
new/babelfish-0.6.0/babelfish/__init__.py
--- old/babelfish-0.5.5/babelfish/__init__.py 2015-10-31 13:38:37.000000000
+0100
+++ new/babelfish-0.6.0/babelfish/__init__.py 2021-08-09 19:02:09.032979500
+0200
@@ -4,12 +4,6 @@
# Use of this source code is governed by the 3-clause BSD license
# that can be found in the LICENSE file.
#
-__title__ = 'babelfish'
-__version__ = '0.5.5-dev'
-__author__ = 'Antoine Bertin'
-__license__ = 'BSD'
-__copyright__ = 'Copyright 2015 the BabelFish authors'
-
import sys
if sys.version_info[0] >= 3:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/babelfish/converters/__init__.py
new/babelfish-0.6.0/babelfish/converters/__init__.py
--- old/babelfish-0.5.5/babelfish/converters/__init__.py 2015-10-31
13:38:37.000000000 +0100
+++ new/babelfish-0.6.0/babelfish/converters/__init__.py 2021-08-09
19:02:09.032979500 +0200
@@ -2,17 +2,22 @@
# Use of this source code is governed by the 3-clause BSD license
# that can be found in the LICENSE file.
#
-import collections
from pkg_resources import iter_entry_points, EntryPoint
from ..exceptions import LanguageConvertError, LanguageReverseError
+try:
+ # Python 3.3+
+ from collections.abc import Mapping, MutableMapping
+except ImportError:
+ from collections import Mapping, MutableMapping
+
# from
https://github.com/kennethreitz/requests/blob/master/requests/structures.py
-class CaseInsensitiveDict(collections.MutableMapping):
+class CaseInsensitiveDict(MutableMapping):
"""A case-insensitive ``dict``-like object.
Implements all methods and operations of
- ``collections.MutableMapping`` as well as dict's ``copy``. Also
+ ``collections.abc.MutableMapping`` as well as dict's ``copy``. Also
provides ``lower_items``.
All keys are expected to be strings. The structure remembers the
@@ -63,7 +68,7 @@
)
def __eq__(self, other):
- if isinstance(other, collections.Mapping):
+ if isinstance(other, Mapping):
other = CaseInsensitiveDict(other)
else:
return NotImplemented
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/babelfish-0.5.5/babelfish/converters/opensubtitles.py
new/babelfish-0.6.0/babelfish/converters/opensubtitles.py
--- old/babelfish-0.5.5/babelfish/converters/opensubtitles.py 2015-10-31
13:38:37.000000000 +0100
+++ new/babelfish-0.6.0/babelfish/converters/opensubtitles.py 2021-08-09
19:02:09.032979500 +0200
@@ -14,10 +14,10 @@
def __init__(self):
self.alpha3b_converter = language_converters['alpha3b']
self.alpha2_converter = language_converters['alpha2']
- self.to_opensubtitles = {('por', 'BR'): 'pob', ('gre', None): 'ell',
('srp', None): 'scc', ('srp', 'ME'): 'mne'}
+ self.to_opensubtitles = {('por', 'BR'): 'pob', ('gre', None): 'ell',
('srp', None): 'scc', ('srp', 'ME'): 'mne', ('chi', 'TW'): 'zht'}
self.from_opensubtitles = CaseInsensitiveDict({'pob': ('por', 'BR'),
'pb': ('por', 'BR'), 'ell': ('ell', None),
- 'scc': ('srp', None),
'mne': ('srp', 'ME')})
- self.codes = (self.alpha2_converter.codes |
self.alpha3b_converter.codes | set(['pob', 'pb', 'scc', 'mne']))
+ 'scc': ('srp', None),
'mne': ('srp', 'ME'), 'zht': ('zho', 'TW')})
+ self.codes = (self.alpha2_converter.codes |
self.alpha3b_converter.codes | set(self.from_opensubtitles.keys()))
def convert(self, alpha3, country=None, script=None):
alpha3b = self.alpha3b_converter.convert(alpha3, country, script)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/babelfish/tests.py
new/babelfish-0.6.0/babelfish/tests.py
--- old/babelfish-0.5.5/babelfish/tests.py 2015-10-31 13:45:48.000000000
+0100
+++ new/babelfish-0.6.0/babelfish/tests.py 1970-01-01 01:00:00.000000000
+0100
@@ -1,373 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2013 the BabelFish authors. All rights reserved.
-# Use of this source code is governed by the 3-clause BSD license
-# that can be found in the LICENSE file.
-#
-from __future__ import unicode_literals
-import re
-import sys
-import pickle
-from unittest import TestCase, TestSuite, TestLoader, TextTestRunner
-from pkg_resources import resource_stream # @UnresolvedImport
-from babelfish import (LANGUAGES, Language, Country, Script,
language_converters, country_converters,
- LanguageReverseConverter, LanguageConvertError, LanguageReverseError,
CountryReverseError)
-
-
-if sys.version_info[:2] <= (2, 6):
- _MAX_LENGTH = 80
-
- def safe_repr(obj, short=False):
- try:
- result = repr(obj)
- except Exception:
- result = object.__repr__(obj)
- if not short or len(result) < _MAX_LENGTH:
- return result
- return result[:_MAX_LENGTH] + ' [truncated]...'
-
- class _AssertRaisesContext(object):
- """A context manager used to implement TestCase.assertRaises*
methods."""
-
- def __init__(self, expected, test_case, expected_regexp=None):
- self.expected = expected
- self.failureException = test_case.failureException
- self.expected_regexp = expected_regexp
-
- def __enter__(self):
- return self
-
- def __exit__(self, exc_type, exc_value, tb):
- if exc_type is None:
- try:
- exc_name = self.expected.__name__
- except AttributeError:
- exc_name = str(self.expected)
- raise self.failureException(
- "{0} not raised".format(exc_name))
- if not issubclass(exc_type, self.expected):
- # let unexpected exceptions pass through
- return False
- self.exception = exc_value # store for later retrieval
- if self.expected_regexp is None:
- return True
-
- expected_regexp = self.expected_regexp
- if isinstance(expected_regexp, basestring):
- expected_regexp = re.compile(expected_regexp)
- if not expected_regexp.search(str(exc_value)):
- raise self.failureException('"%s" does not match "%s"' %
- (expected_regexp.pattern, str(exc_value)))
- return True
-
- class _Py26FixTestCase(object):
- def assertIsNone(self, obj, msg=None):
- """Same as self.assertTrue(obj is None), with a nicer default
message."""
- if obj is not None:
- standardMsg = '%s is not None' % (safe_repr(obj),)
- self.fail(self._formatMessage(msg, standardMsg))
-
- def assertIsNotNone(self, obj, msg=None):
- """Included for symmetry with assertIsNone."""
- if obj is None:
- standardMsg = 'unexpectedly None'
- self.fail(self._formatMessage(msg, standardMsg))
-
- def assertIn(self, member, container, msg=None):
- """Just like self.assertTrue(a in b), but with a nicer default
message."""
- if member not in container:
- standardMsg = '%s not found in %s' % (safe_repr(member),
- safe_repr(container))
- self.fail(self._formatMessage(msg, standardMsg))
-
- def assertNotIn(self, member, container, msg=None):
- """Just like self.assertTrue(a not in b), but with a nicer default
message."""
- if member in container:
- standardMsg = '%s unexpectedly found in %s' %
(safe_repr(member),
-
safe_repr(container))
- self.fail(self._formatMessage(msg, standardMsg))
-
- def assertIs(self, expr1, expr2, msg=None):
- """Just like self.assertTrue(a is b), but with a nicer default
message."""
- if expr1 is not expr2:
- standardMsg = '%s is not %s' % (safe_repr(expr1),
- safe_repr(expr2))
- self.fail(self._formatMessage(msg, standardMsg))
-
- def assertIsNot(self, expr1, expr2, msg=None):
- """Just like self.assertTrue(a is not b), but with a nicer default
message."""
- if expr1 is expr2:
- standardMsg = 'unexpectedly identical: %s' %
(safe_repr(expr1),)
- self.fail(self._formatMessage(msg, standardMsg))
-
-else:
- class _Py26FixTestCase(object):
- pass
-
-
-class TestScript(TestCase, _Py26FixTestCase):
- def test_wrong_script(self):
- self.assertRaises(ValueError, lambda: Script('Azer'))
-
- def test_eq(self):
- self.assertEqual(Script('Latn'), Script('Latn'))
-
- def test_ne(self):
- self.assertNotEqual(Script('Cyrl'), Script('Latn'))
-
- def test_hash(self):
- self.assertEqual(hash(Script('Hira')), hash('Hira'))
-
- def test_pickle(self):
- self.assertEqual(pickle.loads(pickle.dumps(Script('Latn'))),
Script('Latn'))
-
-
-class TestCountry(TestCase, _Py26FixTestCase):
- def test_wrong_country(self):
- self.assertRaises(ValueError, lambda: Country('ZZ'))
-
- def test_eq(self):
- self.assertEqual(Country('US'), Country('US'))
-
- def test_ne(self):
- self.assertNotEqual(Country('GB'), Country('US'))
- self.assertIsNotNone(Country('US'))
-
- def test_hash(self):
- self.assertEqual(hash(Country('US')), hash('US'))
-
- def test_pickle(self):
- for country in [Country('GB'), Country('US')]:
- self.assertEqual(pickle.loads(pickle.dumps(country)), country)
-
- def test_converter_name(self):
- self.assertEqual(Country('US').name, 'UNITED STATES')
- self.assertEqual(Country.fromname('UNITED STATES'), Country('US'))
- self.assertEqual(Country.fromcode('UNITED STATES', 'name'),
Country('US'))
- self.assertRaises(CountryReverseError, lambda:
Country.fromname('ZZZZZ'))
- self.assertEqual(len(country_converters['name'].codes), 249)
-
-
-class TestLanguage(TestCase, _Py26FixTestCase):
- def test_languages(self):
- self.assertEqual(len(LANGUAGES), 7874)
-
- def test_wrong_language(self):
- self.assertRaises(ValueError, lambda: Language('zzz'))
-
- def test_unknown_language(self):
- self.assertEqual(Language('zzzz', unknown='und'), Language('und'))
-
- def test_converter_alpha2(self):
- self.assertEqual(Language('eng').alpha2, 'en')
- self.assertEqual(Language.fromalpha2('en'), Language('eng'))
- self.assertEqual(Language.fromcode('en', 'alpha2'), Language('eng'))
- self.assertRaises(LanguageReverseError, lambda:
Language.fromalpha2('zz'))
- self.assertRaises(LanguageConvertError, lambda: Language('aaa').alpha2)
- self.assertEqual(len(language_converters['alpha2'].codes), 184)
-
- def test_converter_alpha3b(self):
- self.assertEqual(Language('fra').alpha3b, 'fre')
- self.assertEqual(Language.fromalpha3b('fre'), Language('fra'))
- self.assertEqual(Language.fromcode('fre', 'alpha3b'), Language('fra'))
- self.assertRaises(LanguageReverseError, lambda:
Language.fromalpha3b('zzz'))
- self.assertRaises(LanguageConvertError, lambda:
Language('aaa').alpha3b)
- self.assertEqual(len(language_converters['alpha3b'].codes), 418)
-
- def test_converter_alpha3t(self):
- self.assertEqual(Language('fra').alpha3t, 'fra')
- self.assertEqual(Language.fromalpha3t('fra'), Language('fra'))
- self.assertEqual(Language.fromcode('fra', 'alpha3t'), Language('fra'))
- self.assertRaises(LanguageReverseError, lambda:
Language.fromalpha3t('zzz'))
- self.assertRaises(LanguageConvertError, lambda:
Language('aaa').alpha3t)
- self.assertEqual(len(language_converters['alpha3t'].codes), 418)
-
- def test_converter_name(self):
- self.assertEqual(Language('eng').name, 'English')
- self.assertEqual(Language.fromname('English'), Language('eng'))
- self.assertEqual(Language.fromcode('English', 'name'), Language('eng'))
- self.assertRaises(LanguageReverseError, lambda:
Language.fromname('Zzzzzzzzz'))
- self.assertEqual(len(language_converters['name'].codes), 7874)
-
- def test_converter_scope(self):
- self.assertEqual(language_converters['scope'].codes, set(['I', 'S',
'M']))
- self.assertEqual(Language('eng').scope, 'individual')
- self.assertEqual(Language('und').scope, 'special')
-
- def test_converter_type(self):
- self.assertEqual(language_converters['type'].codes, set(['A', 'C',
'E', 'H', 'L', 'S']))
- self.assertEqual(Language('eng').type, 'living')
- self.assertEqual(Language('und').type, 'special')
-
- def test_converter_opensubtitles(self):
- self.assertEqual(Language('fra').opensubtitles,
Language('fra').alpha3b)
- self.assertEqual(Language('por', 'BR').opensubtitles, 'pob')
- self.assertEqual(Language.fromopensubtitles('fre'), Language('fra'))
- self.assertEqual(Language.fromopensubtitles('pob'), Language('por',
'BR'))
- self.assertEqual(Language.fromopensubtitles('pb'), Language('por',
'BR'))
- # Montenegrin is not recognized as an ISO language (yet?) but for now
it is
- # unofficially accepted as Serbian from Montenegro
- self.assertEqual(Language.fromopensubtitles('mne'), Language('srp',
'ME'))
- self.assertEqual(Language.fromcode('pob', 'opensubtitles'),
Language('por', 'BR'))
- self.assertRaises(LanguageReverseError, lambda:
Language.fromopensubtitles('zzz'))
- self.assertRaises(LanguageConvertError, lambda:
Language('aaa').opensubtitles)
- self.assertEqual(len(language_converters['opensubtitles'].codes), 606)
-
- # test with all the LANGUAGES from the opensubtitles api
- # downloaded from:
http://www.opensubtitles.org/addons/export_languages.php
- f = resource_stream('babelfish', 'data/opensubtitles_languages.txt')
- f.readline()
- for l in f:
- idlang, alpha2, _, upload_enabled, web_enabled =
l.decode('utf-8').strip().split('\t')
- if not int(upload_enabled) and not int(web_enabled):
- # do not test LANGUAGES that are too esoteric / not widely
available
- continue
- self.assertEqual(Language.fromopensubtitles(idlang).opensubtitles,
idlang)
- if alpha2:
- self.assertEqual(Language.fromopensubtitles(idlang),
Language.fromopensubtitles(alpha2))
- f.close()
-
- def test_fromietf_country_script(self):
- language = Language.fromietf('fra-FR-Latn')
- self.assertEqual(language.alpha3, 'fra')
- self.assertEqual(language.country, Country('FR'))
- self.assertEqual(language.script, Script('Latn'))
-
- def test_fromietf_country_no_script(self):
- language = Language.fromietf('fra-FR')
- self.assertEqual(language.alpha3, 'fra')
- self.assertEqual(language.country, Country('FR'))
- self.assertIsNone(language.script)
-
- def test_fromietf_no_country_no_script(self):
- language = Language.fromietf('fra-FR')
- self.assertEqual(language.alpha3, 'fra')
- self.assertEqual(language.country, Country('FR'))
- self.assertIsNone(language.script)
-
- def test_fromietf_no_country_script(self):
- language = Language.fromietf('fra-Latn')
- self.assertEqual(language.alpha3, 'fra')
- self.assertIsNone(language.country)
- self.assertEqual(language.script, Script('Latn'))
-
- def test_fromietf_alpha2_language(self):
- language = Language.fromietf('fr-Latn')
- self.assertEqual(language.alpha3, 'fra')
- self.assertIsNone(language.country)
- self.assertEqual(language.script, Script('Latn'))
-
- def test_fromietf_wrong_language(self):
- self.assertRaises(ValueError, lambda: Language.fromietf('xyz-FR'))
-
- def test_fromietf_wrong_country(self):
- self.assertRaises(ValueError, lambda: Language.fromietf('fra-YZ'))
-
- def test_fromietf_wrong_script(self):
- self.assertRaises(ValueError, lambda: Language.fromietf('fra-FR-Wxyz'))
-
- def test_eq(self):
- self.assertEqual(Language('eng'), Language('eng'))
-
- def test_ne(self):
- self.assertNotEqual(Language('fra'), Language('eng'))
- self.assertIsNotNone(Language('fra'))
-
- def test_nonzero(self):
- self.assertFalse(bool(Language('und')))
- self.assertTrue(bool(Language('eng')))
-
- def test_language_hasattr(self):
- self.assertTrue(hasattr(Language('fra'), 'alpha3'))
- self.assertTrue(hasattr(Language('fra'), 'alpha2'))
- self.assertFalse(hasattr(Language('bej'), 'alpha2'))
-
- def test_country_hasattr(self):
- self.assertTrue(hasattr(Country('US'), 'name'))
- self.assertTrue(hasattr(Country('FR'), 'alpha2'))
- self.assertFalse(hasattr(Country('BE'), 'none'))
-
- def test_country(self):
- self.assertEqual(Language('por', 'BR').country, Country('BR'))
- self.assertEqual(Language('eng', Country('US')).country, Country('US'))
-
- def test_eq_with_country(self):
- self.assertEqual(Language('eng', 'US'), Language('eng', Country('US')))
-
- def test_ne_with_country(self):
- self.assertNotEqual(Language('eng', 'US'), Language('eng',
Country('GB')))
-
- def test_script(self):
- self.assertEqual(Language('srp', script='Latn').script, Script('Latn'))
- self.assertEqual(Language('srp', script=Script('Cyrl')).script,
Script('Cyrl'))
-
- def test_eq_with_script(self):
- self.assertEqual(Language('srp', script='Latn'), Language('srp',
script=Script('Latn')))
-
- def test_ne_with_script(self):
- self.assertNotEqual(Language('srp', script='Latn'), Language('srp',
script=Script('Cyrl')))
-
- def test_eq_with_country_and_script(self):
- self.assertEqual(Language('srp', 'SR', 'Latn'), Language('srp',
Country('SR'), Script('Latn')))
-
- def test_ne_with_country_and_script(self):
- self.assertNotEqual(Language('srp', 'SR', 'Latn'), Language('srp',
Country('SR'), Script('Cyrl')))
-
- def test_hash(self):
- self.assertEqual(hash(Language('fra')), hash('fr'))
- self.assertEqual(hash(Language('ace')), hash('ace'))
- self.assertEqual(hash(Language('por', 'BR')), hash('pt-BR'))
- self.assertEqual(hash(Language('srp', script='Cyrl')), hash('sr-Cyrl'))
- self.assertEqual(hash(Language('eng', 'US', 'Latn')),
hash('en-US-Latn'))
-
- def test_pickle(self):
- for lang in [Language('fra'),
- Language('eng', 'US'),
- Language('srp', script='Latn'),
- Language('eng', 'US', 'Latn')]:
- self.assertEqual(pickle.loads(pickle.dumps(lang)), lang)
-
- def test_str(self):
- self.assertEqual(Language.fromietf(str(Language('eng', 'US',
'Latn'))), Language('eng', 'US', 'Latn'))
- self.assertEqual(Language.fromietf(str(Language('fra', 'FR'))),
Language('fra', 'FR'))
- self.assertEqual(Language.fromietf(str(Language('bel'))),
Language('bel'))
-
- def test_register_converter(self):
- class TestConverter(LanguageReverseConverter):
- def __init__(self):
- self.to_test = {'fra': 'test1', 'eng': 'test2'}
- self.from_test = {'test1': 'fra', 'test2': 'eng'}
-
- def convert(self, alpha3, country=None, script=None):
- if alpha3 not in self.to_test:
- raise LanguageConvertError(alpha3, country, script)
- return self.to_test[alpha3]
-
- def reverse(self, test):
- if test not in self.from_test:
- raise LanguageReverseError(test)
- return (self.from_test[test], None)
- language = Language('fra')
- self.assertFalse(hasattr(language, 'test'))
- language_converters['test'] = TestConverter()
- self.assertTrue(hasattr(language, 'test'))
- self.assertIn('test', language_converters)
- self.assertEqual(Language('fra').test, 'test1')
- self.assertEqual(Language.fromtest('test2').alpha3, 'eng')
- del language_converters['test']
- self.assertNotIn('test', language_converters)
- self.assertRaises(KeyError, lambda: Language.fromtest('test1'))
- self.assertRaises(AttributeError, lambda: Language('fra').test)
-
-
-def suite():
- suite = TestSuite()
- suite.addTest(TestLoader().loadTestsFromTestCase(TestScript))
- suite.addTest(TestLoader().loadTestsFromTestCase(TestCountry))
- suite.addTest(TestLoader().loadTestsFromTestCase(TestLanguage))
- return suite
-
-
-if __name__ == '__main__':
- TextTestRunner().run(suite())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/babelfish.egg-info/PKG-INFO
new/babelfish-0.6.0/babelfish.egg-info/PKG-INFO
--- old/babelfish-0.5.5/babelfish.egg-info/PKG-INFO 2015-10-31
14:13:47.000000000 +0100
+++ new/babelfish-0.6.0/babelfish.egg-info/PKG-INFO 1970-01-01
01:00:00.000000000 +0100
@@ -1,169 +0,0 @@
-Metadata-Version: 1.1
-Name: babelfish
-Version: 0.5.5
-Summary: A module to work with countries and languages
-Home-page: https://github.com/Diaoul/babelfish
-Author: Antoine Bertin
-Author-email: [email protected]
-License: BSD
-Description: BabelFish
- =========
-
- BabelFish is a Python library to work with countries and languages.
-
- .. image:: https://travis-ci.org/Diaoul/babelfish.png?branch=master
- :target: https://travis-ci.org/Diaoul/babelfish
-
- .. image:: https://coveralls.io/repos/Diaoul/babelfish/badge.png
- :target: https://coveralls.io/r/Diaoul/babelfish
-
- License
- -------
-
- BabelFish is licensed under the `3-clause BSD license
<http://opensource.org/licenses/BSD-3-Clause>`_.
- Copyright (c) 2013, the BabelFish authors and contributors.
-
-
- Changelog
- =========
-
- 0.5.5
- -----
- **release date:** 2015-10-31
-
- * Fix hasattr on Country object when called with an invalid attribute
-
- 0.5.4
- -----
- **release date:** 2015-01-24
-
- * Fix setuptools deprecation warning
-
- 0.5.3
- -----
- **release date:** 2014-06-22
-
- * Better equality semantics for Language, Country, Script
-
- 0.5.2
- -----
- **release date:** 2014-05-25
-
- * Babelfish objects (Language, Country, Script) are now picklable
- * Added support for Python 3.4
-
-
- 0.5.1
- -----
- **release date:** 2014-01-26
-
- * Add a register method to ConverterManager to register without loading
-
-
- 0.5.0
- -----
- **release date:** 2014-01-25
-
- **WARNING:** Backward incompatible changes
-
- * Simplify converter management with ConverterManager class
- * Make babelfish usable in place
- * Add Python 2.6 / 3.2 compatibility
-
-
- 0.4.0
- -----
- **release date:** 2013-11-21
-
- **WARNING:** Backward incompatible changes
-
- * Add converter support for Country
- * Language/country reverse name detection is now case-insensitive
- * Add alpha3t, scope and type converters
- * Use lazy loading of converters
-
-
- 0.3.0
- -----
- **release date:** 2013-11-09
-
- * Add support for scripts
- * Improve built-in converters
- * Add support for ietf
-
-
- 0.2.1
- -----
- **release date:** 2013-11-03
-
- * Fix reading of data files
-
-
- 0.2.0
- -----
- **release date:** 2013-10-31
-
- * Add str method
- * More explicit exceptions
- * Change repr format to use ascii only
-
-
- 0.1.5
- -----
- **release date:** 2013-10-21
-
- * Add a fromcode method on Language class
- * Add a codes attribute on converters
-
-
- 0.1.4
- -----
- **release date:** 2013-10-20
-
- * Fix converters not raising NoConversionError
-
-
- 0.1.3
- -----
- **release date:** 2013-09-29
-
- * Fix source distribution
-
-
- 0.1.2
- -----
- **release date:** 2013-09-29
-
- * Add missing files to source distribution
-
-
- 0.1.1
- -----
- **release date:** 2013-09-28
-
- * Fix python3 support
-
-
- 0.1
- ---
- **release date:** 2013-09-28
-
- * Initial version
-
-Keywords: babelfish language country locale
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.2
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Topic :: Multimedia :: Video
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/babelfish.egg-info/SOURCES.txt
new/babelfish-0.6.0/babelfish.egg-info/SOURCES.txt
--- old/babelfish-0.5.5/babelfish.egg-info/SOURCES.txt 2015-10-31
14:13:47.000000000 +0100
+++ new/babelfish-0.6.0/babelfish.egg-info/SOURCES.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-HISTORY.rst
-LICENSE
-MANIFEST.in
-README.rst
-setup.cfg
-setup.py
-babelfish/__init__.py
-babelfish/country.py
-babelfish/exceptions.py
-babelfish/language.py
-babelfish/script.py
-babelfish/tests.py
-babelfish.egg-info/PKG-INFO
-babelfish.egg-info/SOURCES.txt
-babelfish.egg-info/dependency_links.txt
-babelfish.egg-info/pbr.json
-babelfish.egg-info/top_level.txt
-babelfish/converters/__init__.py
-babelfish/converters/alpha2.py
-babelfish/converters/alpha3b.py
-babelfish/converters/alpha3t.py
-babelfish/converters/countryname.py
-babelfish/converters/name.py
-babelfish/converters/opensubtitles.py
-babelfish/converters/scope.py
-babelfish/converters/type.py
-babelfish/data/iso-3166-1.txt
-babelfish/data/iso-639-3.tab
-babelfish/data/iso15924-utf8-20131012.txt
-babelfish/data/opensubtitles_languages.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/babelfish-0.5.5/babelfish.egg-info/dependency_links.txt
new/babelfish-0.6.0/babelfish.egg-info/dependency_links.txt
--- old/babelfish-0.5.5/babelfish.egg-info/dependency_links.txt 2015-10-31
14:13:47.000000000 +0100
+++ new/babelfish-0.6.0/babelfish.egg-info/dependency_links.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/babelfish.egg-info/pbr.json
new/babelfish-0.6.0/babelfish.egg-info/pbr.json
--- old/babelfish-0.5.5/babelfish.egg-info/pbr.json 2015-10-31
13:40:11.000000000 +0100
+++ new/babelfish-0.6.0/babelfish.egg-info/pbr.json 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-{"git_version": "3a177fb", "is_release": false}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/babelfish.egg-info/top_level.txt
new/babelfish-0.6.0/babelfish.egg-info/top_level.txt
--- old/babelfish-0.5.5/babelfish.egg-info/top_level.txt 2015-10-31
14:13:47.000000000 +0100
+++ new/babelfish-0.6.0/babelfish.egg-info/top_level.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-babelfish
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/pyproject.toml
new/babelfish-0.6.0/pyproject.toml
--- old/babelfish-0.5.5/pyproject.toml 1970-01-01 01:00:00.000000000 +0100
+++ new/babelfish-0.6.0/pyproject.toml 2021-08-09 19:02:09.036979700 +0200
@@ -0,0 +1,44 @@
+[tool.poetry]
+name = "babelfish"
+version = "0.6.0"
+description = "A module to work with countries and languages"
+authors = [
+ "Antoine Bertin <[email protected]>",
+ "Nicolas Wack <[email protected]>",
+ "R??mi Alvergnat <[email protected]>",
+]
+license = "BSD-3-Clause"
+readme = "README.md"
+repository = "https://github.com/Diaoul/babelfish"
+keywords = [
+ "language",
+ "country",
+ "locale",
+]
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: BSD License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Topic :: Software Development :: Internationalization",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+]
+include = ["data/"]
+
+[tool.poetry.dependencies]
+python = "^3.6"
+
+[tool.poetry.dev-dependencies]
+pytest = "^6.2.4"
+pytest-cov = "^2.12.1"
+
+[build-system]
+requires = ["poetry-core>=1.0.0"]
+build-backend = "poetry.core.masonry.api"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/setup.cfg
new/babelfish-0.6.0/setup.cfg
--- old/babelfish-0.5.5/setup.cfg 2015-10-31 14:13:47.000000000 +0100
+++ new/babelfish-0.6.0/setup.cfg 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-[build_sphinx]
-source-dir = docs/
-build-dir = docs/_build
-all_files = 1
-
-[upload_sphinx]
-upload-dir = docs/_build/html
-
-[egg_info]
-tag_build =
-tag_svn_revision = 0
-tag_date = 0
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/babelfish-0.5.5/setup.py new/babelfish-0.6.0/setup.py
--- old/babelfish-0.5.5/setup.py 2015-10-31 14:12:50.000000000 +0100
+++ new/babelfish-0.6.0/setup.py 2021-08-09 19:02:28.398587700 +0200
@@ -1,38 +1,26 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2013 the BabelFish authors. All rights reserved.
-# Use of this source code is governed by the 3-clause BSD license
-# that can be found in the LICENSE file.
-#
-from setuptools import setup, find_packages
+from setuptools import setup
+packages = \
+['babelfish', 'babelfish.converters']
-setup(name='babelfish',
- version='0.5.5',
- license='BSD',
- description='A module to work with countries and languages',
- long_description=open('README.rst').read() + '\n\n' +
open('HISTORY.rst').read(),
- keywords='babelfish language country locale',
- url='https://github.com/Diaoul/babelfish',
- author='Antoine Bertin',
- author_email='[email protected]',
- packages=find_packages(),
- package_data={'babelfish': ['data/iso-639-3.tab', 'data/iso-3166-1.txt',
'data/iso15924-utf8-20131012.txt',
- 'data/opensubtitles_languages.txt']},
- classifiers=['Development Status :: 5 - Production/Stable',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: BSD License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.2',
- 'Programming Language :: Python :: 3.3',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Topic :: Multimedia :: Video',
- 'Topic :: Software Development :: Libraries :: Python Modules'],
- test_suite='babelfish.tests.suite')
+package_data = \
+{'': ['*'], 'babelfish': ['data/*']}
+
+setup_kwargs = {
+ 'name': 'babelfish',
+ 'version': '0.6.0',
+ 'description': 'A module to work with countries and languages',
+ 'long_description': '# BabelFish\nBabelFish is a Python library to work
with countries and
languages.\n\n[](https://github.com/Diaoul/babelfish/actions/workflows/test.yml)\n\n##
Usage\nBabelFish provides scripts, countries and languages from their
respective ISO\nstandards and a handy way to manipulate them with
converters.\n\n### Script\nScript representation from 4-letter code
(ISO-15924):\n```python\n>>> import babelfish\n>>> script =
babelfish.Script(\'Hira\')\n>>> script\n<Script [Hira]>\n```\n\n###
Country\nCountry representation from 2-letter code (ISO-3166):\n```python\n>>>
country = babelfish.Country(\'GB\')\n>>> country\n<Country
[GB]>\n```\n\nBuilt-in country converters (name):\n```python\n>>> country =
babelfish.Country(\'GB\')\n>>> country\n<Country [GB]>\n```\n\n###
Language\nLanguage representation from 3-letter code
(ISO-639-3):\n```python\n>>> language = babelfish.Language("eng")\n
>>> language\n<Language [en]>\n```\n\nCountry-specific
>>> language:\n```python\n>>> language = babelfish.Language(\'por\',
>>> \'BR\')\n>>> language\n<Language [pt-BR]>\n```\n\nLanguage with specific
>>> script:\n```python\n>>> language =
>>> babelfish.Language.fromalpha2(\'sr\')\n>>> language.script =
>>> babelfish.Script(\'Cyrl\')\n>>> language\n<Language
>>> [sr-Cyrl]>\n```\n\nBuilt-in language converters (alpha2, alpha3b, alpha3t,
>>> name, scope, type and opensubtitles):\n```python\n>>> language =
>>> babelfish.Language(\'por\', \'BR\')\n>>> language.alpha2\n\'pt\'\n>>>
>>> language.scope\n\'individual\'\n>>> language.type\n\'living\'\n>>>
>>> language.opensubtitles\n\'pob\'\n>>>
>>> babelfish.Language.fromalpha3b(\'fre\')\n<Language [fr]>\n```\n\n##
>>> License\nBabelFish is licensed under the [3-clause BSD
>>> license](http://opensource.org/licenses/BSD-3-Clause>)\n\nCopyright (c)
>>> 2013, the BabelFish authors and contributors.\n',
+ 'author': 'Antoine Bertin',
+ 'author_email': '[email protected]',
+ 'maintainer': None,
+ 'maintainer_email': None,
+ 'url': 'https://github.com/Diaoul/babelfish',
+ 'packages': packages,
+ 'package_data': package_data,
+ 'python_requires': '>=3.6,<4.0',
+}
+
+
+setup(**setup_kwargs)