Bug #17336

[Translation Platform] Update to Debian Buster

Added by hefee 2019-12-12 16:41:27 . Updated 2020-04-02 18:10:09 .

Status:
Confirmed
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
Due date:
% Done:

0%

Feature Branch:
Type of work:
Sysadmin
Blueprint:

Starter:
Affected tool:
Translation Platform
Deliverable for:

Description

Currently we are running a Stretch system on the Translation Platform. We should update this to current stable aka Buster. This should give us the opportunity to use more python packages from Debian and not install them via pip.


Subtasks


History

#1 Updated by intrigeri 2019-12-12 17:37:33

  • Description updated

#2 Updated by intrigeri 2019-12-14 08:09:02

  • Subject changed from [Translation Platform] Update Debian version to [Translation Platform] Update to Debian Buster

#3 Updated by zen 2020-04-02 18:10:09

One more reason to upgrade to Buster is that Python 3.5.3 has a harmless heisenbug (fixed in 3.5.4) that spews messages like these:

Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f32cd648268>                                                                                                
Traceback (most recent call last):                                                                                                                                                             
  File "/usr/lib/python3.5/weakref.py", line 117, in remove                                                                                                                                    
TypeError: 'NoneType' object is not callable                                                                                                                                                   
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f32cd648268>                                                                                                
Traceback (most recent call last):                                                                                                                                                             
  File "/usr/lib/python3.5/weakref.py", line 117, in remove                                                                                                                                    
TypeError: 'NoneType' object is not callable    

Our Python scripts are run every 5min and sometimes our Inbox is flooded with messages like these.

This was the fix made in Python’s weakref library:

--- weakref.py  2020-04-02 14:54:11.515590183 -0300
+++ weakref.fixed.py    2020-04-02 14:54:18.243620589 -0300
@@ -106,7 +106,7 @@
         self, *args = args
         if len(args) > 1:
             raise TypeError('expected at most 1 arguments, got %d' % len(args))
-        def remove(wr, selfref=ref(self)):
+        def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
             self = selfref()
             if self is not None:
                 if self._iterating:
@@ -114,7 +114,7 @@
                 else:
                     # Atomic removal is necessary since this function
                     # can be called asynchronously by the GC
-                    _remove_dead_weakref(d, wr.key)
+                    _atomic_removal(d, wr.key)
         self._remove = remove
         # A list of keys to be removed
         self._pending_removals = []