Hello community, here is the log from the commit of package python-polib for openSUSE:Factory checked in at 2012-09-20 15:43:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-polib (Old) and /work/SRC/openSUSE:Factory/.python-polib.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-polib", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/python-polib/python-polib.changes 2012-06-14 22:26:34.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-polib.new/python-polib.changes 2012-09-20 15:43:55.000000000 +0200 @@ -1,0 +2,7 @@ +Wed Sep 12 03:36:04 UTC 2012 - os-...@jacraig.com + +- Update to 1.0.1: + * speed up POFile.merge method + * allow comments starting with two '#' characters + +------------------------------------------------------------------- Old: ---- polib-1.0.0.tar.bz2 New: ---- polib-1.0.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-polib.spec ++++++ --- /var/tmp/diff_new_pack.EnQ5o1/_old 2012-09-20 15:43:56.000000000 +0200 +++ /var/tmp/diff_new_pack.EnQ5o1/_new 2012-09-20 15:43:56.000000000 +0200 @@ -18,7 +18,7 @@ Name: python-polib -Version: 1.0.0 +Version: 1.0.1 Release: 0 Url: http://bitbucket.org/izi/polib/ Summary: A library to manipulate gettext files ++++++ polib-1.0.0.tar.bz2 -> polib-1.0.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.0/CHANGELOG new/polib-1.0.1/CHANGELOG --- old/polib-1.0.0/CHANGELOG 2012-06-07 22:10:37.000000000 +0200 +++ new/polib-1.0.1/CHANGELOG 2012-09-11 10:54:22.000000000 +0200 @@ -2,14 +2,19 @@ Changelog ========= +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) -- Dropped python 2.4 support +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) -------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.0/LICENSE new/polib-1.0.1/LICENSE --- old/polib-1.0.0/LICENSE 2011-08-01 18:45:10.000000000 +0200 +++ new/polib-1.0.1/LICENSE 2012-06-08 21:51:15.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2006-2011 David Jean Louis. +Copyright (c) 2006-2012 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.0/PKG-INFO new/polib-1.0.1/PKG-INFO --- old/polib-1.0.0/PKG-INFO 2012-06-08 19:02:28.000000000 +0200 +++ new/polib-1.0.1/PKG-INFO 2012-09-11 10:56:32.000000000 +0200 @@ -1,12 +1,12 @@ Metadata-Version: 1.0 Name: polib -Version: 1.0.0 +Version: 1.0.1 Summary: A library to manipulate gettext files (po and mo files). Home-page: http://bitbucket.org/izi/polib/ Author: David Jean Louis Author-email: <izimo...@gmail.com> License: MIT -Download-URL: http://bitbucket.org/izi/polib/downloads/polib-1.0.0.tar.gz +Download-URL: http://bitbucket.org/izi/polib/downloads/polib-1.0.1.tar.gz Description: .. contents:: Table of Contents @@ -38,14 +38,19 @@ Changelog ========= + 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) - - Dropped python 2.4 support + 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) -------------------------- @@ -178,7 +183,7 @@ Platform: posix -Classifier: Development Status :: 4 - Beta +Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Intended Audience :: System Administrators Classifier: Intended Audience :: Developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.0/docs/projects.rst new/polib-1.0.1/docs/projects.rst --- old/polib-1.0.0/docs/projects.rst 2011-08-01 18:45:10.000000000 +0200 +++ new/polib-1.0.1/docs/projects.rst 2012-07-23 18:28:33.000000000 +0200 @@ -12,6 +12,7 @@ * `The evergreen library system <http://www.open-ils.org/>`_ * `Qooxdoo <http://qooxdoo.org/>`_ * `<http://www.linux.rk.edu.pl/tra/list/>`_ +* `Lictionary <http://www.lictionary.in/>`_ If you are using polib and wish to be listed here (or not) `let me know <izimo...@gmail.com>`_. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.0/polib.py new/polib-1.0.1/polib.py --- old/polib-1.0.0/polib.py 2012-06-08 18:54:34.000000000 +0200 +++ new/polib-1.0.1/polib.py 2012-09-11 10:47:55.000000000 +0200 @@ -13,7 +13,7 @@ """ __author__ = 'David Jean Louis <izimo...@gmail.com>' -__version__ = '1.0.0' +__version__ = '1.0.1' __all__ = ['pofile', 'POFile', 'POEntry', 'mofile', 'MOFile', 'MOEntry', 'detect_encoding', 'escape', 'unescape', 'detect_encoding',] @@ -648,15 +648,19 @@ ``refpot`` object POFile, the reference catalog. """ + # Store entries in dict/set for faster access + self_entries = dict((entry.msgid, entry) for entry in self) + refpot_msgids = set(entry.msgid for entry in refpot) + # Merge entries that are in the refpot for entry in refpot: - e = self.find(entry.msgid, include_obsolete_entries=True) + e = self_entries.get(entry.msgid) if e is None: e = POEntry() self.append(e) e.merge(entry) # ok, now we must "obsolete" entries that are not in the refpot anymore for entry in self: - if refpot.find(entry.msgid) is None: + if entry.msgid not in refpot_msgids: entry.obsolete = True # }}} @@ -1233,7 +1237,7 @@ # we are on a flags line self.process('FL', i) - elif tokens[0] == '#': + elif tokens[0] == '#' or tokens[0].startswith('##'): if line == '#': line += ' ' # we are on a translator comment line self.process('TC', i) @@ -1358,7 +1362,10 @@ self.current_entry = POEntry() if self.current_entry.tcomment != '': self.current_entry.tcomment += '\n' - self.current_entry.tcomment += self.current_token[2:] + tcomment = self.current_token.lstrip('#') + if tcomment.startswith(' '): + tcomment = tcomment[1:] + self.current_entry.tcomment += tcomment return True def handle_gc(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.0/setup.py new/polib-1.0.1/setup.py --- old/polib-1.0.0/setup.py 2011-08-01 18:45:10.000000000 +0200 +++ new/polib-1.0.1/setup.py 2012-06-08 21:48:16.000000000 +0200 @@ -41,7 +41,7 @@ license='MIT', platforms=['posix'], classifiers = [ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: System Administrators', 'Intended Audience :: Developers', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.0/tests/test_utf8.po new/polib-1.0.1/tests/test_utf8.po --- old/polib-1.0.0/tests/test_utf8.po 2011-08-01 18:45:10.000000000 +0200 +++ new/polib-1.0.1/tests/test_utf8.po 2012-09-11 10:13:42.000000000 +0200 @@ -57,6 +57,7 @@ msgid "Some msgid" msgstr "" +## Some comment starting with two '#' #: db/models/manipulators.py:309 #, python-format msgid "%(object)s with this %(type)s already exists for the given %(field)s." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polib-1.0.0/tests/tests.py new/polib-1.0.1/tests/tests.py --- old/polib-1.0.0/tests/tests.py 2012-06-08 18:54:34.000000000 +0200 +++ new/polib-1.0.1/tests/tests.py 2012-09-11 10:13:12.000000000 +0200 @@ -501,6 +501,11 @@ self.assertNotEqual(po.metadata, {}) self.assertEqual(po.metadata['Content-Type'], 'text/plain; charset=UTF-8') + def test_comment_starting_with_two_hashes(self): + po = polib.pofile('tests/test_utf8.po') + e = po.find("Some comment starting with two '#'", by='tcomment') + self.assertTrue(isinstance(e, polib.POEntry)) + class TestMoFile(unittest.TestCase): """ Tests for MoFile class. -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org