Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2020-12-04 21:29:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Fri Dec 4 21:29:22 2020 rev:51 rq:853115 version:5.0.30 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2020-11-12 22:45:48.938544140 +0100 +++ /work/SRC/openSUSE:Factory/.trytond.new.5913/trytond.changes 2020-12-04 21:29:23.714202944 +0100 @@ -1,0 +2,5 @@ +Fri Dec 4 14:05:26 UTC 2020 - Axel Braun <[email protected]> + +- Version 5.0.30 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond-5.0.29.tar.gz New: ---- trytond-5.0.30.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.UOJyfu/_old 2020-12-04 21:29:24.442203988 +0100 +++ /var/tmp/diff_new_pack.UOJyfu/_new 2020-12-04 21:29:24.442203988 +0100 @@ -20,7 +20,7 @@ %define majorver 5.0 %define base_name tryton Name: trytond -Version: %{majorver}.29 +Version: %{majorver}.30 Release: 0 Summary: An Enterprise Resource Planning (ERP) system License: GPL-3.0-or-later ++++++ trytond-5.0.29.tar.gz -> trytond-5.0.30.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.29/.hgtags new/trytond-5.0.30/.hgtags --- old/trytond-5.0.29/.hgtags 2020-11-11 15:52:13.000000000 +0100 +++ new/trytond-5.0.30/.hgtags 2020-12-02 19:19:09.000000000 +0100 @@ -48,3 +48,4 @@ b945fb11b072406345e2dc7d50d6ac858e1fc203 5.0.27 98a6cfc5d5c70fad5c3e7b089bc5f233d1786f66 5.0.28 371b309731c3b9d3ba84622a652fecd27539f9dd 5.0.29 +0b23f3ed8c1c099bdf64733bafd29e873b801a5a 5.0.30 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.29/CHANGELOG new/trytond-5.0.30/CHANGELOG --- old/trytond-5.0.29/CHANGELOG 2020-11-11 15:52:12.000000000 +0100 +++ new/trytond-5.0.30/CHANGELOG 2020-12-02 19:19:08.000000000 +0100 @@ -1,3 +1,6 @@ +Version 5.0.30 - 2020-12-02 +* Bug fixes (see mercurial logs for details) + Version 5.0.29 - 2020-11-11 * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.29/PKG-INFO new/trytond-5.0.30/PKG-INFO --- old/trytond-5.0.29/PKG-INFO 2020-11-11 15:52:15.000000000 +0100 +++ new/trytond-5.0.30/PKG-INFO 2020-12-02 19:19:11.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 5.0.29 +Version: 5.0.30 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.29/trytond/__init__.py new/trytond-5.0.30/trytond/__init__.py --- old/trytond-5.0.29/trytond/__init__.py 2020-10-18 20:28:32.000000000 +0200 +++ new/trytond-5.0.30/trytond/__init__.py 2020-11-11 15:52:27.000000000 +0100 @@ -5,7 +5,7 @@ import warnings from email import charset -__version__ = "5.0.29" +__version__ = "5.0.30" os.environ['TZ'] = 'UTC' if hasattr(time, 'tzset'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.29/trytond/bus.py new/trytond-5.0.30/trytond/bus.py --- old/trytond-5.0.29/trytond/bus.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.30/trytond/bus.py 2020-11-29 17:41:36.000000000 +0100 @@ -4,6 +4,7 @@ import collections import json import logging +import os import select import threading import time @@ -35,7 +36,7 @@ def __init__(self, timeout): super().__init__() - self._lock = threading.Lock() + self._lock = collections.defaultdict(threading.Lock) self._timeout = timeout self._messages = [] @@ -65,7 +66,7 @@ if first_message and not found: message = first_message - with self._lock: + with self._lock[os.getpid()]: del self._messages[:to_delete_index] return message.channel, message.content @@ -74,20 +75,21 @@ class LongPollingBus: _channel = 'bus' - _queues_lock = threading.Lock() + _queues_lock = collections.defaultdict(threading.Lock) _queues = collections.defaultdict( lambda: {'timeout': None, 'events': collections.defaultdict(list)}) _messages = {} @classmethod def subscribe(cls, database, channels, last_message=None): - with cls._queues_lock: - start_listener = database not in cls._queues - cls._queues[database]['timeout'] = time.time() + _db_timeout + pid = os.getpid() + with cls._queues_lock[pid]: + start_listener = (pid, database) not in cls._queues + cls._queues[pid, database]['timeout'] = time.time() + _db_timeout if start_listener: listener = threading.Thread( target=cls._listen, args=(database,), daemon=True) - cls._queues[database]['listener'] = listener + cls._queues[pid, database]['listener'] = listener listener.start() messages = cls._messages.get(database) @@ -98,11 +100,12 @@ event = threading.Event() for channel in channels: - if channel in cls._queues[database]['events']: - event_channel = cls._queues[database]['events'][channel] + if channel in cls._queues[pid, database]['events']: + event_channel = cls._queues[pid, database]['events'][channel] else: - with cls._queues_lock: - event_channel = cls._queues[database]['events'][channel] + with cls._queues_lock[pid]: + event_channel = cls._queues[pid, database][ + 'events'][channel] event_channel.append(event) triggered = event.wait(_long_polling_timeout) @@ -112,9 +115,9 @@ response = cls.create_response( *cls._messages[database].get_next(channels, last_message)) - with cls._queues_lock: + with cls._queues_lock[pid]: for channel in channels: - events = cls._queues[database]['events'][channel] + events = cls._queues[pid, database]['events'][channel] for e in events[:]: if e.is_set(): events.remove(e) @@ -139,6 +142,7 @@ logger.info("listening on channel '%s'", cls._channel) conn = db.get_connection() + pid = os.getpid() try: cursor = conn.cursor() cursor.execute('LISTEN "%s"' % cls._channel) @@ -147,7 +151,7 @@ cls._messages[database] = messages = _MessageQueue(_cache_timeout) now = time.time() - while cls._queues[database]['timeout'] > now: + while cls._queues[pid, database]['timeout'] > now: readable, _, _ = select.select([conn], [], [], _select_timeout) if not readable: continue @@ -162,10 +166,10 @@ message = payload['message'] messages.append(channel, message) - with cls._queues_lock: - events = \ - cls._queues[database]['events'][channel].copy() - cls._queues[database]['events'][channel].clear() + with cls._queues_lock[pid]: + events = cls._queues[pid, database][ + 'events'][channel].copy() + cls._queues[pid, database]['events'][channel].clear() for event in events: event.set() now = time.time() @@ -173,20 +177,20 @@ logger.error('bus listener on "%s" crashed', database, exc_info=True) - with cls._queues_lock: - del cls._queues[database] + with cls._queues_lock[pid]: + del cls._queues[pid, database] raise finally: db.put_connection(conn) - with cls._queues_lock: - if cls._queues[database]['timeout'] <= now: - del cls._queues[database] + with cls._queues_lock[pid]: + if cls._queues[pid, database]['timeout'] <= now: + del cls._queues[pid, database] else: # A query arrived between the end of the while and here listener = threading.Thread( target=cls._listen, args=(database,), daemon=True) - cls._queues[database]['listener'] = listener + cls._queues[pid, database]['listener'] = listener listener.start() @classmethod diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.29/trytond/tests/test_bus.py new/trytond-5.0.30/trytond/tests/test_bus.py --- old/trytond-5.0.29/trytond/tests/test_bus.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.30/trytond/tests/test_bus.py 2020-11-29 17:41:36.000000000 +0100 @@ -1,5 +1,6 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. +import os import time import unittest from unittest.mock import patch @@ -95,10 +96,11 @@ setattr, bus, '_select_timeout', reset_select_timeout) def tearDown(self): - if DB_NAME in Bus._queues: - with Bus._queues_lock: - Bus._queues[DB_NAME]['timeout'] = 0 - listener = Bus._queues[DB_NAME]['listener'] + pid = os.getpid() + if (pid, DB_NAME) in Bus._queues: + with Bus._queues_lock[pid]: + Bus._queues[pid, DB_NAME]['timeout'] = 0 + listener = Bus._queues[pid, DB_NAME]['listener'] listener.join() Bus._messages.clear() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.29/trytond.egg-info/PKG-INFO new/trytond-5.0.30/trytond.egg-info/PKG-INFO --- old/trytond-5.0.29/trytond.egg-info/PKG-INFO 2020-11-11 15:52:14.000000000 +0100 +++ new/trytond-5.0.30/trytond.egg-info/PKG-INFO 2020-12-02 19:19:10.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 5.0.29 +Version: 5.0.30 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
