Hello community,
here is the log from the commit of package python3-polib for openSUSE:Factory checked in at 2015-01-08 23:03:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-polib (Old)
and /work/SRC/openSUSE:Factory/.python3-polib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-polib"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-polib/python3-polib.changes 2013-09-04 14:03:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-polib.new/python3-polib.changes 2015-01-08 23:03:02.000000000 +0100
@@ -1,0 +2,34 @@
+Thu Jan 8 00:06:13 UTC 2015 - arun@gmx.de
+
+- specfile:
+ * update copyright year
+ * update source link to pypi
+
+- remove endian.patch. Included upstream
+
+- update to version 1.0.6:
+ * Wheel support
+ * Add missing 'Language' and 'Plural-Forms' to metadata ordering
+ * More accurate float operation for POFile.percent_translated()
+
+- changes from Version 1.0.5:
+ * Fixed issue #59: tokens variable referenced before assignment
+ * Implemented feature request #56: line number information in PO entries
+ * Fixed issue #61: polib does not handle previous msgid on multines properly
+
+- changes from Version 1.0.4:
+ * Fixed issue #43: improved check that determine if polib is dealing with a filepath or unicode content
+ * Fixed issue #44: polib now checks MO files revision number and throws an error if the number is unexpected
+ * Fixed issue #45: parse properly mo files with no header entry
+ * Fixed issue #47: added flags attribute for MOEntry to be consistant with POEntry
+ * Fixed issue #49: use integers rather than strings for msgstr_plural keys
+ * Fixed issue #51: if a PO file ends with a comment, polib adds a spurious empty entry at the end
+ * Fixed issue #52: bad magic number written on big endian platforms
+ * Fixed issue #53: added a __hash__() method to POEntry and MOEntry classes
+ * Fixed issue #54: use lowercase for state identifiers. This fixes issues with certain locales and string.lower()
+ * Fixed issue #58: use io.open() instead of codecs.open() because the latter doesn't handle very well universal line endings
+ * Make sure the mo file is closed at garbage collection, this prevents warnings on unclosed file when running tests with python >= 3.2
+ * Better way to test indianness
+ * polib download URL is now on Pypi
+
+-------------------------------------------------------------------
Old:
----
endian.patch
polib-1.0.3.tar.gz
New:
----
polib-1.0.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-polib.spec ++++++
--- /var/tmp/diff_new_pack.cbl6n6/_old 2015-01-08 23:03:03.000000000 +0100
+++ /var/tmp/diff_new_pack.cbl6n6/_new 2015-01-08 23:03:03.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python3-polib
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,13 @@
Name: python3-polib
-Version: 1.0.3
+Version: 1.0.6
Release: 0
Summary: Library to Manipulate gettext Files (PO and MO Files)
License: MIT
Group: Development/Languages/Python
Url: http://bitbucket.org/izi/polib/
-Source0: http://bitbucket.org/izi/polib/downloads/polib-%{version}.tar.gz
-Patch0: endian.patch
+Source0: https://pypi.python.org/packages/source/p/polib/polib-%{version}.tar.gz
BuildRequires: python-Sphinx
BuildRequires: python3-devel
BuildRequires: python3-distribute
@@ -52,7 +51,6 @@
%prep
%setup -q -n polib-%{version}
-%patch0 -p1
%build
python3 setup.py build
++++++ polib-1.0.3.tar.gz -> polib-1.0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/CHANGELOG new/polib-1.0.6/CHANGELOG
--- old/polib-1.0.3/CHANGELOG 2013-02-09 13:27:04.000000000 +0100
+++ new/polib-1.0.6/CHANGELOG 2015-01-04 12:28:42.000000000 +0100
@@ -2,6 +2,34 @@
Changelog
=========
+Version 1.0.6 (2015/01/04)
+--------------------------
+ - Wheel support
+ - Add missing 'Language' and 'Plural-Forms' to metadata ordering
+ - More accurate float operation for POFile.percent_translated()
+
+Version 1.0.5 (2014/08/22)
+--------------------------
+ - Fixed issue #59: tokens variable referenced before assignment
+ - Implemented feature request #56: line number information in PO entries
+ - Fixed issue #61: polib does not handle previous msgid on multines properly
+
+Version 1.0.4 (2014/02/19)
+--------------------------
+ - Fixed issue #43: improved check that determine if polib is dealing with a filepath or unicode content
+ - Fixed issue #44: polib now checks MO files revision number and throws an error if the number is unexpected
+ - Fixed issue #45: parse properly mo files with no header entry
+ - Fixed issue #47: added flags attribute for MOEntry to be consistant with POEntry
+ - Fixed issue #49: use integers rather than strings for msgstr_plural keys
+ - Fixed issue #51: if a PO file ends with a comment, polib adds a spurious empty entry at the end
+ - Fixed issue #52: bad magic number written on big endian platforms
+ - Fixed issue #53: added a __hash__() method to POEntry and MOEntry classes
+ - Fixed issue #54: use lowercase for state identifiers. This fixes issues with certain locales and string.lower()
+ - Fixed issue #58: use io.open() instead of codecs.open() because the latter doesn't handle very well universal line endings
+ - Make sure the mo file is closed at garbage collection, this prevents warnings on unclosed file when running tests with python >= 3.2
+ - Better way to test indianness
+ - polib download URL is now on Pypi
+
Version 1.0.3 (2013/02/09)
--------------------------
- Fixed issue #38: POFile.append() raised a duplicate exception when you tried to add a new entry with the same msgid and a different msgctxt (only when check_for_duplicates option is set to True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/LICENSE new/polib-1.0.6/LICENSE
--- old/polib-1.0.3/LICENSE 2012-06-08 21:51:15.000000000 +0200
+++ new/polib-1.0.6/LICENSE 2015-01-04 12:24:53.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2012 David Jean Louis.
+Copyright (c) 2006-2015 David Jean Louis.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/MANIFEST.in new/polib-1.0.6/MANIFEST.in
--- old/polib-1.0.3/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100
+++ new/polib-1.0.6/MANIFEST.in 2014-12-05 10:19:35.000000000 +0100
@@ -0,0 +1,4 @@
+include CHANGELOG LICENSE README.rst *.py *.sh
+recursive-include tests *.py *.po *.pot *.mo
+recursive-include docs *
+prune docs/_build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/PKG-INFO new/polib-1.0.6/PKG-INFO
--- old/polib-1.0.3/PKG-INFO 2013-02-09 19:16:02.000000000 +0100
+++ new/polib-1.0.6/PKG-INFO 2015-01-04 12:33:25.000000000 +0100
@@ -1,19 +1,33 @@
Metadata-Version: 1.1
Name: polib
-Version: 1.0.3
+Version: 1.0.6
Summary: A library to manipulate gettext files (po and mo files).
Home-page: http://bitbucket.org/izi/polib/
Author: David Jean Louis
-Author-email:
+Author-email: izimobil@gmail.com
License: MIT
-Download-URL: http://bitbucket.org/izi/polib/downloads/polib-1.0.3.tar.gz
+Download-URL: https://pypi.python.org/packages/source/p/polib/polib-1.0.6.tar.gz
Description:
- .. contents:: Table of Contents
-
=====
polib
=====
+ .. image:: https://pypip.in/download/polib/badge.png
+ :alt: Downloads
+
+
+ .. image:: https://pypip.in/py_versions/polib/badge.png
+ :alt: Supported Python versions
+
+
+ .. image:: https://pypip.in/status/polib/badge.png
+ :alt: Development Status
+
+
+ .. image:: https://pypip.in/license/polib/badge.png
+ :alt: License
+
+
polib is a library to manipulate, create, modify gettext files (pot, po and mo
files). You can load existing files, iterate through it's entries, add, modify
entries, comments or metadata, etc... or create new po files from scratch.
@@ -38,6 +52,34 @@
Changelog
=========
+ Version 1.0.6 (2015/01/04)
+ --------------------------
+ - Wheel support
+ - Add missing 'Language' and 'Plural-Forms' to metadata ordering
+ - More accurate float operation for POFile.percent_translated()
+
+ Version 1.0.5 (2014/08/22)
+ --------------------------
+ - Fixed issue #59: tokens variable referenced before assignment
+ - Implemented feature request #56: line number information in PO entries
+ - Fixed issue #61: polib does not handle previous msgid on multines properly
+
+ Version 1.0.4 (2014/02/19)
+ --------------------------
+ - Fixed issue #43: improved check that determine if polib is dealing with a filepath or unicode content
+ - Fixed issue #44: polib now checks MO files revision number and throws an error if the number is unexpected
+ - Fixed issue #45: parse properly mo files with no header entry
+ - Fixed issue #47: added flags attribute for MOEntry to be consistant with POEntry
+ - Fixed issue #49: use integers rather than strings for msgstr_plural keys
+ - Fixed issue #51: if a PO file ends with a comment, polib adds a spurious empty entry at the end
+ - Fixed issue #52: bad magic number written on big endian platforms
+ - Fixed issue #53: added a __hash__() method to POEntry and MOEntry classes
+ - Fixed issue #54: use lowercase for state identifiers. This fixes issues with certain locales and string.lower()
+ - Fixed issue #58: use io.open() instead of codecs.open() because the latter doesn't handle very well universal line endings
+ - Make sure the mo file is closed at garbage collection, this prevents warnings on unclosed file when running tests with python >= 3.2
+ - Better way to test indianness
+ - polib download URL is now on Pypi
+
Version 1.0.3 (2013/02/09)
--------------------------
- Fixed issue #38: POFile.append() raised a duplicate exception when you tried to add a new entry with the same msgid and a different msgctxt (only when check_for_duplicates option is set to True)
@@ -197,13 +239,22 @@
Platform: posix
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
-Classifier: Intended Audience :: System Administrators
+Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
-Classifier: Natural Language :: French
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.0
+Classifier: Programming Language :: Python :: 3.1
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Internationalization
Classifier: Topic :: Software Development :: Localization
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/README.rst new/polib-1.0.6/README.rst
--- old/polib-1.0.3/README.rst 2011-08-01 18:45:10.000000000 +0200
+++ new/polib-1.0.6/README.rst 2014-12-05 10:19:35.000000000 +0100
@@ -2,6 +2,22 @@
polib
=====
+.. image:: https://pypip.in/download/polib/badge.png
+ :alt: Downloads
+
+
+.. image:: https://pypip.in/py_versions/polib/badge.png
+ :alt: Supported Python versions
+
+
+.. image:: https://pypip.in/status/polib/badge.png
+ :alt: Development Status
+
+
+.. image:: https://pypip.in/license/polib/badge.png
+ :alt: License
+
+
polib is a library to manipulate, create, modify gettext files (pot, po and mo
files). You can load existing files, iterate through it's entries, add, modify
entries, comments or metadata, etc... or create new po files from scratch.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/docs/index.rst new/polib-1.0.6/docs/index.rst
--- old/polib-1.0.3/docs/index.rst 2011-08-01 18:45:10.000000000 +0200
+++ new/polib-1.0.6/docs/index.rst 2014-12-05 10:19:35.000000000 +0100
@@ -3,6 +3,22 @@
Welcome to polib's documentation!
=================================
+.. image:: https://pypip.in/download/polib/badge.png
+ :target: https://pypi.python.org/pypi/polib/
+ :alt: Downloads
+
+.. image:: https://pypip.in/py_versions/polib/badge.png
+ :target: https://pypi.python.org/pypi/polib/
+ :alt: Supported Python versions
+
+.. image:: https://pypip.in/status/polib/badge.png
+ :target: https://pypi.python.org/pypi/polib/
+ :alt: Development Status
+
+.. image:: https://pypip.in/license/polib/badge.png
+ :target: https://pypi.python.org/pypi/polib/
+ :alt: License
+
This documentation covers the latest release of polib.
polib is a library to manipulate, create, modify gettext files (pot, po and mo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/docs/projects.rst new/polib-1.0.6/docs/projects.rst
--- old/polib-1.0.3/docs/projects.rst 2012-07-23 18:28:33.000000000 +0200
+++ new/polib-1.0.6/docs/projects.rst 2014-12-05 10:19:35.000000000 +0100
@@ -13,6 +13,7 @@
* `Qooxdoo http://qooxdoo.org/`_
* `http://www.linux.rk.edu.pl/tra/list/`_
* `Lictionary http://www.lictionary.in/`_
+* `Jasy - Web Tooling Framework https://github.com/sebastian-software/jasy`_
If you are using polib and wish to be listed here (or not)
`let me know `_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/polib.egg-info/PKG-INFO new/polib-1.0.6/polib.egg-info/PKG-INFO
--- old/polib-1.0.3/polib.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
+++ new/polib-1.0.6/polib.egg-info/PKG-INFO 2015-01-04 12:33:25.000000000 +0100
@@ -0,0 +1,261 @@
+Metadata-Version: 1.1
+Name: polib
+Version: 1.0.6
+Summary: A library to manipulate gettext files (po and mo files).
+Home-page: http://bitbucket.org/izi/polib/
+Author: David Jean Louis
+Author-email: izimobil@gmail.com
+License: MIT
+Download-URL: https://pypi.python.org/packages/source/p/polib/polib-1.0.6.tar.gz
+Description:
+ =====
+ polib
+ =====
+
+ .. image:: https://pypip.in/download/polib/badge.png
+ :alt: Downloads
+
+
+ .. image:: https://pypip.in/py_versions/polib/badge.png
+ :alt: Supported Python versions
+
+
+ .. image:: https://pypip.in/status/polib/badge.png
+ :alt: Development Status
+
+
+ .. image:: https://pypip.in/license/polib/badge.png
+ :alt: License
+
+
+ polib is a library to manipulate, create, modify gettext files (pot, po and mo
+ files). You can load existing files, iterate through it's entries, add, modify
+ entries, comments or metadata, etc... or create new po files from scratch.
+
+ polib supports out of the box any version of python ranging from 2.4 to latest
+ 3.X version.
+
+ polib is pretty stable now and is used by many
+ `opensource projects http://polib.readthedocs.org/en/latest/projects.html`_.
+
+ The project code and bugtracker is hosted on
+ `Bitbucket http://bitbucket.org/izi/polib/`_.
+
+ polib is generously documented, you can `browse the documentation online
+ http://polib.readthedocs.org/`_, a good start is to read
+ `the quickstart guide http://polib.readthedocs.org/en/latest/quickstart.html`_.
+
+ Thanks for downloading polib !
+
+
+ =========
+ Changelog
+ =========
+
+ Version 1.0.6 (2015/01/04)
+ --------------------------
+ - Wheel support
+ - Add missing 'Language' and 'Plural-Forms' to metadata ordering
+ - More accurate float operation for POFile.percent_translated()
+
+ Version 1.0.5 (2014/08/22)
+ --------------------------
+ - Fixed issue #59: tokens variable referenced before assignment
+ - Implemented feature request #56: line number information in PO entries
+ - Fixed issue #61: polib does not handle previous msgid on multines properly
+
+ Version 1.0.4 (2014/02/19)
+ --------------------------
+ - Fixed issue #43: improved check that determine if polib is dealing with a filepath or unicode content
+ - Fixed issue #44: polib now checks MO files revision number and throws an error if the number is unexpected
+ - Fixed issue #45: parse properly mo files with no header entry
+ - Fixed issue #47: added flags attribute for MOEntry to be consistant with POEntry
+ - Fixed issue #49: use integers rather than strings for msgstr_plural keys
+ - Fixed issue #51: if a PO file ends with a comment, polib adds a spurious empty entry at the end
+ - Fixed issue #52: bad magic number written on big endian platforms
+ - Fixed issue #53: added a __hash__() method to POEntry and MOEntry classes
+ - Fixed issue #54: use lowercase for state identifiers. This fixes issues with certain locales and string.lower()
+ - Fixed issue #58: use io.open() instead of codecs.open() because the latter doesn't handle very well universal line endings
+ - Make sure the mo file is closed at garbage collection, this prevents warnings on unclosed file when running tests with python >= 3.2
+ - Better way to test indianness
+ - polib download URL is now on Pypi
+
+ Version 1.0.3 (2013/02/09)
+ --------------------------
+ - Fixed issue #38: POFile.append() raised a duplicate exception when you tried to add a new entry with the same msgid and a different msgctxt (only when check_for_duplicates option is set to True)
+ - Fixed issue #39: Added __init__.py file for convenience
+ - Fixed issue #41: UnicodeDecodeError when running setup.py build on python3 with C locale
+ - polib is now fully PEP8 compliant
+ - Small improvements: remove unused "typ" var (thanks Rodrigo Silva), mproved Makefile, Make sure _BaseFile.__contains__ returns a boolean value
+
+ Version 1.0.2 (2012/10/23)
+ --------------------------
+ - allow empty comments, flags or occurences lines
+
+ Version 1.0.1 (2012/09/11)
+ --------------------------
+ - speed up POFile.merge method (thanks @encukou)
+ - allow comments starting with two '#' characters (thanks @goibhniu)
+
+ Version 1.0.0 (2012/06/08)
+ --------------------------
+ Yeah... after nearly 6 years, polib reaches the stable state :)
+ Changes and fixes in this release :
+
+ - polib.pofile and polib.mofile functions can now return a custom class (thanks Craig Blaszczyk)
+ - polib now can find the metadata entry no matter where it is located (thanks François Poirotte)
+ - fixed issue #28 (IOError on reading obsolete "previous msgid" entries) (thanks James Ni)
+
+ Version 0.7.0 (2011/07/14)
+ --------------------------
+ This version adds support for python 3 (thanks to Vinay Sajip).
+ polib now supports out-of-the-box any version of python ranging from 2.4 to latest 3.X version.
+ polib is now 5 years old ;) so the 0.7.X branch will be the last before the 1.X stable branch.
+
+ Version 0.6.4 (2011/07/13)
+ --------------------------
+ - Better api, autodetected_encoding is no longer required to explicitely set the encoding (fixes issue #23),
+ - Fixed issue #24 Support indented PO files (thanks to François Poirotte).
+
+ Version 0.6.3 (2011/02/19)
+ --------------------------
+ - Fixed issue #19 (Disappearing newline characters due to textwrap module),
+ - ensure wrapping works as expected.
+
+ Version 0.6.2 (2011/02/09)
+ --------------------------
+ - Backported textwrap.TextWrapper._wrap_chunks that has support for the drop_whitespace parameter added in Python 2.6 (Fixes #18: broken compatibility with python 2.5, thanks @jezdez).
+
+ Version 0.6.1 (2011/02/09)
+ --------------------------
+ - fixed regression that prevented POFile initialization from data to work (issue #17).
+
+ Version 0.6.0 (2011/02/07)
+ --------------------------
+ - polib is now `fully documented http://polib.readthedocs.org`_,
+ - switched from doctests to unit tests to keep the polib.py file clean,
+ - fixed issue #7 (wrapping issues, thanks @jezdez),
+ - added a __eq__ method to _BaseFile (thanks @kost BebiX),
+ - handle msgctxt correctly when compiling mo files,
+ - compiled mo files are now exactly the same as those compiled by msgfmt without using hash tables.
+
+ Version 0.5.5 (2010/10/30)
+ --------------------------
+ - Removed multiline handling code, it was a mess and was the source of potential bugs like issue #11,
+ - Fixed typo in README and CHANGELOG, fixes issue #13.
+
+ Version 0.5.4 (2010/10/02)
+ --------------------------
+ - fixed an issue with detect_encoding(), in some cases it could return an invalid charset.
+
+ Version 0.5.3 (2010/08/29)
+ --------------------------
+ - correctly unescape lines containing both \\\\n and \\n (thanks to Martin Geisler),
+ - fixed issue #6: __str__() methods are returning unicode instead of str,
+ - fixed issue #8: POFile.merge error when an entry is obsolete in a .po, that this entry reappears in the .pot and that we merge the two,
+ - added support to instanciate POFile objects using data instead of file path (thanks to Diego Búrigo Zacarão),
+ - fixed issue #9: POFile.merge drop fuzzy attributes from translations (thanks to Tim Gerundt),
+ - fixed issue #10: Finding entries with the same msgid and different context (msgctxt).
+
+ Version 0.5.2 (2010/06/09)
+ --------------------------
+ - fixed issue #1: untranslated_entries() also show fuzzy message,
+ - write back the fuzzy header if present in the pofile,
+ - added support for previous msgctxt, previous msgid and previous msgid_plural comments (fixes issue #5),
+ - better handling of lines wrapping.
+
+ Version 0.5.1 (2009/12/14)
+ --------------------------
+ - fixed issue #0025: setup.py requires CHANGELOG but it's not present in polib-0.5.0-tar.gz
+
+ Version 0.5.0 (2009/12/13)
+ --------------------------
+ - fixed issue #0017: UnicodeDecodeError while writing a mo-file,
+ - fixed issue #0018: implemented support for msgctxt,
+ - fixed bug when compiling plural msgids/strs,
+ - API docs are no longer included, hopefully next release will ship with sphinx documentation,
+ - parse msg plural entries correctly when reading mo files,
+ - fixed issue #0020 and #0021: added ability to check for duplicate when adding entries to po/mo files, this is optional and not enabled by default because it slows down considerably the library,
+ - fixed issue #0022: unescaping code is insufficient,
+ - fixed issue #0023: encoding error when saving mo file as po file (thanks to sebastien.sable for the patch !).
+
+ Version 0.4.2 (2009/06/05)
+ --------------------------
+ - fixed issue #0007: use the codecs module to open files,
+ - fixed issue #0014: plural forms are not saved correctly in the mo file (thanks lorenzo.gil.sanchez for the patch),
+ - fixed issue #0015: no LICENSE file included in tarball,
+ - removed Version/Date from README,
+ - added test pot files to MANIFEST.in,
+ - performance improvment in find() method (thanks Thomas !).
+
+ Version 0.4.1 (2009/03/04)
+ --------------------------
+ - fixed issue #0006: plural msgstrs were saved unsorted,
+ - fixed issue #0008: long comment lines broke 'save()' method,
+ - removed performance shortcuts: they were in fact inefficient, I was misleaded by the python profile module, kudos to Thomas for making me realise that,
+ - fixed issue #0010: wrong polib version number,
+ - fixed issue #0011: occurrences parsing is now more robust and can handle weird references formats (like in eToys OLPC po files),
+ - fixed issue #0012: improved merge() method.
+
+ Version 0.4.0 (2008/11/26)
+ --------------------------
+ - fixed bug #0005: percent_translated divide by 0 on empty po files,
+ - fixed bug #0004: occurrences that have hiphens are wrapped when they should not,
+ - changes in how encoding is handled,
+ - remove deprecation warnings for typo on "occurrences",
+ - added POEntry.__cmp__() method to sort entries like gettext does,
+ - fixed POEntry.transalated(),
+ - added a merge() method to POFile class, that behaves like the gettext msgmerge utility,
+ - obsolete entries are now written at the end of the file and with only msgid/msgstr like gettext does,
+ - fixed some bugs in mo files parsing,
+ - renamed quote/unquote functions to escape/unescape,
+ - various cosmetic changes.
+
+ Version 0.3.1 (2007/12/13)
+ --------------------------
+ - fixed bug #0002: typo on "occurrences",
+ - fixed bug #0003: mismatch in exception instance names,
+ - removed deprecation warnings,
+ - removed unused charset() method in POFile/MOFile objects,
+ - fixed bug in multibytes string length (added regression tests),
+ - fixed a bug in detect_encoding(),
+ - added a find() method to _BaseFile class,
+ - proper handling of quoting and unquoting,
+ - proper handling of multiline strings in metadata
+
+ Version 0.3.0 (2007/10/17)
+ --------------------------
+ - speed improvements,
+ - polib can now compile mo files,
+ - unicode support,
+ - fixed bug #0001: global name 'sorted' is not defined" on python 2.3.
+
+ Version 0.1.0 (2006-08-08)
+ --------------------------
+ Initial release
+
+
+
+Platform: posix
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Console
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: System Administrators
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.0
+Classifier: Programming Language :: Python :: 3.1
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Software Development :: Internationalization
+Classifier: Topic :: Software Development :: Localization
+Classifier: Topic :: Text Processing :: Linguistic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/polib.egg-info/SOURCES.txt new/polib-1.0.6/polib.egg-info/SOURCES.txt
--- old/polib-1.0.3/polib.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/polib-1.0.6/polib.egg-info/SOURCES.txt 2015-01-04 12:33:25.000000000 +0100
@@ -0,0 +1,47 @@
+CHANGELOG
+LICENSE
+MANIFEST.in
+README.rst
+__init__.py
+polib.py
+runtests.sh
+setup.cfg
+setup.py
+docs/Makefile
+docs/api.rst
+docs/conf.py
+docs/contributing.rst
+docs/index.rst
+docs/installation.rst
+docs/make.bat
+docs/projects.rst
+docs/quickstart.rst
+polib.egg-info/PKG-INFO
+polib.egg-info/SOURCES.txt
+polib.egg-info/dependency_links.txt
+polib.egg-info/top_level.txt
+tests/test_fuzzy_header.po
+tests/test_indented.po
+tests/test_invalid_version.mo
+tests/test_iso-8859-15.mo
+tests/test_iso-8859-15.po
+tests/test_merge.pot
+tests/test_merge_after.po
+tests/test_merge_before.po
+tests/test_msgctxt.mo
+tests/test_msgctxt.po
+tests/test_no_header.mo
+tests/test_noencoding.po
+tests/test_obsolete_previousmsgid.po
+tests/test_pofile_helpers.po
+tests/test_previous_msgid.po
+tests/test_save_as_mofile.po
+tests/test_save_as_pofile.po
+tests/test_trailing_comment.po
+tests/test_unusual_metadata_location.po
+tests/test_utf8.mo
+tests/test_utf8.po
+tests/test_weird_occurrences.po
+tests/test_word_garbage.po
+tests/test_wrap.po
+tests/tests.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/polib.egg-info/dependency_links.txt new/polib-1.0.6/polib.egg-info/dependency_links.txt
--- old/polib-1.0.3/polib.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/polib-1.0.6/polib.egg-info/dependency_links.txt 2015-01-04 12:33:25.000000000 +0100
@@ -0,0 +1 @@
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/polib.egg-info/top_level.txt new/polib-1.0.6/polib.egg-info/top_level.txt
--- old/polib-1.0.3/polib.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/polib-1.0.6/polib.egg-info/top_level.txt 2015-01-04 12:33:25.000000000 +0100
@@ -0,0 +1 @@
+polib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.3/polib.py new/polib-1.0.6/polib.py
--- old/polib-1.0.3/polib.py 2013-02-09 19:09:48.000000000 +0100
+++ new/polib-1.0.6/polib.py 2015-01-04 12:24:23.000000000 +0100
@@ -13,7 +13,7 @@
"""
__author__ = 'David Jean Louis '
-__version__ = '1.0.3'
+__version__ = '1.0.6'
__all__ = ['pofile', 'POFile', 'POEntry', 'mofile', 'MOFile', 'MOEntry',
'default_encoding', 'escape', 'unescape', 'detect_encoding', ]
@@ -25,6 +25,16 @@
import sys
import textwrap
+try:
+ import io
+except ImportError:
+ # replacement of io.open() for python < 2.6
+ # we use codecs instead
+ class io(object):
+ @staticmethod
+ def open(fpath, mode='r', encoding=None):
+ return codecs.open(fpath, mode, encoding)
+
# the default encoding to use when encoding cannot be detected
default_encoding = 'utf-8'
@@ -77,6 +87,24 @@
instance.wrapwidth = kwargs.get('wrapwidth', 78)
return instance
# }}}
+# _is_file {{{
+
+
+def _is_file(filename_or_contents):
+ """
+ Safely returns the value of os.path.exists(filename_or_contents).
+
+ Arguments:
+
+ ``filename_or_contents``
+ either a filename, or a string holding the contents of some file.
+ In the latter case, this function will always return False.
+ """
+ try:
+ return os.path.exists(filename_or_contents)
+ except (ValueError, UnicodeEncodeError):
+ return False
+# }}}
# function pofile() {{{
@@ -172,12 +200,7 @@
return False
return True
- try:
- is_file = os.path.exists(file)
- except (ValueError, UnicodeEncodeError):
- is_file = False
-
- if not is_file:
+ if not _is_file(file):
match = rxt.search(file)
if match:
enc = match.group(1).strip()
@@ -270,7 +293,7 @@
list.__init__(self)
# the opened file handle
pofile = kwargs.get('pofile', None)
- if pofile and os.path.exists(pofile):
+ if pofile and _is_file(pofile):
self.fpath = pofile
else:
self.fpath = kwargs.get('fpath')
@@ -404,7 +427,7 @@
if repr_method == 'to_binary':
fhandle = open(fpath, 'wb')
else:
- fhandle = codecs.open(fpath, 'w', self.encoding)
+ fhandle = io.open(fpath, 'w', encoding=self.encoding)
if not isinstance(contents, text_type):
contents = contents.decode(self.encoding)
fhandle.write(contents)
@@ -460,9 +483,11 @@
'PO-Revision-Date',
'Last-Translator',
'Language-Team',
+ 'Language',
'MIME-Version',
'Content-Type',
- 'Content-Transfer-Encoding'
+ 'Content-Transfer-Encoding',
+ 'Plural-Forms'
]
ordered_data = []
for data in data_order:
@@ -536,16 +561,11 @@
koffsets += [l1, o1 + keystart]
voffsets += [l2, o2 + valuestart]
offsets = koffsets + voffsets
- # check endianness for magic number
- if struct.pack('@h', 1) == struct.pack(' 0 and \
+ not tokens[0].startswith('#'):
# since entries are added when another entry is found, we must add
- # the last entry here (only if there are lines)
+ # the last entry here (only if there are lines). Trailing comments
+ # are ignored
self.instance.append(self.current_entry)
+
# before returning the instance, check if there's metadata and if
# so extract it in a dict
metadataentry = self.instance.find('')
@@ -1354,10 +1413,10 @@
the next state the fsm will have after the action.
"""
for state in states:
- action = getattr(self, 'handle_%s' % next_state.lower())
+ action = getattr(self, 'handle_%s' % next_state)
self.transitions[(symbol, state)] = (action, next_state)
- def process(self, symbol, linenum):
+ def process(self, symbol):
"""
Process the transition corresponding to the current state and the
symbol provided.
@@ -1375,7 +1434,8 @@
if action():
self.current_state = state
except Exception:
- raise IOError('Syntax error in po file (line %s)' % linenum)
+ raise IOError('Syntax error in po file (line %s)' %
+ self.current_line)
# state handlers
@@ -1388,9 +1448,9 @@
def handle_tc(self):
"""Handle a translator comment."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
+ self.current_entry = POEntry(linenum=self.current_line)
if self.current_entry.tcomment != '':
self.current_entry.tcomment += '\n'
tcomment = self.current_token.lstrip('#')
@@ -1401,9 +1461,9 @@
def handle_gc(self):
"""Handle a generated comment."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
+ self.current_entry = POEntry(linenum=self.current_line)
if self.current_entry.comment != '':
self.current_entry.comment += '\n'
self.current_entry.comment += self.current_token[3:]
@@ -1411,9 +1471,9 @@
def handle_oc(self):
"""Handle a file:num occurence."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
+ self.current_entry = POEntry(linenum=self.current_line)
occurrences = self.current_token[3:].split()
for occurrence in occurrences:
if occurrence != '':
@@ -1429,52 +1489,53 @@
def handle_fl(self):
"""Handle a flags line."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
- self.current_entry.flags += self.current_token[3:].split(', ')
+ self.current_entry = POEntry(linenum=self.current_line)
+ self.current_entry.flags += [c.strip() for c in
+ self.current_token[3:].split(',')]
return True
def handle_pp(self):
"""Handle a previous msgid_plural line."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
+ self.current_entry = POEntry(linenum=self.current_line)
self.current_entry.previous_msgid_plural = \
unescape(self.current_token[1:-1])
return True
def handle_pm(self):
"""Handle a previous msgid line."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
+ self.current_entry = POEntry(linenum=self.current_line)
self.current_entry.previous_msgid = \
unescape(self.current_token[1:-1])
return True
def handle_pc(self):
"""Handle a previous msgctxt line."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
+ self.current_entry = POEntry(linenum=self.current_line)
self.current_entry.previous_msgctxt = \
unescape(self.current_token[1:-1])
return True
def handle_ct(self):
"""Handle a msgctxt."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
+ self.current_entry = POEntry(linenum=self.current_line)
self.current_entry.msgctxt = unescape(self.current_token[1:-1])
return True
def handle_mi(self):
"""Handle a msgid."""
- if self.current_state in ['MC', 'MS', 'MX']:
+ if self.current_state in ['mc', 'ms', 'mx']:
self.instance.append(self.current_entry)
- self.current_entry = POEntry()
+ self.current_entry = POEntry(linenum=self.current_line)
self.current_entry.obsolete = self.entry_obsolete
self.current_entry.msgid = unescape(self.current_token[1:-1])
return True
@@ -1492,31 +1553,28 @@
def handle_mx(self):
"""Handle a msgstr plural."""
index, value = self.current_token[7], self.current_token[11:-1]
- self.current_entry.msgstr_plural[index] = unescape(value)
- self.msgstr_index = index
+ self.current_entry.msgstr_plural[int(index)] = unescape(value)
+ self.msgstr_index = int(index)
return True
def handle_mc(self):
"""Handle a msgid or msgstr continuation line."""
token = unescape(self.current_token[1:-1])
- if self.current_state == 'CT':
+ if self.current_state == 'ct':
self.current_entry.msgctxt += token
- elif self.current_state == 'MI':
+ elif self.current_state == 'mi':
self.current_entry.msgid += token
- elif self.current_state == 'MP':
+ elif self.current_state == 'mp':
self.current_entry.msgid_plural += token
- elif self.current_state == 'MS':
+ elif self.current_state == 'ms':
self.current_entry.msgstr += token
- elif self.current_state == 'MX':
+ elif self.current_state == 'mx':
self.current_entry.msgstr_plural[self.msgstr_index] += token
- elif self.current_state == 'PP':
- token = token[3:]
+ elif self.current_state == 'pp':
self.current_entry.previous_msgid_plural += token
- elif self.current_state == 'PM':
- token = token[3:]
+ elif self.current_state == 'pm':
self.current_entry.previous_msgid += token
- elif self.current_state == 'PC':
- token = token[3:]
+ elif self.current_state == 'pc':
self.current_entry.previous_msgctxt += token
# don't change the current state
return False
@@ -1557,6 +1615,14 @@
check_for_duplicates=kwargs.get('check_for_duplicates', False)
)
+ def __del__(self):
+ """
+ Make sure the file is closed, this prevents warnings on unclosed file
+ when running tests with python >= 3.2.
+ """
+ if self.fhandle:
+ self.fhandle.close()
+
def parse(self):
"""
Build the instance with the file handle provided in the
@@ -1564,15 +1630,20 @@
"""
# parse magic number
magic_number = self._readbinary('