Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-1730

meta_path copying fails on ZMQ socket due to SixMetaPathImporter

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4
    • None
    • None

    Description

      The BasicProfile deepcopies the `sys.meta_path` (why do we need to modify this in the first place?) which, in the context of the "six" Python 2-3 compatibility module leads to trying to copy a ZMQ socket, which fails (and would be questionable in any case, as deepcopy doesn't copy a regular socket).

      A possible workaround is to register a special copier via the `copy_reg` module, to handle six's MetaPathImporter.

      https://docs.python.org/2/library/copy_reg.html

      Gliffy Diagrams

        Attachments

          Activity

            People

              marmaduke.woodman Marmaduke Woodman
              marmaduke.woodman Marmaduke Woodman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour Time Not Required
                  1h