1. 28 Jul, 2020 1 commit
    • zen's avatar
      Patch Python's weakref module in translation platform · f4de4bf5
      zen authored
      This is an ugly workaround to get rid of noise in tails-translations
      mailing list.
      
      The Python version in Debian Stretch has a bug that leaks memory in some
      situations and will spit out the following error:
      
      ------------------------------------------------------------------------------
      Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7fe488c03048>
      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 0x7fe488c03048>
      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 0x7f69c5515ea0>
      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 0x7f69c5515ea0>
      Traceback (most recent call last):
        File "/usr/lib/python3.5/weakref.py", line 117, in remove
      TypeError: 'NoneType' object is not callable
      ------------------------------------------------------------------------------
      
      As our scripts run frequently, we are getting many e-mails that are
      actually false positives.
      
      The differences from the original file are:
      
      ------------------------------------------------------------------------------
      --- weakref.py  2020-07-28 22:54:59.837435324 +0000
      +++ /usr/lib/python3.5/weakref.py       2020-07-09 13:00:10.000000000 +0000
      @@ -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), _atomic_removal=_remove_dead_weakref):
      +        def remove(wr, selfref=ref(self)):
                   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
      -                    _atomic_removal(d, wr.key)
      +                    _remove_dead_weakref(d, wr.key)
               self._remove = remove
               # A list of keys to be removed
               self._pending_removals = []
      ------------------------------------------------------------------------------
      
      See the following links for more context:
      
          https://helpdesk.tetrane.com/hc/en-us/articles/360034629091-I-am-getting-exceptions-from-usr-lib-python3-5-weakref-py-is-it-an-issue-
          https://bugs.python.org/issue29519
      
      This will have to be removed once the machine is upgraded to a newer
      Debian version.
      f4de4bf5
  2. 24 Jul, 2020 5 commits
  3. 23 Jul, 2020 5 commits
  4. 22 Jul, 2020 3 commits
  5. 18 Jul, 2020 1 commit
  6. 12 Jul, 2020 1 commit
  7. 10 Jul, 2020 2 commits
  8. 09 Jul, 2020 1 commit
  9. 08 Jul, 2020 1 commit
  10. 03 Jul, 2020 7 commits
  11. 27 Jun, 2020 3 commits
  12. 26 Jun, 2020 1 commit
  13. 23 Jun, 2020 1 commit
  14. 15 Jun, 2020 8 commits