[Python-modules-commits] [flufl.i18n] 01/08: Import flufl.i18n_2.0.1.orig.tar.gz
Pierre-Elliott Bécue
peb-guest at moszumanska.debian.org
Sat Nov 25 14:40:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
peb-guest pushed a commit to branch master
in repository flufl.i18n.
commit 95b912cf8781e1d76bcc98d0a5e6be3e01c6d667
Author: Pierre-Elliott Bécue <becue at crans.org>
Date: Sat Nov 25 14:26:49 2017 +0100
Import flufl.i18n_2.0.1.orig.tar.gz
---
COPYING-LESSER.txt | 165 ---------------------
MANIFEST.in | 4 +-
PKG-INFO | 128 +---------------
README.rst | 24 +--
coverage.ini | 13 ++
flufl.i18n.egg-info/PKG-INFO | 128 +---------------
flufl.i18n.egg-info/SOURCES.txt | 10 +-
flufl.i18n.egg-info/requires.txt | 1 +
flufl/__init__.py | 24 +--
flufl/i18n/NEWS.rst | 81 +++++-----
flufl/i18n/README.rst | 64 +++-----
flufl/i18n/__init__.py | 30 ++--
flufl/i18n/_application.py | 63 ++++----
flufl/i18n/_expand.py | 28 +---
flufl/i18n/_registry.py | 30 +---
flufl/i18n/_strategy.py | 35 +----
flufl/i18n/_substitute.py | 32 +---
flufl/i18n/_translator.py | 51 +------
flufl/i18n/conf.py | 2 +-
flufl/i18n/docs/expand.rst | 3 -
flufl/i18n/docs/strategies.rst | 9 +-
flufl/i18n/docs/using.rst | 25 +++-
flufl/i18n/testing/helpers.py | 23 +++
.../i18n/testing/messages/xx/LC_MESSAGES/flufl.po | 2 +-
.../i18n/testing/messages/yy/LC_MESSAGES/flufl.po | 2 +-
flufl/i18n/tests/test_application.py | 13 ++
flufl/i18n/tests/test_documentation.py | 75 ----------
flufl/i18n/tests/test_expand.py | 21 +++
flufl/i18n/tests/test_substitute.py | 20 +++
flufl/i18n/tests/test_translator.py | 57 ++-----
setup.cfg | 6 +-
setup.py | 37 ++---
setup_helpers.py | 25 +---
template.py | 23 ---
tox.ini | 53 ++++++-
unittest.cfg | 13 ++
36 files changed, 379 insertions(+), 941 deletions(-)
diff --git a/COPYING-LESSER.txt b/COPYING-LESSER.txt
deleted file mode 100644
index cca7fc2..0000000
--- a/COPYING-LESSER.txt
+++ /dev/null
@@ -1,165 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
diff --git a/MANIFEST.in b/MANIFEST.in
index 316b512..8b9cb76 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,4 @@
include *.py MANIFEST.in
-global-include *.txt *.rst *.po *.mo *.ini
-exclude .bzrignore
+global-include *.txt *.rst *.po *.mo *.ini *.cfg
+exclude .gitignore
prune build
diff --git a/PKG-INFO b/PKG-INFO
index ca3ea48..54fd51f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,136 +1,22 @@
Metadata-Version: 1.1
Name: flufl.i18n
-Version: 1.1.3
+Version: 2.0.1
Summary: A high level API for Python internationalization.
-Home-page: https://launchpad.net/flufl.i18n
+Home-page: https://flufli18n.readthedocs.io
Author: Barry Warsaw
Author-email: barry at python.org
-License: LGPLv3
-Download-URL: https://launchpad.net/flufl.i18n/+download
-Description: ==========
- flufl.i18n
- ==========
-
- A high level API for Python internationalization.
-
- The ``flufl.i18n`` library provides a convenient API for managing translation
- contexts in Python applications. It provides facilities not only for
- single-context applications like command line scripts, but also more
- sophisticated management of multiple-context applications such as Internet
- servers.
-
-
- License
- =======
-
- This file is part of flufl.i18n.
-
- flufl.i18n is free software: you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, version 3 of the License.
-
- flufl.i18n is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with flufl.i18n. If not, see <http://www.gnu.org/licenses/>.
-
- =====================
- NEWS for flufl.i18n
- =====================
-
- 1.1.3 (2014-04-25)
- ==================
- * Include MANIFEST.in in the sdist tarball, otherwise the Debian package
- won't built correctly.
-
- 1.1.2 (2014-03-31)
- ==================
- * Fix documentation bug. LP: #1026403
- * Use modern setuptools rather than distutils.
- * Bump copyright years.
-
-
- 1.1.1 (2012-04-19)
- ==================
- * Add classifiers to setup.py and make the long description more compatible
- with the Cheeseshop.
- * Other changes to make the Cheeseshop page look nicer. (LP: #680136)
- * setup_helper.py version 2.1.
-
-
- 1.1 (2012-01-19)
- ================
- * Support Python 3 without the need for 2to3.
-
-
- 1.0.4 (2010-12-06)
- ==================
- * Restore missing line from MANIFEST.in to fix distribution tarball.
-
-
- 1.0.3 (2010-12-01)
- ==================
- * Fix setup.py to not install myfixers artifact directory on install.
- * Remove pylint.rc; we'll use pyflakes instead.
-
-
- 1.0.2 (2010-06-23)
- ==================
- * Small documentation fix.
-
-
- 1.0.1 (2010-06-09)
- ==================
- * Ditch the use of zc.buildout.
- * Improved documentation.
-
-
- 1.0 (2010-04-24)
- ================
- * Use Distribute instead of Setuptools.
- * Port to Python 3 when used with 2to3.
- * More documentation improvements.
-
-
- 0.6 (2010-04-21)
- ================
- * Documentation and lint clean up.
-
-
- 0.5 (2010-04-20)
- ================
- * Added a simplified initialization API for one-language-context
- applications. This works much better for non-server applications.
- * Added a SimpleStrategy which recognizes the $LOCPATH environment variable.
- * Show how PEP 292 strings are supported automatically.
- * When strategies are called with zero arguments, they supply the default
- translation context, which is usually a NullTranslation. This is better
- than hardcoding the NullTranslation in the Application.
-
-
- 0.4 (2010-03-04)
- ================
- * Add the ability to get the current language code, via _.code
-
-
- 0.3 (2009-11-15)
- ================
- * Initial release; refactored from Mailman 3.
-
-
+License: ASLv2
+Download-URL: https://pypi.python.org/pypi/flufl.i18n
+Description-Content-Type: UNKNOWN
+Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
+Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Internationalization
Classifier: Topic :: Software Development :: Libraries
diff --git a/README.rst b/README.rst
index 16d3911..9f0e79e 100644
--- a/README.rst
+++ b/README.rst
@@ -11,19 +11,19 @@ sophisticated management of multiple-context applications such as Internet
servers.
-License
-=======
+Author
+======
-This file is part of flufl.i18n.
+``flufl.i18n`` is Copyright (C) 2004-2017 Barry Warsaw <barry at python.org>
-flufl.i18n is free software: you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation, version 3 of the License.
+Licensed under the terms of the Apache License Version 2.0. See the LICENSE
+file for details.
-flufl.i18n is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-License for more details.
-You should have received a copy of the GNU Lesser General Public License
-along with flufl.i18n. If not, see <http://www.gnu.org/licenses/>.
+Project details
+===============
+
+ * Project home: https://gitlab.com/warsaw/flufl.i18n
+ * Report bugs at: https://gitlab.com/warsaw/flufl.i18n/issues
+ * Code hosting: https://gitlab.com/warsaw/flufl.i18n.git
+ * Documentation: https://flufli18n.readthedocs.io/
diff --git a/coverage.ini b/coverage.ini
new file mode 100644
index 0000000..8976244
--- /dev/null
+++ b/coverage.ini
@@ -0,0 +1,13 @@
+[run]
+branch = true
+parallel = true
+omit =
+ setup*
+ flufl/i18n/testing/*
+ flufl/i18n/tests/*
+ .tox/*/lib/python3.*/site-packages/*
+
+[paths]
+source =
+ flufl/i18n
+ .tox/*/lib/python*/site-packages/flufl/i18n
diff --git a/flufl.i18n.egg-info/PKG-INFO b/flufl.i18n.egg-info/PKG-INFO
index ca3ea48..54fd51f 100644
--- a/flufl.i18n.egg-info/PKG-INFO
+++ b/flufl.i18n.egg-info/PKG-INFO
@@ -1,136 +1,22 @@
Metadata-Version: 1.1
Name: flufl.i18n
-Version: 1.1.3
+Version: 2.0.1
Summary: A high level API for Python internationalization.
-Home-page: https://launchpad.net/flufl.i18n
+Home-page: https://flufli18n.readthedocs.io
Author: Barry Warsaw
Author-email: barry at python.org
-License: LGPLv3
-Download-URL: https://launchpad.net/flufl.i18n/+download
-Description: ==========
- flufl.i18n
- ==========
-
- A high level API for Python internationalization.
-
- The ``flufl.i18n`` library provides a convenient API for managing translation
- contexts in Python applications. It provides facilities not only for
- single-context applications like command line scripts, but also more
- sophisticated management of multiple-context applications such as Internet
- servers.
-
-
- License
- =======
-
- This file is part of flufl.i18n.
-
- flufl.i18n is free software: you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, version 3 of the License.
-
- flufl.i18n is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with flufl.i18n. If not, see <http://www.gnu.org/licenses/>.
-
- =====================
- NEWS for flufl.i18n
- =====================
-
- 1.1.3 (2014-04-25)
- ==================
- * Include MANIFEST.in in the sdist tarball, otherwise the Debian package
- won't built correctly.
-
- 1.1.2 (2014-03-31)
- ==================
- * Fix documentation bug. LP: #1026403
- * Use modern setuptools rather than distutils.
- * Bump copyright years.
-
-
- 1.1.1 (2012-04-19)
- ==================
- * Add classifiers to setup.py and make the long description more compatible
- with the Cheeseshop.
- * Other changes to make the Cheeseshop page look nicer. (LP: #680136)
- * setup_helper.py version 2.1.
-
-
- 1.1 (2012-01-19)
- ================
- * Support Python 3 without the need for 2to3.
-
-
- 1.0.4 (2010-12-06)
- ==================
- * Restore missing line from MANIFEST.in to fix distribution tarball.
-
-
- 1.0.3 (2010-12-01)
- ==================
- * Fix setup.py to not install myfixers artifact directory on install.
- * Remove pylint.rc; we'll use pyflakes instead.
-
-
- 1.0.2 (2010-06-23)
- ==================
- * Small documentation fix.
-
-
- 1.0.1 (2010-06-09)
- ==================
- * Ditch the use of zc.buildout.
- * Improved documentation.
-
-
- 1.0 (2010-04-24)
- ================
- * Use Distribute instead of Setuptools.
- * Port to Python 3 when used with 2to3.
- * More documentation improvements.
-
-
- 0.6 (2010-04-21)
- ================
- * Documentation and lint clean up.
-
-
- 0.5 (2010-04-20)
- ================
- * Added a simplified initialization API for one-language-context
- applications. This works much better for non-server applications.
- * Added a SimpleStrategy which recognizes the $LOCPATH environment variable.
- * Show how PEP 292 strings are supported automatically.
- * When strategies are called with zero arguments, they supply the default
- translation context, which is usually a NullTranslation. This is better
- than hardcoding the NullTranslation in the Application.
-
-
- 0.4 (2010-03-04)
- ================
- * Add the ability to get the current language code, via _.code
-
-
- 0.3 (2009-11-15)
- ================
- * Initial release; refactored from Mailman 3.
-
-
+License: ASLv2
+Download-URL: https://pypi.python.org/pypi/flufl.i18n
+Description-Content-Type: UNKNOWN
+Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
+Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Internationalization
Classifier: Topic :: Software Development :: Libraries
diff --git a/flufl.i18n.egg-info/SOURCES.txt b/flufl.i18n.egg-info/SOURCES.txt
index 4fb52fe..efbd6bf 100644
--- a/flufl.i18n.egg-info/SOURCES.txt
+++ b/flufl.i18n.egg-info/SOURCES.txt
@@ -1,17 +1,18 @@
-COPYING-LESSER.txt
MANIFEST.in
README.rst
+coverage.ini
setup.cfg
setup.py
setup_helpers.py
-template.py
tox.ini
+unittest.cfg
flufl/__init__.py
flufl.i18n.egg-info/PKG-INFO
flufl.i18n.egg-info/SOURCES.txt
flufl.i18n.egg-info/dependency_links.txt
flufl.i18n.egg-info/namespace_packages.txt
flufl.i18n.egg-info/not-zip-safe
+flufl.i18n.egg-info/requires.txt
flufl.i18n.egg-info/top_level.txt
flufl/i18n/NEWS.rst
flufl/i18n/README.rst
@@ -28,11 +29,14 @@ flufl/i18n/docs/expand.rst
flufl/i18n/docs/strategies.rst
flufl/i18n/docs/using.rst
flufl/i18n/testing/__init__.py
+flufl/i18n/testing/helpers.py
flufl/i18n/testing/messages/__init__.py
flufl/i18n/testing/messages/xx/LC_MESSAGES/flufl.mo
flufl/i18n/testing/messages/xx/LC_MESSAGES/flufl.po
flufl/i18n/testing/messages/yy/LC_MESSAGES/flufl.mo
flufl/i18n/testing/messages/yy/LC_MESSAGES/flufl.po
flufl/i18n/tests/__init__.py
-flufl/i18n/tests/test_documentation.py
+flufl/i18n/tests/test_application.py
+flufl/i18n/tests/test_expand.py
+flufl/i18n/tests/test_substitute.py
flufl/i18n/tests/test_translator.py
\ No newline at end of file
diff --git a/flufl.i18n.egg-info/requires.txt b/flufl.i18n.egg-info/requires.txt
new file mode 100644
index 0000000..4cd98b3
--- /dev/null
+++ b/flufl.i18n.egg-info/requires.txt
@@ -0,0 +1 @@
+atpublic
diff --git a/flufl/__init__.py b/flufl/__init__.py
index d7e7e20..de40ea7 100644
--- a/flufl/__init__.py
+++ b/flufl/__init__.py
@@ -1,23 +1 @@
-# Copyright (C) 2009-2014 by Barry A. Warsaw
-#
-# This file is part of flufl.i18n.
-#
-# flufl.i18n is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, version 3 of the License.
-#
-# flufl.i18n is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-# License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with flufl.i18n. If not, see <http://www.gnu.org/licenses/>.
-
-# this is a namespace package
-try:
- import pkg_resources
- pkg_resources.declare_namespace(__name__)
-except ImportError:
- import pkgutil
- __path__ = pkgutil.extend_path(__path__, __name__)
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/flufl/i18n/NEWS.rst b/flufl/i18n/NEWS.rst
index 877eeb4..6e966fe 100644
--- a/flufl/i18n/NEWS.rst
+++ b/flufl/i18n/NEWS.rst
@@ -2,81 +2,82 @@
NEWS for flufl.i18n
=====================
+2.0.1 (2017-11-14)
+==================
+* Restore Python 3.4 support.
+
+2.0 (2017-07-24)
+================
+* Add ``_.defer_translation()`` context manager for marking, but not
+ translating a string at the point of use. (Closes #2)
+* Drop Python 2, 3.3, and 3.4 compatibility; add Python 3.5 and 3.6.
+* Switch to the Apache License Version 2.0
+* Use flufl.testing for nose2 and flake8 plugins.
+
1.1.3 (2014-04-25)
==================
- * Include MANIFEST.in in the sdist tarball, otherwise the Debian package
- won't built correctly.
+* Include MANIFEST.in in the sdist tarball, otherwise the Debian package
+ won't built correctly.
1.1.2 (2014-03-31)
==================
- * Fix documentation bug. LP: #1026403
- * Use modern setuptools rather than distutils.
- * Bump copyright years.
-
+* Fix documentation bug. LP: #1026403
+* Use modern setuptools rather than distutils.
+* Bump copyright years.
1.1.1 (2012-04-19)
==================
- * Add classifiers to setup.py and make the long description more compatible
- with the Cheeseshop.
- * Other changes to make the Cheeseshop page look nicer. (LP: #680136)
- * setup_helper.py version 2.1.
-
+* Add classifiers to setup.py and make the long description more compatible
+ with the Cheeseshop.
+* Other changes to make the Cheeseshop page look nicer. (LP: #680136)
+* setup_helper.py version 2.1.
1.1 (2012-01-19)
================
- * Support Python 3 without the need for 2to3.
-
+* Support Python 3 without the need for 2to3.
1.0.4 (2010-12-06)
==================
- * Restore missing line from MANIFEST.in to fix distribution tarball.
-
+* Restore missing line from MANIFEST.in to fix distribution tarball.
1.0.3 (2010-12-01)
==================
- * Fix setup.py to not install myfixers artifact directory on install.
- * Remove pylint.rc; we'll use pyflakes instead.
-
+* Fix setup.py to not install myfixers artifact directory on install.
+* Remove pylint.rc; we'll use pyflakes instead.
1.0.2 (2010-06-23)
==================
- * Small documentation fix.
-
+* Small documentation fix.
1.0.1 (2010-06-09)
==================
- * Ditch the use of zc.buildout.
- * Improved documentation.
-
+* Ditch the use of zc.buildout.
+* Improved documentation.
1.0 (2010-04-24)
================
- * Use Distribute instead of Setuptools.
- * Port to Python 3 when used with 2to3.
- * More documentation improvements.
-
+* Use Distribute instead of Setuptools.
+* Port to Python 3 when used with 2to3.
+* More documentation improvements.
0.6 (2010-04-21)
================
- * Documentation and lint clean up.
-
+* Documentation and lint clean up.
0.5 (2010-04-20)
================
- * Added a simplified initialization API for one-language-context
- applications. This works much better for non-server applications.
- * Added a SimpleStrategy which recognizes the $LOCPATH environment variable.
- * Show how PEP 292 strings are supported automatically.
- * When strategies are called with zero arguments, they supply the default
- translation context, which is usually a NullTranslation. This is better
- than hardcoding the NullTranslation in the Application.
-
+* Added a simplified initialization API for one-language-context
+ applications. This works much better for non-server applications.
+* Added a SimpleStrategy which recognizes the $LOCPATH environment variable.
+* Show how PEP 292 strings are supported automatically.
+* When strategies are called with zero arguments, they supply the default
+ translation context, which is usually a NullTranslation. This is better
+ than hardcoding the NullTranslation in the Application.
0.4 (2010-03-04)
================
- * Add the ability to get the current language code, via _.code
-
+* Add the ability to get the current language code, via _.code
0.3 (2009-11-15)
================
- * Initial release; refactored from Mailman 3.
+* Initial release.
diff --git a/flufl/i18n/README.rst b/flufl/i18n/README.rst
index 71e99ae..3a71b5f 100644
--- a/flufl/i18n/README.rst
+++ b/flufl/i18n/README.rst
@@ -14,49 +14,33 @@ contexts for different tasks.
Requirements
============
-``flufl.i18n`` requires Python 2.6.5 or newer, and is compatible with Python 3.
+``flufl.i18n`` requires Python 3.4 or newer.
Documentation
=============
A `simple guide`_ to using the library is available within this package, in
-the form of doctests. The manual is also available online in the Cheeseshop
-at:
-
- http://packages.python.org/flufl.i18n
+the form of doctests.
Project details
===============
-The project home page is:
-
- http://launchpad.net/flufl.i18n
-
-You should report bugs at:
-
- http://bugs.launchpad.net/flufl.i18n
+ * Project home: https://gitlab.com/warsaw/flufl.i18n
+ * Report bugs at: https://gitlab.com/warsaw/flufl.i18n/issues
+ * Code hosting: https://gitlab.com/warsaw/flufl.i18n.git
+ * Documentation: https://flufli18n.readthedocs.io/
-You can download the latest version of the package either from the Cheeseshop:
+You can install it with `pip`::
- http://pypi.python.org/pypi/flufl.i18n
-
-or from the Launchpad page above. Of course you can also just install it with
-``pip`` or ``easy_install`` from the command line::
+ % pip install flufl.i18n
- % sudo pip install flufl.i18n
- % sudo easy_install flufl.i18n
+You can grab the latest development copy of the code using git. The master
+repository is hosted on GitLab. If you have git installed, you can grab
+your own branch of the code like this::
-You may want to use `virtualenv`_ instead of installing the package into the
-system Python.
-
-You can grab the latest development copy of the code using Bazaar, from the
-Launchpad home page above. See http://bazaar-vcs.org for details on the
-Bazaar distributed revision control system. If you have Bazaar installed, you
-can branch the code like this::
-
- % bzr branch lp:flufl.i18n
+ $ git clone https://gitlab.com/warsaw/flufl.i18n.git
You may contact the author via barry at python.org.
@@ -64,22 +48,19 @@ You may contact the author via barry at python.org.
Copyright
=========
-Copyright (C) 2009-2014 Barry A. Warsaw
-
-This file is part of flufl.i18n
+Copyright (C) 2004-2017 Barry A. Warsaw
-flufl.i18n is free software: you can redistribute it and/or modify it under the
-terms of the GNU Lesser General Public License as published by the Free
-Software Foundation, either version 3 of the License, or (at your option) any
-later version.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
-flufl.i18n is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details.
+ http://www.apache.org/licenses/LICENSE-2.0
-You should have received a copy of the GNU Lesser General Public License along
-with flufl.i18n. If not, see <http://www.gnu.org/licenses/>.
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
Table of Contents
@@ -93,4 +74,3 @@ Table of Contents
NEWS
.. _`simple guide`: docs/using.html
-.. _`virtualenv`: http://www.virtualenv.org/en/latest/index.html
diff --git a/flufl/i18n/__init__.py b/flufl/i18n/__init__.py
index baa92d8..50bad38 100644
--- a/flufl/i18n/__init__.py
+++ b/flufl/i18n/__init__.py
@@ -1,34 +1,22 @@
-# Copyright (C) 2009-2014 by Barry A. Warsaw
-#
-# This file is part of flufl.i18n
-#
-# flufl.i18n is free software: you can redistribute it and/or modify it under
-# the terms of the GNU Lesser General Public License as published by the Free
-# Software Foundation, version 3 of the License.
-#
-# flufl.i18n is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
-# for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with flufl.i18n. If not, see <http://www.gnu.org/licenses/>.
-
"""Expose sub-module names in the package namespace."""
-__version__ = '1.1.3'
-
-from flufl.i18n._expand import expand
+from flufl.i18n._application import Application # noqa: F401
+from flufl.i18n._expand import expand # noqa: F401
from flufl.i18n._registry import registry
-from flufl.i18n._strategy import *
+from flufl.i18n._strategy import * # noqa: F403
+from public import public
+
+
+__version__ = '2.0.1'
+ at public
def initialize(domain):
"""A convenience function for setting up translation.
:param domain: The application's name.
:type domain: string
"""
- strategy = SimpleStrategy(domain)
+ strategy = SimpleStrategy(domain) # noqa: F405
application = registry.register(strategy)
return application._
diff --git a/flufl/i18n/_application.py b/flufl/i18n/_application.py
index 807bbe4..1ac2f77 100644
--- a/flufl/i18n/_application.py
+++ b/flufl/i18n/_application.py
@@ -1,33 +1,10 @@
-# Copyright (C) 2009-2014 by Barry A. Warsaw
-#
-# This file is part of flufl.i18n
-#
-# flufl.i18n is free software: you can redistribute it and/or modify it under
-# the terms of the GNU Lesser General Public License as published by the Free
-# Software Foundation, version 3 of the License.
-#
-# flufl.i18n is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
-# for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with flufl.i18n. If not, see <http://www.gnu.org/licenses/>.
-
"""An application."""
-from __future__ import absolute_import, print_function, unicode_literals
-
-__metaclass__ = type
-__all__ = [
- 'Application',
- ]
-
-
from flufl.i18n._translator import Translator
+from gettext import NullTranslations
+from public import public
-
class _Using:
"""Context manager for _.using()."""
@@ -44,7 +21,21 @@ class _Using:
return False
-
+class _Defer:
+ """Context manager for _.defer_translation()."""
+
+ def __init__(self, application):
+ self._application = application
+
+ def __enter__(self):
+ self._application.defer()
+
+ def __exit__(self, *exc_info):
+ self._application.pop()
+ # Do not suppress exceptions.
+ return False
+
+
class _Underscore:
"""The implementation of the _() function.
@@ -76,6 +67,15 @@ class _Underscore:
"""
return _Using(self._application, language_code)
... 1033 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/flufl.i18n.git
More information about the Python-modules-commits
mailing list