Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package trytond for openSUSE:Factory checked 
in at 2024-01-03 12:25:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond (Old)
 and      /work/SRC/openSUSE:Factory/.trytond.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond"

Wed Jan  3 12:25:56 2024 rev:90 rq:1135782 version:6.0.39

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond/trytond.changes  2023-11-20 
21:19:50.343445183 +0100
+++ /work/SRC/openSUSE:Factory/.trytond.new.28375/trytond.changes       
2024-01-03 12:26:01.689757556 +0100
@@ -1,0 +2,5 @@
+Sat Dec 23 17:52:24 UTC 2023 - Axel Braun <axel.br...@gmx.de>
+
+- Version 6.0.39 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond-6.0.38.tar.gz
  trytond-6.0.38.tar.gz.asc

New:
----
  trytond-6.0.39.tar.gz
  trytond-6.0.39.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ trytond.spec ++++++
--- /var/tmp/diff_new_pack.O8GI4F/_old  2024-01-03 12:26:02.545788834 +0100
+++ /var/tmp/diff_new_pack.O8GI4F/_new  2024-01-03 12:26:02.545788834 +0100
@@ -20,7 +20,7 @@
 %define majorver 6.0
 %define base_name tryton
 Name:           trytond
-Version:        %{majorver}.38
+Version:        %{majorver}.39
 Release:        0
 Summary:        An Enterprise Resource Planning (ERP) system
 License:        GPL-3.0-or-later

++++++ trytond-6.0.38.tar.gz -> trytond-6.0.39.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/CHANGELOG new/trytond-6.0.39/CHANGELOG
--- old/trytond-6.0.38/CHANGELOG        2023-11-17 19:32:53.000000000 +0100
+++ new/trytond-6.0.39/CHANGELOG        2023-12-16 10:51:10.000000000 +0100
@@ -1,4 +1,9 @@
 
+Version 6.0.39 - 2023-12-16
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
 Version 6.0.38 - 2023-11-17
 ---------------------------
 * Bug fixes (see mercurial logs for details)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/PKG-INFO new/trytond-6.0.39/PKG-INFO
--- old/trytond-6.0.38/PKG-INFO 2023-11-17 19:32:56.021417000 +0100
+++ new/trytond-6.0.39/PKG-INFO 2023-12-16 10:51:13.427918400 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond
-Version: 6.0.38
+Version: 6.0.39
 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.38/trytond/__init__.py 
new/trytond-6.0.39/trytond/__init__.py
--- old/trytond-6.0.38/trytond/__init__.py      2023-11-03 17:46:52.000000000 
+0100
+++ new/trytond-6.0.39/trytond/__init__.py      2023-11-17 19:33:10.000000000 
+0100
@@ -7,7 +7,7 @@
 
 from lxml import etree, objectify
 
-__version__ = "6.0.38"
+__version__ = "6.0.39"
 
 os.environ['TZ'] = 'UTC'
 if hasattr(time, 'tzset'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/trytond/cache.py 
new/trytond-6.0.39/trytond/cache.py
--- old/trytond-6.0.38/trytond/cache.py 2023-05-17 23:03:30.000000000 +0200
+++ new/trytond-6.0.39/trytond/cache.py 2023-12-10 13:51:29.000000000 +0100
@@ -136,7 +136,7 @@
     A key value LRU cache with size limit.
     """
     _reset = WeakKeyDictionary()
-    _clean_last = datetime.now()
+    _clean_last = None
     _default_lower = Transaction.monotonic_time()
     _listener = {}
     _listener_lock = defaultdict(threading.Lock)
@@ -208,6 +208,10 @@
 
     @classmethod
     def sync(cls, transaction):
+        if cls._clean_last is None:
+            cls._clean_last = dt.datetime.now()
+            return
+
         database = transaction.database
         dbname = database.name
         if not _clear_timeout and database.has_channel():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/trytond/config.py 
new/trytond-6.0.39/trytond/config.py
--- old/trytond-6.0.38/trytond/config.py        2023-05-17 23:03:30.000000000 
+0200
+++ new/trytond-6.0.39/trytond/config.py        2023-12-10 13:52:44.000000000 
+0100
@@ -1,13 +1,10 @@
 # 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 __main__ as main
 import configparser
 import logging
 import os
 import urllib.parse
 
-from . import status
-
 __all__ = ['config', 'get_hostname', 'get_port', 'split_netloc',
     'parse_listen', 'parse_uri']
 logger = logging.getLogger(__name__)
@@ -159,6 +156,3 @@
 
 
 config = TrytonConfigParser()
-
-if os.path.basename(getattr(main, '__file__', '')) != 'trytond-stat':
-    status.start(config.get('database', 'path'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/trytond/ir/model.py 
new/trytond-6.0.39/trytond/ir/model.py
--- old/trytond-6.0.38/trytond/ir/model.py      2023-05-17 23:03:30.000000000 
+0200
+++ new/trytond-6.0.39/trytond/ir/model.py      2023-12-10 14:06:53.000000000 
+0100
@@ -1537,10 +1537,12 @@
             state_field = getattr(Model, Model._transition_state)
             for state, _ in state_field.selection:
                 node = pydot.Node(
-                    '"%s"' % state, shape='octagon', label=state)
+                    f'"{record.model}--{state}"', shape='octagon', label=state)
                 subgraph.add_node(node)
 
             for from_, to in Model._transitions:
-                edge = pydot.Edge('"%s"' % from_, '"%s"' % to,
-                    arrowhead='normal')
+                edge = pydot.Edge(
+                        f'"{record.model}--{from_}"',
+                        f'"{record.model}--{to}"',
+                        arrowhead='normal')
                 subgraph.add_edge(edge)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/trytond/model/modelsql.py 
new/trytond-6.0.39/trytond/model/modelsql.py
--- old/trytond-6.0.38/trytond/model/modelsql.py        2023-08-26 
09:16:53.000000000 +0200
+++ new/trytond-6.0.39/trytond/model/modelsql.py        2023-12-10 
13:39:54.000000000 +0100
@@ -1372,8 +1372,14 @@
                 return row['_datetime'], row['__id']
 
             ids_history = {}
+            create_dates = {}
             for row in rows:
                 key = history_key(row)
+                if row['id'] in create_dates:
+                    if row['_datetime'] < create_dates[row['id']]:
+                        create_dates[row['id']] = row['_datetime']
+                else:
+                    create_dates[row['id']] = row['_datetime']
                 if row['id'] in ids_history:
                     if key < ids_history[row['id']]:
                         continue
@@ -1382,23 +1388,31 @@
             to_delete = set()
             history = cls.__table_history__()
             for sub_ids in grouped_slice([r['id'] for r in rows]):
+                sub_ids = list(sub_ids)
                 where = reduce_ids(history.id, sub_ids)
+                min_date = min(create_dates[r_id] for r_id in sub_ids)
                 cursor.execute(*history.select(
                         history.id.as_('id'),
                         history.write_date.as_('write_date'),
+                        (history.create_date == Null).as_('deleted'),
                         where=where
                         & (history.write_date != Null)
-                        & (history.create_date == Null)
+                        & (Coalesce(history.write_date, history.create_date)
+                            >= min_date)
                         & (history.write_date
                             <= transaction.context['_datetime'])))
-                for deleted_id, delete_date in cursor:
-                    history_date, _ = ids_history[deleted_id]
+                for h_id, write_date, deleted in cursor:
+                    if h_id in to_delete:
+                        continue
+                    history_date, _ = ids_history[h_id]
                     if isinstance(history_date, str):
                         strptime = datetime.datetime.strptime
                         format_ = '%Y-%m-%d %H:%M:%S.%f'
                         history_date = strptime(history_date, format_)
-                    if history_date <= delete_date:
-                        to_delete.add(deleted_id)
+                    if history_date < write_date:
+                        to_delete.add(h_id)
+                    elif history_date == write_date and deleted:
+                        to_delete.add(h_id)
 
             return filter(lambda r: history_key(r) == ids_history[r['id']]
                 and r['id'] not in to_delete, rows)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/trytond/status.py 
new/trytond-6.0.39/trytond/status.py
--- old/trytond-6.0.38/trytond/status.py        2023-05-17 23:03:30.000000000 
+0200
+++ new/trytond-6.0.39/trytond/status.py        2023-12-10 13:49:07.000000000 
+0100
@@ -9,6 +9,8 @@
 from collections import namedtuple
 from contextlib import contextmanager
 
+from trytond.config import config
+
 status = dict()
 logger = logging.getLogger(__name__)
 address = 'trytond-stat.socket'
@@ -16,13 +18,12 @@
 Process = namedtuple('Process', ['start_time', 'request'])
 
 _PID = None
-_PATH = None
 _LOCK = threading.Lock()
 
 
 @contextmanager
 def processing(request):
-    start(_PATH)  # check if running thread
+    start()  # check if running thread
     process = Process(time.perf_counter(), request)
     status[id(process)] = process
     try:
@@ -73,17 +74,17 @@
             time.sleep(60)
 
 
-def start(path):
-    global _PID, _PATH
+def start():
+    global _PID
     if not hasattr(socket, 'AF_UNIX'):
         return
-    if _PID != os.getpid() and path:  # Quick test without lock
+    if _PID != os.getpid():  # Quick test without lock
         with _LOCK:
             if _PID != os.getpid():
+                path = config.get('database', 'path')
                 threading.Thread(
                     target=dumper, args=(path,), daemon=True).start()
                 _PID = os.getpid()
-                _PATH = path
 
 
 def listen(path, callback=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/trytond/tests/test_tryton.py 
new/trytond-6.0.39/trytond/tests/test_tryton.py
--- old/trytond-6.0.38/trytond/tests/test_tryton.py     2023-11-15 
18:05:53.000000000 +0100
+++ new/trytond-6.0.39/trytond/tests/test_tryton.py     2023-12-10 
13:48:13.000000000 +0100
@@ -2,6 +2,7 @@
 # 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 doctest
+import hashlib
 import inspect
 import operator
 import os
@@ -112,7 +113,8 @@
 
 
 def _db_cache_file(path, name):
-    return os.path.join(path, '%s-%s.dump' % (name, backend.name))
+    hash_name = hashlib.shake_128(name.encode('utf8')).hexdigest(40 // 2)
+    return os.path.join(path, '%s-%s.dump' % (hash_name, backend.name))
 
 
 def _sqlite_copy(file_, restore=False):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.38/trytond.egg-info/PKG-INFO 
new/trytond-6.0.39/trytond.egg-info/PKG-INFO
--- old/trytond-6.0.38/trytond.egg-info/PKG-INFO        2023-11-17 
19:32:55.000000000 +0100
+++ new/trytond-6.0.39/trytond.egg-info/PKG-INFO        2023-12-16 
10:51:12.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond
-Version: 6.0.38
+Version: 6.0.39
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Download-URL: http://downloads.tryton.org/6.0/

Reply via email to