Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2022-05-02 16:26:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Mon May 2 16:26:06 2022 rev:69 rq:974401 version:6.0.18 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2022-04-20 16:57:48.154649533 +0200 +++ /work/SRC/openSUSE:Factory/.trytond.new.1538/trytond.changes 2022-05-02 16:26:34.716905528 +0200 @@ -1,0 +2,5 @@ +Mon Apr 25 10:42:26 UTC 2022 - Axel Braun <axel.br...@gmx.de> + +- Version 6.0.18 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond-6.0.17.tar.gz trytond-6.0.17.tar.gz.asc New: ---- trytond-6.0.18.tar.gz trytond-6.0.18.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.Wq3xV7/_old 2022-05-02 16:26:35.272906146 +0200 +++ /var/tmp/diff_new_pack.Wq3xV7/_new 2022-05-02 16:26:35.276906151 +0200 @@ -20,7 +20,7 @@ %define majorver 6.0 %define base_name tryton Name: trytond -Version: %{majorver}.17 +Version: %{majorver}.18 Release: 0 Summary: An Enterprise Resource Planning (ERP) system License: GPL-3.0-or-later ++++++ trytond-6.0.17.tar.gz -> trytond-6.0.18.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/.hgtags new/trytond-6.0.18/.hgtags --- old/trytond-6.0.17/.hgtags 2022-04-15 21:18:19.000000000 +0200 +++ new/trytond-6.0.18/.hgtags 2022-04-23 17:08:19.000000000 +0200 @@ -41,3 +41,4 @@ 26fba5237ff3ec9aed2d8aebdc1115e595e76c0b 6.0.15 c4cf78bb401aec7d52a007eb7bda958658edaf95 6.0.16 246ad7a2addde11a7b3e828ace36cf5fb1bc6696 6.0.17 +ca63f7f2eef1998de82eae76636c00211f0e3a80 6.0.18 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/CHANGELOG new/trytond-6.0.18/CHANGELOG --- old/trytond-6.0.17/CHANGELOG 2022-04-15 21:18:18.000000000 +0200 +++ new/trytond-6.0.18/CHANGELOG 2022-04-23 17:08:19.000000000 +0200 @@ -1,3 +1,6 @@ +Version 6.0.18 - 2022-04-23 +* Bug fixes (see mercurial logs for details) + Version 6.0.17 - 2022-04-15 * Bug fixes (see mercurial logs for details) * Add support for werkzeug 2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/PKG-INFO new/trytond-6.0.18/PKG-INFO --- old/trytond-6.0.17/PKG-INFO 2022-04-15 21:18:23.222398000 +0200 +++ new/trytond-6.0.18/PKG-INFO 2022-04-23 17:08:22.776352400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 6.0.17 +Version: 6.0.18 Summary: Tryton server Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/6.0/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond/__init__.py new/trytond-6.0.18/trytond/__init__.py --- old/trytond-6.0.17/trytond/__init__.py 2022-04-14 23:25:02.000000000 +0200 +++ new/trytond-6.0.18/trytond/__init__.py 2022-04-15 21:18:42.000000000 +0200 @@ -7,7 +7,7 @@ from lxml import etree, objectify -__version__ = "6.0.17" +__version__ = "6.0.18" os.environ['TZ'] = 'UTC' if hasattr(time, 'tzset'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond/cron.py new/trytond-6.0.18/trytond/cron.py --- old/trytond-6.0.17/trytond/cron.py 2022-04-14 23:25:02.000000000 +0200 +++ new/trytond-6.0.18/trytond/cron.py 2022-04-22 18:53:18.000000000 +0200 @@ -5,6 +5,7 @@ import logging from trytond.pool import Pool +from trytond.transaction import Transaction __all__ = ['run'] logger = logging.getLogger(__name__) @@ -27,7 +28,11 @@ logger.info( 'skip "%s" as previous cron still running', db_name) continue + database_list = Pool.database_list() pool = Pool(db_name) + if db_name not in database_list: + with Transaction().start(db_name, 0, readonly=True): + pool.init() Cron = pool.get('ir.cron') thread = threading.Thread( target=Cron.run, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond/model/fields/dict.py new/trytond-6.0.18/trytond/model/fields/dict.py --- old/trytond-6.0.17/trytond/model/fields/dict.py 2022-04-14 23:25:02.000000000 +0200 +++ new/trytond-6.0.18/trytond/model/fields/dict.py 2022-04-22 18:53:18.000000000 +0200 @@ -14,7 +14,8 @@ # Use canonical form dumps = partial( - json.dumps, cls=JSONEncoder, separators=(',', ':'), sort_keys=True) + json.dumps, cls=JSONEncoder, separators=(',', ':'), sort_keys=True, + ensure_ascii=False) class ImmutableDict(dict): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond/model/tree.py new/trytond-6.0.18/trytond/model/tree.py --- old/trytond-6.0.17/trytond/model/tree.py 2022-04-14 23:25:02.000000000 +0200 +++ new/trytond-6.0.18/trytond/model/tree.py 2022-04-22 18:53:18.000000000 +0200 @@ -3,6 +3,8 @@ from itertools import chain from trytond.i18n import gettext +from trytond.tools import escape_wildcard + from .modelstorage import ValidationError @@ -19,7 +21,8 @@ def __setup__(cls): super(TreeMixin, cls).__setup__() field = getattr(cls, name) - clause = (name, 'not like', '%' + separator + '%') + clause = ( + name, 'not like', '%' + escape_wildcard(separator) + '%') # If TreeMixin is after the class where name is defined in # __mro__, it modifies the base field copied so it must ensure # to add only once the domain diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond/tests/test_tree.py new/trytond-6.0.18/trytond/tests/test_tree.py --- old/trytond-6.0.17/trytond/tests/test_tree.py 2022-04-14 23:25:02.000000000 +0200 +++ new/trytond-6.0.18/trytond/tests/test_tree.py 2022-04-22 18:53:18.000000000 +0200 @@ -27,6 +27,15 @@ record.save() @with_transaction() + def test_name_domain_wildcard(self): + "Test name domain on tree with wildcard" + pool = Pool() + Tree = pool.get('test.tree_wildcard') + + record = Tree(name="test 10%") + record.save() + + @with_transaction() def test_rec_name(self): "Test rec_name" pool = Pool() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond/tests/test_wsgi.py new/trytond-6.0.18/trytond/tests/test_wsgi.py --- old/trytond-6.0.17/trytond/tests/test_wsgi.py 2022-04-14 23:27:07.000000000 +0200 +++ new/trytond-6.0.18/trytond/tests/test_wsgi.py 2022-04-22 18:34:07.000000000 +0200 @@ -33,7 +33,7 @@ sentinel.request = request raise exception - client = Client(app) + client = Client(app, Response) _ = client.get('/willfail') spy.assert_called_once_with(app, sentinel.request, exception) @@ -59,7 +59,7 @@ sentinel.request = request raise exception - client = Client(app) + client = Client(app, Response) _ = client.get('/willfail') spy1.assert_called_once_with(app, sentinel.request, exception) @@ -83,7 +83,7 @@ sentinel.request = request raise exception - client = Client(app) + client = Client(app, Response) _ = client.get('/willfail') spy.assert_called_once_with(app, sentinel.request, exception) @@ -104,7 +104,7 @@ def _route(request): raise self.TestException('foo') - client = Client(app) + client = Client(app, Response) response = client.get('/willfail') self.assertEqual(next(response.response), b'baz') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond/tests/tree.py new/trytond-6.0.18/trytond/tests/tree.py --- old/trytond-6.0.17/trytond/tests/tree.py 2021-05-03 16:34:50.000000000 +0200 +++ new/trytond-6.0.18/trytond/tests/tree.py 2022-04-22 18:53:18.000000000 +0200 @@ -12,6 +12,13 @@ parent = fields.Many2One('test.tree', "Parent") +class TreeWildcard(tree(separator='\\'), ModelSQL): + "Tree separator wildcard" + __name__ = 'test.tree_wildcard' + name = fields.Char("Name") + parent = fields.Many2One('test.tree_wildcard', "Parent") + + class Polytree(tree(parent='parents'), ModelSQL): "PolyTree" __name__ = 'test.polytree' @@ -30,6 +37,7 @@ def register(module): Pool.register( Tree, + TreeWildcard, Polytree, PolytreeEdge, module=module, type_='model') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond/worker.py new/trytond-6.0.18/trytond/worker.py --- old/trytond-6.0.17/trytond/worker.py 2022-04-14 23:25:02.000000000 +0200 +++ new/trytond-6.0.18/trytond/worker.py 2022-04-22 18:53:18.000000000 +0200 @@ -21,19 +21,22 @@ class Queue(object): - def __init__(self, pool, mpool): - self.database = backend.Database(pool.database_name).connect() + def __init__(self, database_name, mpool): + self.database = backend.Database(database_name).connect() self.connection = self.database.get_connection(autocommit=True) - self.pool = pool self.mpool = mpool def pull(self, name=None): - Queue = self.pool.get('ir.queue') + database_list = Pool.database_list() + pool = Pool(self.database.name) + if self.database.name not in database_list: + with Transaction().start(self.database.name, 0, readonly=True): + pool.init() + Queue = pool.get('ir.queue') return Queue.pull(self.database, self.connection, name=name) def run(self, task_id): - return self.mpool.apply_async( - run_task, (self.pool.database_name, task_id)) + return self.mpool.apply_async(run_task, (self.database.name, task_id)) class TaskList(list): @@ -54,8 +57,9 @@ processes = 1 logger.info("start %d workers", processes) mpool = MPool( - processes, initializer, (options,), options.maxtasksperchild) - queues = [Queue(pool, mpool) for pool in initializer(options, False)] + processes, initializer, (options.database_names,), + options.maxtasksperchild) + queues = [Queue(name, mpool) for name in options.database_names] tasks = TaskList() timeout = options.timeout @@ -81,12 +85,12 @@ mpool.close() -def initializer(options, worker=True): +def initializer(database_names, worker=True): if worker: signal.signal(signal.SIGINT, signal.SIG_IGN) pools = [] database_list = Pool.database_list() - for database_name in options.database_names: + for database_name in database_names: pool = Pool(database_name) if database_name not in database_list: with Transaction().start(database_name, 0, readonly=True): @@ -97,7 +101,11 @@ def run_task(pool, task_id): if not isinstance(pool, Pool): + database_list = Pool.database_list() pool = Pool(pool) + if pool.database_name not in database_list: + with Transaction().start(pool.database_name, 0, readonly=True): + pool.init() Queue = pool.get('ir.queue') name = '<Task %s@%s>' % (task_id, pool.database_name) logger.info('%s started', name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.17/trytond.egg-info/PKG-INFO new/trytond-6.0.18/trytond.egg-info/PKG-INFO --- old/trytond-6.0.17/trytond.egg-info/PKG-INFO 2022-04-15 21:18:21.000000000 +0200 +++ new/trytond-6.0.18/trytond.egg-info/PKG-INFO 2022-04-23 17:08:21.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 6.0.17 +Version: 6.0.18 Summary: Tryton server Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/6.0/