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

meta_path copying fails on ZMQ socket due to SixMetaPathImporter

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      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

        Attachments

          Activity

            People

            • Assignee:
              marmaduke.woodman Marmaduke Woodman
              Reporter:
              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