Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Showstopper: Commit 32259ce4491 (lru-cache.py) breaks kopano-search and pyko with python 2.6

    Kopano Groupware Core
    bug core 8.3.0 pyko python 2.6
    3
    5
    1640
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • umgfoin
      umgfoin last edited by

      Recent changes to pyko break compatibility with python 2.6:
      Thus, kopano-search refuses to start, python-kopano scripts are entirely broken.

      General question:
      Is python 2.6 still a supported target for kopano 8.3.0 ?

      Unfixed issue item.py/ PR_TRANSPORT_MESSAGE_HEADERS is presumably 2.6-incompatibility related, too (and btw. can cause severe data-loss with shipped pyko scripts).

      Starting kopano-search: Traceback (most recent call last):
        File "/usr/sbin/kopano-search", line 3, in <module>
          import kopano_search
        File "/usr/lib/python2.6/site-packages/kopano_search/__init__.py", line 20, in <module>
          import kopano
        File "/usr/lib/python2.6/site-packages/kopano/__init__.py", line 51, in <module>
          from .config import Config, CONFIG
        File "/usr/lib/python2.6/site-packages/kopano/config.py", line 10, in <module>
          from .compat import decode as _decode
        File "/usr/lib/python2.6/site-packages/kopano/compat.py", line 16, in <module>
          from .lru_cache import lru_cache
        File "/usr/lib/python2.6/site-packages/kopano/lru_cache.py", line 28
          fasttypes = {int, str, frozenset, type(None)},
                          ^
      SyntaxError: invalid syntax
      [FEHLGESCHLAGEN]
      

      Reason:
      We have no set literals in Python 2.6 as used in lru_cache.py:

      def _make_key(args, kwds, typed,
                   kwd_mark = (object(),),
                   fasttypes = {int, str, frozenset, type(None)},
                   sorted=sorted, tuple=tuple, type=type, len=len):
      

      needs to be changed to:

      def _make_key(args, kwds, typed,
                   kwd_mark = (object(),),
                   fasttypes = set([int, str, frozenset, type(None)]),
                   sorted=sorted, tuple=tuple, type=type, len=len):
      

      verified on Python 2.6.6 /CentOS 6.8
      core-8.3.0~849_108.1

      bg,
      umgfoin.

      bosim 1 Reply Last reply Reply Quote 1
      • bosim
        bosim @umgfoin last edited by

        Hi

        @umgfoin said in Showstopper: Commit 32259ce4491 (lru-cache.py) breaks kopano-search and pyko with python 2.6:

        needs to be changed to:

        def _make_key(args, kwds, typed,
                     kwd_mark = (object(),),
                     fasttypes = set([int, str, frozenset, type(None)]),
                     sorted=sorted, tuple=tuple, type=type, len=len):
        

        verified on Python 2.6.6 /CentOS 6.8
        core-8.3.0~849_108.1

        Thanks for your report, will make a pull request right away to get it fixed.

        Bo

        umgfoin 1 Reply Last reply Reply Quote 0
        • umgfoin
          umgfoin @bosim last edited by

          @bosim
          Thank you.
          Is there any (public) ticket assigned?
          'just like to track commits on the issue.

          fbartels 1 Reply Last reply Reply Quote 0
          • fbartels
            fbartels Kopano @umgfoin last edited by

            Sadly no ticket for it, but I just merged the related fix, so with the next package update you should be good to go again.

            https://stash.kopano.io/projects/KC/repos/kopanocore/commits/610a52510b0036a0436f070bb512e609f7a16136

            Regards Felix

            Resources:
            https://kopano.com/blog/how-to-get-kopano/
            https://documentation.kopano.io/
            https://kb.kopano.io/

            Support overview:
            https://kopano.com/support/

            umgfoin 1 Reply Last reply Reply Quote 0
            • umgfoin
              umgfoin @fbartels last edited by umgfoin

              @fbartels
              Felix, thanks, I will update via RHEL6-rpm, tomorrow.

              As far as I can see:
              The PR_TRANSPORT_MESSAGE_HEADERS(_W) -problem is not part of recent merges.

              This seems to be a Python 2.6 compatibility issue, too, with the negative effect, that using the PYKO example-scripts might kill your data if header-filtering fails.

              bg umgfoin.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post