1. 08 Aug, 2020 1 commit
  2. 07 Aug, 2020 11 commits
  3. 06 Aug, 2020 2 commits
    • Zen Fu's avatar
      Improve speed of Python package check · 94a4ec59
      Zen Fu authored
      Each invocation of pip3 show takes ~1.5s, and the previous
      implementation called pip3 twice for checking the package version. This
      change should have a significant impact in the time taken to run the
      catalog in translate.lizard.
      94a4ec59
    • Zen Fu's avatar
      Allow for uninstalling Python packages using pip · fd7f4568
      Zen Fu authored
      This will be useful when packages are not needed anymore (for example,
      when newer versions of some packages cease to depend on something).
      fd7f4568
  4. 05 Aug, 2020 12 commits
  5. 04 Aug, 2020 1 commit
  6. 28 Jul, 2020 1 commit
    • Zen Fu's avatar
      Patch Python's weakref module in translation platform · f4de4bf5
      Zen Fu 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
  7. 24 Jul, 2020 5 commits
  8. 23 Jul, 2020 5 commits
  9. 22 Jul, 2020 2 commits