Hello community, here is the log from the commit of package python-Flask-Babel for openSUSE:Factory checked in at 2018-11-01 14:41:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Flask-Babel (Old) and /work/SRC/openSUSE:Factory/.python-Flask-Babel.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-Flask-Babel" Thu Nov 1 14:41:14 2018 rev:2 rq:645761 version:0.12.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Flask-Babel/python-Flask-Babel.changes 2017-09-04 12:33:41.993638349 +0200 +++ /work/SRC/openSUSE:Factory/.python-Flask-Babel.new/python-Flask-Babel.changes 2018-11-01 14:41:24.334895520 +0100 @@ -1,0 +2,13 @@ +Tue Oct 30 02:23:03 UTC 2018 - Arun Persaud <arun@gmx.de> + +- specfile: + * update copyright year + * remove devel from noarch + * be more specific in %files section + * add README.md + +- update to version 0.12.2: + * Switch to using README.md for project description on pypi. + * Fix heading underline in index.rst + +------------------------------------------------------------------- Old: ---- Flask-Babel-0.11.2.tar.gz New: ---- Flask-Babel-0.12.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Flask-Babel.spec ++++++ --- /var/tmp/diff_new_pack.7kgQqd/_old 2018-11-01 14:41:28.122895142 +0100 +++ /var/tmp/diff_new_pack.7kgQqd/_new 2018-11-01 14:41:28.122895142 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-Flask-Babel # -# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2014 Dr. Axel Braun # # All modifications and additions to the file contributed by third parties @@ -13,27 +13,27 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Flask-Babel -Version: 0.11.2 +Version: 0.12.2 Release: 0 +Summary: Adds i18n and l10n support to Flask License: BSD-3-Clause -Url: https://github.com/python-babel/flask-babel -Source: https://files.pythonhosted.org/packages/source/F/Flask-Babel/Flask-Babel-%{version}.tar.gz Group: Development/Languages/Python -Summary: Adds i18n and l10n support to Flask +URL: https://github.com/python-babel/flask-babel +Source: https://files.pythonhosted.org/packages/source/F/Flask-Babel/Flask-Babel-%{version}.tar.gz BuildRequires: %{python_module Babel >= 2.3} BuildRequires: %{python_module Flask} BuildRequires: %{python_module Jinja2 >= 2.5} -BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-Flask Requires: python-Babel >= 2.3 +Requires: python-Flask Requires: python-Jinja2 >= 2.5 BuildArch: noarch %python_subpackages @@ -60,6 +60,10 @@ popd %files %{python_files} -%defattr(-,root,root) -%doc LICENSE -%{python_sitelib}/* +%license LICENSE +%doc README.md +%dir %{python_sitelib}/flask_babel +%{python_sitelib}/flask_babel/* +%{python_sitelib}/Flask_Babel-%{version}-py*.egg-info + +%changelog ++++++ Flask-Babel-0.11.2.tar.gz -> Flask-Babel-0.12.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/Flask_Babel.egg-info/PKG-INFO new/Flask-Babel-0.12.2/Flask_Babel.egg-info/PKG-INFO --- old/Flask-Babel-0.11.2/Flask_Babel.egg-info/PKG-INFO 2017-04-18 15:40:21.000000000 +0200 +++ new/Flask-Babel-0.12.2/Flask_Babel.egg-info/PKG-INFO 2018-10-25 17:45:46.000000000 +0200 @@ -1,27 +1,29 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: Flask-Babel -Version: 0.11.2 +Version: 0.12.2 Summary: Adds i18n/l10n support to Flask applications Home-page: http://github.com/python-babel/flask-babel Author: Armin Ronacher Author-email: armin.ronacher@active-4.com License: BSD -Description: - Flask-Babel - ----------- +Description: # Flask Babel - 0.12.2 - Adds i18n/l10n support to Flask applications with the help of the - `Babel`_ library. + [![Build Status](https://travis-ci.org/python-babel/flask-babel.svg?branch=master)](https://travis-ci.org/python-babel/flask-babel) + [![PyPI](https://img.shields.io/pypi/v/flask-babel.svg?maxAge=2592000)](https://pypi.python.org/pypi/Flask-Babel) + ![license](https://img.shields.io/github/license/python-babel/flask-babel.svg?maxAge=25...) + ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flask-babel.svg) - Links - ````` + Implements i18n and l10n support for Flask. This is based on the Python + [babel][] module as well as [pytz][] both of which are installed automatically + for you if you install this library. - * `documentation <http://packages.python.org/Flask-Babel>`_ - * `development version - <http://github.com/mitsuhiko/flask-babel/zipball/master#egg=Flask-Babel-dev>`_ + # Documention - .. _Babel: http://babel.edgewall.org/ + The latest documentation is available [here][docs]. + [babel]: https://github.com/python-babel/babel + [pytz]: https://pypi.python.org/pypi/pytz/ + [docs]: https://pythonhosted.org/Flask-Babel/ Platform: any Classifier: Development Status :: 4 - Beta @@ -29,7 +31,10 @@ Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content Classifier: Topic :: Software Development :: Libraries :: Python Modules +Description-Content-Type: text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/Flask_Babel.egg-info/SOURCES.txt new/Flask-Babel-0.12.2/Flask_Babel.egg-info/SOURCES.txt --- old/Flask-Babel-0.11.2/Flask_Babel.egg-info/SOURCES.txt 2017-04-18 15:40:21.000000000 +0200 +++ new/Flask-Babel-0.12.2/Flask_Babel.egg-info/SOURCES.txt 2018-10-25 17:45:47.000000000 +0200 @@ -1,6 +1,7 @@ LICENSE MANIFEST.in Makefile +README.md setup.cfg setup.py Flask_Babel.egg-info/PKG-INFO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/MANIFEST.in new/Flask-Babel-0.12.2/MANIFEST.in --- old/Flask-Babel-0.11.2/MANIFEST.in 2017-04-18 15:34:48.000000000 +0200 +++ new/Flask-Babel-0.12.2/MANIFEST.in 2018-10-25 17:31:05.000000000 +0200 @@ -1,4 +1,4 @@ -include Makefile LICENSE +include Makefile LICENSE README.md recursive-include tests * recursive-exclude tests *.pyc recursive-exclude tests *.pyo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/PKG-INFO new/Flask-Babel-0.12.2/PKG-INFO --- old/Flask-Babel-0.11.2/PKG-INFO 2017-04-18 15:40:21.000000000 +0200 +++ new/Flask-Babel-0.12.2/PKG-INFO 2018-10-25 17:45:47.000000000 +0200 @@ -1,27 +1,29 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: Flask-Babel -Version: 0.11.2 +Version: 0.12.2 Summary: Adds i18n/l10n support to Flask applications Home-page: http://github.com/python-babel/flask-babel Author: Armin Ronacher Author-email: armin.ronacher@active-4.com License: BSD -Description: - Flask-Babel - ----------- +Description: # Flask Babel - 0.12.2 - Adds i18n/l10n support to Flask applications with the help of the - `Babel`_ library. + [![Build Status](https://travis-ci.org/python-babel/flask-babel.svg?branch=master)](https://travis-ci.org/python-babel/flask-babel) + [![PyPI](https://img.shields.io/pypi/v/flask-babel.svg?maxAge=2592000)](https://pypi.python.org/pypi/Flask-Babel) + ![license](https://img.shields.io/github/license/python-babel/flask-babel.svg?maxAge=25...) + ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flask-babel.svg) - Links - ````` + Implements i18n and l10n support for Flask. This is based on the Python + [babel][] module as well as [pytz][] both of which are installed automatically + for you if you install this library. - * `documentation <http://packages.python.org/Flask-Babel>`_ - * `development version - <http://github.com/mitsuhiko/flask-babel/zipball/master#egg=Flask-Babel-dev>`_ + # Documention - .. _Babel: http://babel.edgewall.org/ + The latest documentation is available [here][docs]. + [babel]: https://github.com/python-babel/babel + [pytz]: https://pypi.python.org/pypi/pytz/ + [docs]: https://pythonhosted.org/Flask-Babel/ Platform: any Classifier: Development Status :: 4 - Beta @@ -29,7 +31,10 @@ Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content Classifier: Topic :: Software Development :: Libraries :: Python Modules +Description-Content-Type: text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/README.md new/Flask-Babel-0.12.2/README.md --- old/Flask-Babel-0.11.2/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/Flask-Babel-0.12.2/README.md 2018-10-25 17:31:05.000000000 +0200 @@ -0,0 +1,18 @@ +# Flask Babel - 0.12.2 + +[![Build Status](https://travis-ci.org/python-babel/flask-babel.svg?branch=master)](https://travis-ci.org/python-babel/flask-babel) +[![PyPI](https://img.shields.io/pypi/v/flask-babel.svg?maxAge=2592000)](https://pypi.python.org/pypi/Flask-Babel) +![license](https://img.shields.io/github/license/python-babel/flask-babel.svg?maxAge=25...) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flask-babel.svg) + +Implements i18n and l10n support for Flask. This is based on the Python +[babel][] module as well as [pytz][] both of which are installed automatically +for you if you install this library. + +# Documention + +The latest documentation is available [here][docs]. + +[babel]: https://github.com/python-babel/babel +[pytz]: https://pypi.python.org/pypi/pytz/ +[docs]: https://pythonhosted.org/Flask-Babel/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/docs/conf.py new/Flask-Babel-0.12.2/docs/conf.py --- old/Flask-Babel-0.11.2/docs/conf.py 2017-04-18 15:38:05.000000000 +0200 +++ new/Flask-Babel-0.12.2/docs/conf.py 2018-10-25 17:31:05.000000000 +0200 @@ -49,9 +49,9 @@ # built documents. # # The short X.Y version. -version = '0.11.2' +version = '0.12.2' # The full version, including alpha/beta/rc tags. -release = '0.11.2' +release = '0.12.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/docs/index.rst new/Flask-Babel-0.12.2/docs/index.rst --- old/Flask-Babel-0.11.2/docs/index.rst 2017-04-18 15:34:48.000000000 +0200 +++ new/Flask-Babel-0.12.2/docs/index.rst 2018-10-25 17:31:05.000000000 +0200 @@ -1,7 +1,7 @@ Flask-Babel =========== -.. module:: flask.ext.babel +.. module:: flask_babel Flask-Babel is an extension to `Flask`_ that adds i18n and l10n support to any Flask application with the help of `babel`_, `pytz`_ and @@ -21,7 +21,8 @@ $ pip install Flask-Babel Please note that Flask-Babel requires Jinja 2.5. If you are using an -older version you will have to upgrade or disable the Jinja support. +older version you will have to upgrade or disable the Jinja support +(see configuration). Configuration @@ -31,13 +32,14 @@ object after configuring the application:: from flask import Flask - from flask.ext.babel import Babel + from flask_babel import Babel app = Flask(__name__) app.config.from_pyfile('mysettings.cfg') babel = Babel(app) -The babel object itself can be used to configure the babel support +To disable jinja support, include ``configure_jinja=False`` in the Babel +constructor call. The babel object itself can be used to configure the babel support further. Babel has the following configuration values that can be used to change some internal defaults: @@ -112,7 +114,7 @@ Here some examples: ->>> from flask.ext.babel import format_datetime +>>> from flask_babel import format_datetime
from datetime import datetime format_datetime(datetime(1987, 3, 5, 17, 12)) u'Mar 5, 1987 5:12:00 PM' @@ -128,12 +130,68 @@ And again with a different language:
app.config['BABEL_DEFAULT_LOCALE'] = 'de' ->>> from flask.ext.babel import refresh; refresh() +>>> from flask_babel import refresh; refresh() format_datetime(datetime(1987, 3, 5, 17, 12), 'EEEE, d. MMMM yyyy H:mm') u'Donnerstag, 5. M\xe4rz 1987 17:12'
For more format examples head over to the `babel`_ documentation. +Formatting Numbers +------------------ + +To format numbers you can use the :func:`format_number`, +:func:`format_decimal`, :func:`format_currency`, :func:`format_percent` and :func:`format_scientific` +functions. + +To play with the date formatting from the console, you can use the +:meth:`~flask.Flask.test_request_context` method: + +>>> app.test_request_context().push() + +Here are some examples: + +>>> from flask_babel import format_number +>>> format_number(1099) +'1,099' + +>>> from flask_babel import format_decimal +>>> format_decimal(1.2346) +u'1.235' + +>>> from flask_babel import format_currency +>>> format_currency(1099.98, 'USD') +'$1,099.98' + +>>> from flask_babel import format_percent +>>> format_percent(0.34) +'34%' + +>>> from flask_babel import format_scientific +>>> format_scientific(10000) +'1E4' + +And again with a different language: + +>>> app.config['BABEL_DEFAULT_LOCALE'] = 'de' +>>> from flask_babel import refresh; refresh() + +>>> format_number(1099) +'1.099' + +>>> format_decimal(1.2346) +'1,235' + +>>> format_currency(1099.98, 'USD') +'1.099,98\xa0$' + +>>> format_percent(0.34) +'34\xa0%' + +>>> format_scientific(10000) +'1E4' + +For more format examples head over to the `babel`_ documentation. + Using Translations ------------------ @@ -148,7 +206,7 @@ :func:`ngettext`. The first to translate singular strings and the second to translate strings that might become plural. Here some examples:: - from flask.ext.babel import gettext, ngettext + from flask_babel import gettext, ngettext gettext(u'A simple string') gettext(u'Value: %(value)s', value=42) @@ -159,7 +217,7 @@ strings. Lazy strings will not be evaluated until they are actually used. To use such a lazy string, use the :func:`lazy_gettext` function:: - from flask.ext.babel import lazy_gettext + from flask_babel import lazy_gettext class MyForm(formlibrary.FormBase): success_message = lazy_gettext(u'The form was successfully saved.') @@ -276,6 +334,19 @@ .. autofunction:: format_timedelta +Number Functions +`````````````````` + +.. autofunction:: format_number + +.. autofunction:: format_decimal + +.. autofunction:: format_currency + +.. autofunction:: format_percent + +.. autofunction:: format_scientific + Gettext Functions ````````````````` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/setup.cfg new/Flask-Babel-0.12.2/setup.cfg --- old/Flask-Babel-0.11.2/setup.cfg 2017-04-18 15:40:21.000000000 +0200 +++ new/Flask-Babel-0.12.2/setup.cfg 2018-10-25 17:45:47.000000000 +0200 @@ -1,9 +1,6 @@ [upload_docs] upload-dir = docs/_build/html -[metadata] -description-file = README.md - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Flask-Babel-0.11.2/setup.py new/Flask-Babel-0.12.2/setup.py --- old/Flask-Babel-0.11.2/setup.py 2017-04-18 15:38:05.000000000 +0200 +++ new/Flask-Babel-0.12.2/setup.py 2018-10-25 17:36:17.000000000 +0200 @@ -1,32 +1,21 @@ -""" -Flask-Babel ------------ - -Adds i18n/l10n support to Flask applications with the help of the -`Babel`_ library. - -Links -````` - -* `documentation <http://packages.python.org/Flask-Babel>`_ -* `development version - <http://github.com/mitsuhiko/flask-babel/zipball/master#egg=Flask-Babel-dev>`_ - -.. _Babel: http://babel.edgewall.org/ - -""" from setuptools import setup +from os import path +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'README.md'), 'rb') as f: + long_description = f.read().decode('utf-8') + setup( name='Flask-Babel', - version='0.11.2', + version='0.12.2', url='http://github.com/python-babel/flask-babel', license='BSD', author='Armin Ronacher', author_email='armin.ronacher@active-4.com', description='Adds i18n/l10n support to Flask applications', - long_description=__doc__, + long_description=long_description, + long_description_content_type='text/markdown', packages=['flask_babel'], zip_safe=False, platforms='any', @@ -41,8 +30,10 @@ 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ]