{
    "file_diffs": [
        {
            "old_file_content": "import os.path\nimport sys\nimport re\n\nfrom AnyQt.QtWidgets import QFileDialog, QGridLayout, QMessageBox\n\nfrom Orange.data.table import Table\nfrom Orange.data.io import TabReader, CSVReader, PickleReader, ExcelReader\nfrom Orange.widgets import gui, widget\nfrom Orange.widgets.settings import Setting\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.widget import Input\n\n\nclass OWSave(widget.OWWidget):\n    name = \"Save Data\"\n    description = \"Save data to an output file.\"\n    icon = \"icons/Save.svg\"\n    category = \"Data\"\n    keywords = []\n\n    settings_version = 2\n\n    writers = [TabReader, CSVReader, PickleReader, ExcelReader]\n    filters = {\n        **{f\"{w.DESCRIPTION} (*{w.EXTENSIONS[0]})\": w\n           for w in writers},\n        **{f\"Compressed {w.DESCRIPTION} (*{w.EXTENSIONS[0]}.gz)\": w\n           for w in writers if w.SUPPORT_COMPRESSED}\n    }\n    userhome = os.path.expanduser(f\"~{os.sep}\")\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Error(widget.OWWidget.Error):\n        unsupported_sparse = widget.Msg(\"Use Pickle format for sparse data.\")\n        no_file_name = widget.Msg(\"File name is not set.\")\n        general_error = widget.Msg(\"{}\")\n\n    want_main_area = False\n    resizing_enabled = False\n\n    last_dir = Setting(\"\")\n    filter = Setting(next(iter(filters)))\n    filename = Setting(\"\", schema_only=True)\n    add_type_annotations = Setting(True)\n    auto_save = Setting(False)\n\n    def __init__(self):\n        super().__init__()\n        self.data = None\n\n        grid = QGridLayout()\n        gui.widgetBox(self.controlArea, orientation=grid)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"add_type_annotations\",\n                \"Add type annotations to header\",\n                tooltip=\n                \"Some formats (Tab-delimited, Comma-separated) can include \\n\"\n                \"additional information about variables types in header rows.\",\n                callback=self._update_messages),\n            0, 0, 1, 2)\n        grid.setRowMinimumHeight(1, 8)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"auto_save\", \"Autosave when receiving new data\",\n                callback=self._update_messages),\n            2, 0, 1, 2)\n        grid.setRowMinimumHeight(3, 8)\n        self.bt_save = gui.button(None, self, \"Save\", callback=self.save_file)\n        grid.addWidget(self.bt_save, 4, 0)\n        grid.addWidget(\n            gui.button(None, self, \"Save as ...\", callback=self.save_file_as),\n            4, 1)\n\n        self.adjustSize()\n        self._update_messages()\n\n    @property\n    def writer(self):\n        return self.filters[self.filter]\n\n    @Inputs.data\n    def dataset(self, data):\n        self.Error.clear()\n        self.data = data\n        self._update_status()\n        self._update_messages()\n        if self.auto_save and self.filename:\n            self.save_file()\n\n    def save_file(self):\n        if not self.filename:\n            self.save_file_as()\n            return\n\n        self.Error.general_error.clear()\n        if self.data is None \\\n                or not self.filename \\\n                or (self.data.is_sparse()\n                        and not self.writer.SUPPORT_SPARSE_DATA):\n            return\n        try:\n            self.writer.write(\n                self.filename, self.data, self.add_type_annotations)\n        except IOError as err_value:\n            self.Error.general_error(str(err_value))\n\n    def save_file_as(self):\n        filename, selected_filter = self.get_save_filename()\n        if not filename:\n            return\n        self.filename = filename\n        self.filter = selected_filter\n        self.last_dir = os.path.split(self.filename)[0]\n        self.bt_save.setText(f\"Save as {os.path.split(filename)[1]}\")\n        self._update_messages()\n        self.save_file()\n\n    def _update_messages(self):\n        self.Error.no_file_name(\n            shown=not self.filename and self.auto_save)\n        self.Error.unsupported_sparse(\n            shown=self.data is not None and self.data.is_sparse()\n            and self.filename and not self.writer.SUPPORT_SPARSE_DATA)\n\n    def _update_status(self):\n        if self.data is None:\n            self.info.set_input_summary(self.info.NoInput)\n        else:\n            self.info.set_input_summary(\n                str(len(self.data)),\n                f\"Data set {self.data.name or '(no name)'} \"\n                f\"with {len(self.data)} instances\")\n\n    def send_report(self):\n        self.report_data_brief(self.data)\n        writer = self.writer\n        noyes = [\"No\", \"Yes\"]\n        self.report_items((\n            (\"File name\", self.filename or \"not set\"),\n            (\"Format\", writer.DESCRIPTION),\n            (\"Type annotations\",\n             writer.OPTIONAL_TYPE_ANNOTATIONS\n             and noyes[self.add_type_annotations])\n        ))\n\n    @classmethod\n    def migrate_settings(cls, settings, version=0):\n        def migrate_to_version_2():\n            # Set the default; change later if possible\n            settings.pop(\"compression\", None)\n            settings[\"filter\"] = next(iter(cls.filters))\n            filetype = settings.pop(\"filetype\", None)\n            if filetype is None:\n                return\n\n            ext = cls._extension_from_filter(filetype)\n            if settings.pop(\"compress\", False):\n                for afilter in cls.filters:\n                    if ext + \".gz\" in afilter:\n                        settings[\"filter\"] = afilter\n                        return\n                # If not found, uncompressed may have been erroneously set\n                # for a writer that didn't support if (such as .xlsx), so\n                # fall through to uncompressed\n            for afilter in cls.filters:\n                if ext in afilter:\n                    settings[\"filter\"] = afilter\n                    return\n\n        if version < 2:\n            migrate_to_version_2()\n\n    def _initial_start_dir(self):\n        if self.filename and os.path.exists(os.path.split(self.filename)[0]):\n            return self.filename\n        else:\n            data_name = getattr(self.data, 'name', '')\n            if data_name:\n                data_name += self.writer.EXTENSIONS[0]\n            return os.path.join(self.last_dir or self.userhome, data_name)\n\n    @staticmethod\n    def _replace_extension(filename, extension):\n        if filename.endswith(extension):  # it may contain dots before extension\n            return filename\n        last_fn = None\n        while last_fn != filename:\n            last_fn, filename = filename, os.path.splitext(filename)[0]\n        return filename + extension\n\n    @staticmethod\n    def _extension_from_filter(selected_filter):\n        return re.search(r\".*\\(\\*?(\\..*)\\)$\", selected_filter).group(1)\n\n    # As of Qt 5.9, QFileDialog.setDefaultSuffix does not support double\n    # suffixes, not even in non-native dialogs. We handle each OS separately.\n    if sys.platform == \"darwin\":\n        # On macOS, is double suffixes are passed to the dialog, they are\n        # appended multiple times even if already present (QTBUG-44227).\n        # The only known workaround with native dialog is to use suffix *.*.\n        # We add the correct suffix after closing the dialog and only then check\n        # if the file exists and ask whether to override.\n        # It is a bit confusing that the user does not see the final name in the\n        # dialog, but I see no better solution.\n        def get_save_filename(self):  # pragma: no cover\n            def no_suffix(filt):\n                return filt.split(\"(\")[0] + \"(*.*)\"\n\n            mac_filters = {no_suffix(f): f for f in self.filters}\n            filename = self._initial_start_dir()\n            while True:\n                dlg = QFileDialog(\n                    None, \"Save File\", filename, \";;\".join(mac_filters))\n                dlg.setAcceptMode(dlg.AcceptSave)\n                dlg.selectNameFilter(no_suffix(self.filter))\n                dlg.setOption(QFileDialog.HideNameFilterDetails)\n                dlg.setOption(QFileDialog.DontConfirmOverwrite)\n                if dlg.exec() == QFileDialog.Rejected:\n                    return \"\", \"\"\n                filename = dlg.selectedFiles()[0]\n                selected_filter = mac_filters[dlg.selectedNameFilter()]\n                filename = self._replace_extension(\n                    filename, self._extension_from_filter(selected_filter))\n                if not os.path.exists(filename) or QMessageBox.question(\n                        self, \"Overwrite file?\",\n                        f\"File {os.path.split(filename)[1]} already exists.\\n\"\n                        \"Overwrite?\") == QMessageBox.Yes:\n                    return filename, selected_filter\n\n    elif sys.platform == \"win32\":\n        # TODO: This is not tested!!!\n        # Windows native dialog may work correctly; if not, we may do the same\n        # as for macOS?\n        def get_save_filename(self):  # pragma: no cover\n            return QFileDialog.getSaveFileName(\n                self, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters), self.filter)\n\n    else:  # Linux and any unknown platforms\n        # Qt does not use a native dialog on Linux, so we can connect to\n        # filterSelected and to overload selectFile to change the extension\n        # while the dialog is open.\n        # For unknown platforms (which?), we also use the non-native dialog to\n        # be sure we know what happens.\n        class SaveFileDialog(QFileDialog):\n            # pylint: disable=protected-access\n            def __init__(self, *args, **kwargs):\n                super().__init__(*args, **kwargs)\n                self.setAcceptMode(QFileDialog.AcceptSave)\n                self.setOption(QFileDialog.DontUseNativeDialog)\n                self.filterSelected.connect(self.updateDefaultExtension)\n\n            def selectNameFilter(self, selected_filter):\n                super().selectNameFilter(selected_filter)\n                self.updateDefaultExtension(selected_filter)\n\n            def updateDefaultExtension(self, selected_filter):\n                self.suffix = OWSave._extension_from_filter(selected_filter)\n                files = self.selectedFiles()\n                if files and not os.path.isdir(files[0]):\n                    self.selectFile(files[0].split(\".\")[0])\n\n            def selectFile(self, filename):\n                filename = OWSave._replace_extension(filename, self.suffix)\n                super().selectFile(filename)\n\n        def get_save_filename(self):\n            dlg = self.SaveFileDialog(\n                None, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters))\n            dlg.selectNameFilter(self.filter)\n            if dlg.exec() == QFileDialog.Rejected:\n                return \"\", \"\"\n            else:\n                return dlg.selectedFiles()[0], dlg.selectedNameFilter()\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWSave).run(Table(\"iris\"))\n",
            "new_file_content": "import os.path\nimport sys\nimport re\n\nfrom AnyQt.QtWidgets import QFileDialog, QGridLayout, QMessageBox\n\nfrom Orange.data.table import Table\nfrom Orange.data.io import TabReader, CSVReader, PickleReader, ExcelReader\nfrom Orange.widgets import gui, widget\nfrom Orange.widgets.settings import Setting\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.widget import Input\n\n\nclass OWSave(widget.OWWidget):\n    name = \"Save Data\"\n    description = \"Save data to an output file.\"\n    icon = \"icons/Save.svg\"\n    category = \"Data\"\n    keywords = []\n\n    settings_version = 2\n\n    writers = [TabReader, CSVReader, PickleReader, ExcelReader]\n    filters = {\n        **{f\"{w.DESCRIPTION} (*{w.EXTENSIONS[0]})\": w\n           for w in writers},\n        **{f\"Compressed {w.DESCRIPTION} (*{w.EXTENSIONS[0]}.gz)\": w\n           for w in writers if w.SUPPORT_COMPRESSED}\n    }\n    userhome = os.path.expanduser(f\"~{os.sep}\")\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Error(widget.OWWidget.Error):\n        unsupported_sparse = widget.Msg(\"Use Pickle format for sparse data.\")\n        no_file_name = widget.Msg(\"File name is not set.\")\n        general_error = widget.Msg(\"{}\")\n\n    want_main_area = False\n    resizing_enabled = False\n\n    last_dir = Setting(\"\")\n    filter = Setting(next(iter(filters)))\n    filename = Setting(\"\", schema_only=True)\n    add_type_annotations = Setting(True)\n    auto_save = Setting(False)\n\n    def __init__(self):\n        super().__init__()\n        self.data = None\n\n        grid = QGridLayout()\n        gui.widgetBox(self.controlArea, orientation=grid)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"add_type_annotations\",\n                \"Add type annotations to header\",\n                tooltip=\n                \"Some formats (Tab-delimited, Comma-separated) can include \\n\"\n                \"additional information about variables types in header rows.\",\n                callback=self._update_messages),\n            0, 0, 1, 2)\n        grid.setRowMinimumHeight(1, 8)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"auto_save\", \"Autosave when receiving new data\",\n                callback=self._update_messages),\n            2, 0, 1, 2)\n        grid.setRowMinimumHeight(3, 8)\n        self.bt_save = gui.button(None, self, \"Save\", callback=self.save_file)\n        grid.addWidget(self.bt_save, 4, 0)\n        grid.addWidget(\n            gui.button(None, self, \"Save as ...\", callback=self.save_file_as),\n            4, 1)\n\n        self.adjustSize()\n        self._update_messages()\n\n    @property\n    def writer(self):\n        return self.filters[self.filter]\n\n    @Inputs.data\n    def dataset(self, data):\n        self.Error.clear()\n        self.data = data\n        self._update_status()\n        self._update_messages()\n        if self.auto_save and self.filename:\n            self.save_file()\n\n    def save_file(self):\n        if not self.filename:\n            self.save_file_as()\n            return\n\n        self.Error.general_error.clear()\n        if self.data is None \\\n                or not self.filename \\\n                or (self.data.is_sparse()\n                        and not self.writer.SUPPORT_SPARSE_DATA):\n            return\n        try:\n            self.writer.write(\n                self.filename, self.data, self.add_type_annotations)\n        except IOError as err_value:\n            self.Error.general_error(str(err_value))\n\n    def save_file_as(self):\n        filename, selected_filter = self.get_save_filename()\n        if not filename:\n            return\n        self.filename = filename\n        self.filter = selected_filter\n        self.last_dir = os.path.split(self.filename)[0]\n        self.bt_save.setText(f\"Save as {os.path.split(filename)[1]}\")\n        self._update_messages()\n        self.save_file()\n\n    def _update_messages(self):\n        self.Error.no_file_name(\n            shown=not self.filename and self.auto_save)\n        self.Error.unsupported_sparse(\n            shown=self.data is not None and self.data.is_sparse()\n            and self.filename and not self.writer.SUPPORT_SPARSE_DATA)\n\n    def _update_status(self):\n        if self.data is None:\n            self.info.set_input_summary(self.info.NoInput)\n        else:\n            self.info.set_input_summary(\n                str(len(self.data)),\n                f\"Data set {self.data.name or '(no name)'} \"\n                f\"with {len(self.data)} instances\")\n\n    def send_report(self):\n        self.report_data_brief(self.data)\n        writer = self.writer\n        noyes = [\"No\", \"Yes\"]\n        self.report_items((\n            (\"File name\", self.filename or \"not set\"),\n            (\"Format\", writer.DESCRIPTION),\n            (\"Type annotations\",\n             writer.OPTIONAL_TYPE_ANNOTATIONS\n             and noyes[self.add_type_annotations])\n        ))\n\n    @classmethod\n    def migrate_settings(cls, settings, version=0):\n        def migrate_to_version_2():\n            # Set the default; change later if possible\n            settings.pop(\"compression\", None)\n            settings[\"filter\"] = next(iter(cls.filters))\n            filetype = settings.pop(\"filetype\", None)\n            if filetype is None:\n                return\n\n            ext = cls._extension_from_filter(filetype)\n            if settings.pop(\"compress\", False):\n                for afilter in cls.filters:\n                    if ext + \".gz\" in afilter:\n                        settings[\"filter\"] = afilter\n                        return\n                # If not found, uncompressed may have been erroneously set\n                # for a writer that didn't support if (such as .xlsx), so\n                # fall through to uncompressed\n            for afilter in cls.filters:\n                if ext in afilter:\n                    settings[\"filter\"] = afilter\n                    return\n\n        if version < 2:\n            migrate_to_version_2()\n\n    def _initial_start_dir(self):\n        if self.filename and os.path.exists(os.path.split(self.filename)[0]):\n            return self.filename\n        else:\n            data_name = getattr(self.data, 'name', '')\n            if data_name:\n                data_name += self.writer.EXTENSIONS[0]\n            return os.path.join(self.last_dir or self.userhome, data_name)\n\n    @staticmethod\n    def _replace_extension(filename, extension):\n        known_extensions = map(OWSave._extension_from_filter, OWSave.filters)\n        for known_ext in sorted(known_extensions, key=len, reverse=True):\n            if filename.endswith(known_ext):\n                filename = filename[:-len(known_ext)]\n                break\n        return filename + extension\n\n    @staticmethod\n    def _extension_from_filter(selected_filter):\n        return re.search(r\".*\\(\\*?(\\..*)\\)$\", selected_filter).group(1)\n\n    # As of Qt 5.9, QFileDialog.setDefaultSuffix does not support double\n    # suffixes, not even in non-native dialogs. We handle each OS separately.\n    if sys.platform == \"darwin\":\n        # On macOS, is double suffixes are passed to the dialog, they are\n        # appended multiple times even if already present (QTBUG-44227).\n        # The only known workaround with native dialog is to use suffix *.*.\n        # We add the correct suffix after closing the dialog and only then check\n        # if the file exists and ask whether to override.\n        # It is a bit confusing that the user does not see the final name in the\n        # dialog, but I see no better solution.\n        def get_save_filename(self):  # pragma: no cover\n            def no_suffix(filt):\n                return filt.split(\"(\")[0] + \"(*.*)\"\n\n            mac_filters = {no_suffix(f): f for f in self.filters}\n            filename = self._initial_start_dir()\n            while True:\n                dlg = QFileDialog(\n                    None, \"Save File\", filename, \";;\".join(mac_filters))\n                dlg.setAcceptMode(dlg.AcceptSave)\n                dlg.selectNameFilter(no_suffix(self.filter))\n                dlg.setOption(QFileDialog.HideNameFilterDetails)\n                dlg.setOption(QFileDialog.DontConfirmOverwrite)\n                if dlg.exec() == QFileDialog.Rejected:\n                    return \"\", \"\"\n                filename = dlg.selectedFiles()[0]\n                selected_filter = mac_filters[dlg.selectedNameFilter()]\n                filename = self._replace_extension(\n                    filename, self._extension_from_filter(selected_filter))\n                if not os.path.exists(filename) or QMessageBox.question(\n                        self, \"Overwrite file?\",\n                        f\"File {os.path.split(filename)[1]} already exists.\\n\"\n                        \"Overwrite?\") == QMessageBox.Yes:\n                    return filename, selected_filter\n\n    elif sys.platform == \"win32\":\n        # TODO: This is not tested!!!\n        # Windows native dialog may work correctly; if not, we may do the same\n        # as for macOS?\n        def get_save_filename(self):  # pragma: no cover\n            return QFileDialog.getSaveFileName(\n                self, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters), self.filter)\n\n    else:  # Linux and any unknown platforms\n        # Qt does not use a native dialog on Linux, so we can connect to\n        # filterSelected and to overload selectFile to change the extension\n        # while the dialog is open.\n        # For unknown platforms (which?), we also use the non-native dialog to\n        # be sure we know what happens.\n        class SaveFileDialog(QFileDialog):\n            # pylint: disable=protected-access\n            def __init__(self, *args, **kwargs):\n                super().__init__(*args, **kwargs)\n                self.setAcceptMode(QFileDialog.AcceptSave)\n                self.setOption(QFileDialog.DontUseNativeDialog)\n                self.filterSelected.connect(self.updateDefaultExtension)\n\n            def selectNameFilter(self, selected_filter):\n                super().selectNameFilter(selected_filter)\n                self.updateDefaultExtension(selected_filter)\n\n            def updateDefaultExtension(self, selected_filter):\n                self.suffix = OWSave._extension_from_filter(selected_filter)\n                files = self.selectedFiles()\n                if files and not os.path.isdir(files[0]):\n                    self.selectFile(files[0].split(\".\")[0])\n\n            def selectFile(self, filename):\n                filename = OWSave._replace_extension(filename, self.suffix)\n                super().selectFile(filename)\n\n        def get_save_filename(self):\n            dlg = self.SaveFileDialog(\n                None, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters))\n            dlg.selectNameFilter(self.filter)\n            if dlg.exec() == QFileDialog.Rejected:\n                return \"\", \"\"\n            else:\n                return dlg.selectedFiles()[0], dlg.selectedNameFilter()\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWSave).run(Table(\"iris\"))\n",
            "header": {
                "file": {
                    "path": "Orange/widgets/data/owsave.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "fd5212b7e",
                "new_commit_hash": "37ba1b3dc",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/widgets/data/owsave.py"
            },
            "plus_file": {
                "path": "b/Orange/widgets/data/owsave.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 185,
                            "length": 11
                        },
                        "new_range": {
                            "start": 185,
                            "length": 11
                        },
                        "section": "class OWSave(widget.OWWidget):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "    @staticmethod",
                                "type": "context"
                            },
                            {
                                "content": "    def _replace_extension(filename, extension):",
                                "type": "context"
                            },
                            {
                                "content": "        if filename.endswith(extension):  # it may contain dots before extension",
                                "type": "deleted"
                            },
                            {
                                "content": "            return filename",
                                "type": "deleted"
                            },
                            {
                                "content": "        last_fn = None",
                                "type": "deleted"
                            },
                            {
                                "content": "        while last_fn != filename:",
                                "type": "deleted"
                            },
                            {
                                "content": "            last_fn, filename = filename, os.path.splitext(filename)[0]",
                                "type": "deleted"
                            },
                            {
                                "content": "        known_extensions = map(OWSave._extension_from_filter, OWSave.filters)",
                                "type": "added"
                            },
                            {
                                "content": "        for known_ext in sorted(known_extensions, key=len, reverse=True):",
                                "type": "added"
                            },
                            {
                                "content": "            if filename.endswith(known_ext):",
                                "type": "added"
                            },
                            {
                                "content": "                filename = filename[:-len(known_ext)]",
                                "type": "added"
                            },
                            {
                                "content": "                break",
                                "type": "added"
                            },
                            {
                                "content": "        return filename + extension",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "    @staticmethod",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/data/owsave.py",
                            "type": "method",
                            "name": "OWSave._replace_extension",
                            "content": "class OWSave(widget.OWWidget):\n    name = \"Save Data\"\n    description = \"Save data to an output file.\"\n    icon = \"icons/Save.svg\"\n    category = \"Data\"\n    keywords = []\n\n    settings_version = 2\n\n    writers = [TabReader, CSVReader, PickleReader, ExcelReader]\n    filters = {\n        **{f\"{w.DESCRIPTION} (*{w.EXTENSIONS[0]})\": w\n           for w in writers},\n        **{f\"Compressed {w.DESCRIPTION} (*{w.EXTENSIONS[0]}.gz)\": w\n           for w in writers if w.SUPPORT_COMPRESSED}\n    }\n    userhome = os.path.expanduser(f\"~{os.sep}\")\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Error(widget.OWWidget.Error):\n        unsupported_sparse = widget.Msg(\"Use Pickle format for sparse data.\")\n        no_file_name = widget.Msg(\"File name is not set.\")\n        general_error = widget.Msg(\"{}\")\n\n    want_main_area = False\n    resizing_enabled = False\n\n    last_dir = Setting(\"\")\n    filter = Setting(next(iter(filters)))\n    filename = Setting(\"\", schema_only=True)\n    add_type_annotations = Setting(True)\n    auto_save = Setting(False)\n\n    def __init__(self):\n        super().__init__()\n        self.data = None\n\n        grid = QGridLayout()\n        gui.widgetBox(self.controlArea, orientation=grid)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"add_type_annotations\",\n                \"Add type annotations to header\",\n                tooltip=\n                \"Some formats (Tab-delimited, Comma-separated) can include \\n\"\n                \"additional information about variables types in header rows.\",\n                callback=self._update_messages),\n            0, 0, 1, 2)\n        grid.setRowMinimumHeight(1, 8)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"auto_save\", \"Autosave when receiving new data\",\n                callback=self._update_messages),\n            2, 0, 1, 2)\n        grid.setRowMinimumHeight(3, 8)\n        self.bt_save = gui.button(None, self, \"Save\", callback=self.save_file)\n        grid.addWidget(self.bt_save, 4, 0)\n        grid.addWidget(\n            gui.button(None, self, \"Save as ...\", callback=self.save_file_as),\n            4, 1)\n\n        self.adjustSize()\n        self._update_messages()\n\n    @property\n    def writer(self):\n        return self.filters[self.filter]\n\n    @Inputs.data\n    def dataset(self, data):\n        self.Error.clear()\n        self.data = data\n        self._update_status()\n        self._update_messages()\n        if self.auto_save and self.filename:\n            self.save_file()\n\n    def save_file(self):\n        if not self.filename:\n            self.save_file_as()\n            return\n\n        self.Error.general_error.clear()\n        if self.data is None \\\n                or not self.filename \\\n                or (self.data.is_sparse()\n                        and not self.writer.SUPPORT_SPARSE_DATA):\n            return\n        try:\n            self.writer.write(\n                self.filename, self.data, self.add_type_annotations)\n        except IOError as err_value:\n            self.Error.general_error(str(err_value))\n\n    def save_file_as(self):\n        filename, selected_filter = self.get_save_filename()\n        if not filename:\n            return\n        self.filename = filename\n        self.filter = selected_filter\n        self.last_dir = os.path.split(self.filename)[0]\n        self.bt_save.setText(f\"Save as {os.path.split(filename)[1]}\")\n        self._update_messages()\n        self.save_file()\n\n    def _update_messages(self):\n        self.Error.no_file_name(\n            shown=not self.filename and self.auto_save)\n        self.Error.unsupported_sparse(\n            shown=self.data is not None and self.data.is_sparse()\n            and self.filename and not self.writer.SUPPORT_SPARSE_DATA)\n\n    def _update_status(self):\n        if self.data is None:\n            self.info.set_input_summary(self.info.NoInput)\n        else:\n            self.info.set_input_summary(\n                str(len(self.data)),\n                f\"Data set {self.data.name or '(no name)'} \"\n                f\"with {len(self.data)} instances\")\n\n    def send_report(self):\n        self.report_data_brief(self.data)\n        writer = self.writer\n        noyes = [\"No\", \"Yes\"]\n        self.report_items((\n            (\"File name\", self.filename or \"not set\"),\n            (\"Format\", writer.DESCRIPTION),\n            (\"Type annotations\",\n             writer.OPTIONAL_TYPE_ANNOTATIONS\n             and noyes[self.add_type_annotations])\n        ))\n\n    @classmethod\n    def migrate_settings(cls, settings, version=0):\n        def migrate_to_version_2():\n            # Set the default; change later if possible\n            settings.pop(\"compression\", None)\n            settings[\"filter\"] = next(iter(cls.filters))\n            filetype = settings.pop(\"filetype\", None)\n            if filetype is None:\n                return\n\n            ext = cls._extension_from_filter(filetype)\n            if settings.pop(\"compress\", False):\n                for afilter in cls.filters:\n                    if ext + \".gz\" in afilter:\n                        settings[\"filter\"] = afilter\n                        return\n                # If not found, uncompressed may have been erroneously set\n                # for a writer that didn't support if (such as .xlsx), so\n                # fall through to uncompressed\n            for afilter in cls.filters:\n                if ext in afilter:\n                    settings[\"filter\"] = afilter\n                    return\n\n        if version < 2:\n            migrate_to_version_2()\n\n    def _initial_start_dir(self):\n        if self.filename and os.path.exists(os.path.split(self.filename)[0]):\n            return self.filename\n        else:\n            data_name = getattr(self.data, 'name', '')\n            if data_name:\n                data_name += self.writer.EXTENSIONS[0]\n            return os.path.join(self.last_dir or self.userhome, data_name)\n\n    @staticmethod\n    def _replace_extension(filename, extension):\n        if filename.endswith(extension):  # it may contain dots before extension\n            return filename\n        last_fn = None\n        while last_fn != filename:\n            last_fn, filename = filename, os.path.splitext(filename)[0]\n        return filename + extension\n\n    @staticmethod\n    def _extension_from_filter(selected_filter):\n        return re.search(r\".*\\(\\*?(\\..*)\\)$\", selected_filter).group(1)\n\n    # As of Qt 5.9, QFileDialog.setDefaultSuffix does not support double\n    # suffixes, not even in non-native dialogs. We handle each OS separately.\n    if sys.platform == \"darwin\":\n        # On macOS, is double suffixes are passed to the dialog, they are\n        # appended multiple times even if already present (QTBUG-44227).\n        # The only known workaround with native dialog is to use suffix *.*.\n        # We add the correct suffix after closing the dialog and only then check\n        # if the file exists and ask whether to override.\n        # It is a bit confusing that the user does not see the final name in the\n        # dialog, but I see no better solution.\n        def get_save_filename(self):  # pragma: no cover\n            def no_suffix(filt):\n                return filt.split(\"(\")[0] + \"(*.*)\"\n\n            mac_filters = {no_suffix(f): f for f in self.filters}\n            filename = self._initial_start_dir()\n            while True:\n                dlg = QFileDialog(\n                    None, \"Save File\", filename, \";;\".join(mac_filters))\n                dlg.setAcceptMode(dlg.AcceptSave)\n                dlg.selectNameFilter(no_suffix(self.filter))\n                dlg.setOption(QFileDialog.HideNameFilterDetails)\n                dlg.setOption(QFileDialog.DontConfirmOverwrite)\n                if dlg.exec() == QFileDialog.Rejected:\n                    return \"\", \"\"\n                filename = dlg.selectedFiles()[0]\n                selected_filter = mac_filters[dlg.selectedNameFilter()]\n                filename = self._replace_extension(\n                    filename, self._extension_from_filter(selected_filter))\n                if not os.path.exists(filename) or QMessageBox.question(\n                        self, \"Overwrite file?\",\n                        f\"File {os.path.split(filename)[1]} already exists.\\n\"\n                        \"Overwrite?\") == QMessageBox.Yes:\n                    return filename, selected_filter\n\n    elif sys.platform == \"win32\":\n        # TODO: This is not tested!!!\n        # Windows native dialog may work correctly; if not, we may do the same\n        # as for macOS?\n        def get_save_filename(self):  # pragma: no cover\n            return QFileDialog.getSaveFileName(\n                self, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters), self.filter)\n\n    else:  # Linux and any unknown platforms\n        # Qt does not use a native dialog on Linux, so we can connect to\n        # filterSelected and to overload selectFile to change the extension\n        # while the dialog is open.\n        # For unknown platforms (which?), we also use the non-native dialog to\n        # be sure we know what happens.\n        class SaveFileDialog(QFileDialog):\n            # pylint: disable=protected-access\n            def __init__(self, *args, **kwargs):\n                super().__init__(*args, **kwargs)\n                self.setAcceptMode(QFileDialog.AcceptSave)\n                self.setOption(QFileDialog.DontUseNativeDialog)\n                self.filterSelected.connect(self.updateDefaultExtension)\n\n            def selectNameFilter(self, selected_filter):\n                super().selectNameFilter(selected_filter)\n                self.updateDefaultExtension(selected_filter)\n\n            def updateDefaultExtension(self, selected_filter):\n                self.suffix = OWSave._extension_from_filter(selected_filter)\n                files = self.selectedFiles()\n                if files and not os.path.isdir(files[0]):\n                    self.selectFile(files[0].split(\".\")[0])\n\n            def selectFile(self, filename):\n                filename = OWSave._replace_extension(filename, self.suffix)\n                super().selectFile(filename)\n\n        def get_save_filename(self):\n            dlg = self.SaveFileDialog(\n                None, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters))\n            dlg.selectNameFilter(self.filter)\n            if dlg.exec() == QFileDialog.Rejected:\n                return \"\", \"\"\n            else:\n                return dlg.selectedFiles()[0], dlg.selectedNameFilter()",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 187,
                            "end_lineno": 193,
                            "parent": {
                                "file_name": "Orange/widgets/data/owsave.py",
                                "type": "class",
                                "name": "OWSave",
                                "content": "class OWSave(widget.OWWidget):\n    name = \"Save Data\"\n    description = \"Save data to an output file.\"\n    icon = \"icons/Save.svg\"\n    category = \"Data\"\n    keywords = []\n\n    settings_version = 2\n\n    writers = [TabReader, CSVReader, PickleReader, ExcelReader]\n    filters = {\n        **{f\"{w.DESCRIPTION} (*{w.EXTENSIONS[0]})\": w\n           for w in writers},\n        **{f\"Compressed {w.DESCRIPTION} (*{w.EXTENSIONS[0]}.gz)\": w\n           for w in writers if w.SUPPORT_COMPRESSED}\n    }\n    userhome = os.path.expanduser(f\"~{os.sep}\")\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Error(widget.OWWidget.Error):\n        unsupported_sparse = widget.Msg(\"Use Pickle format for sparse data.\")\n        no_file_name = widget.Msg(\"File name is not set.\")\n        general_error = widget.Msg(\"{}\")\n\n    want_main_area = False\n    resizing_enabled = False\n\n    last_dir = Setting(\"\")\n    filter = Setting(next(iter(filters)))\n    filename = Setting(\"\", schema_only=True)\n    add_type_annotations = Setting(True)\n    auto_save = Setting(False)\n\n    def __init__(self):\n        super().__init__()\n        self.data = None\n\n        grid = QGridLayout()\n        gui.widgetBox(self.controlArea, orientation=grid)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"add_type_annotations\",\n                \"Add type annotations to header\",\n                tooltip=\n                \"Some formats (Tab-delimited, Comma-separated) can include \\n\"\n                \"additional information about variables types in header rows.\",\n                callback=self._update_messages),\n            0, 0, 1, 2)\n        grid.setRowMinimumHeight(1, 8)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"auto_save\", \"Autosave when receiving new data\",\n                callback=self._update_messages),\n            2, 0, 1, 2)\n        grid.setRowMinimumHeight(3, 8)\n        self.bt_save = gui.button(None, self, \"Save\", callback=self.save_file)\n        grid.addWidget(self.bt_save, 4, 0)\n        grid.addWidget(\n            gui.button(None, self, \"Save as ...\", callback=self.save_file_as),\n            4, 1)\n\n        self.adjustSize()\n        self._update_messages()\n\n    @property\n    def writer(self):\n        return self.filters[self.filter]\n\n    @Inputs.data\n    def dataset(self, data):\n        self.Error.clear()\n        self.data = data\n        self._update_status()\n        self._update_messages()\n        if self.auto_save and self.filename:\n            self.save_file()\n\n    def save_file(self):\n        if not self.filename:\n            self.save_file_as()\n            return\n\n        self.Error.general_error.clear()\n        if self.data is None \\\n                or not self.filename \\\n                or (self.data.is_sparse()\n                        and not self.writer.SUPPORT_SPARSE_DATA):\n            return\n        try:\n            self.writer.write(\n                self.filename, self.data, self.add_type_annotations)\n        except IOError as err_value:\n            self.Error.general_error(str(err_value))\n\n    def save_file_as(self):\n        filename, selected_filter = self.get_save_filename()\n        if not filename:\n            return\n        self.filename = filename\n        self.filter = selected_filter\n        self.last_dir = os.path.split(self.filename)[0]\n        self.bt_save.setText(f\"Save as {os.path.split(filename)[1]}\")\n        self._update_messages()\n        self.save_file()\n\n    def _update_messages(self):\n        self.Error.no_file_name(\n            shown=not self.filename and self.auto_save)\n        self.Error.unsupported_sparse(\n            shown=self.data is not None and self.data.is_sparse()\n            and self.filename and not self.writer.SUPPORT_SPARSE_DATA)\n\n    def _update_status(self):\n        if self.data is None:\n            self.info.set_input_summary(self.info.NoInput)\n        else:\n            self.info.set_input_summary(\n                str(len(self.data)),\n                f\"Data set {self.data.name or '(no name)'} \"\n                f\"with {len(self.data)} instances\")\n\n    def send_report(self):\n        self.report_data_brief(self.data)\n        writer = self.writer\n        noyes = [\"No\", \"Yes\"]\n        self.report_items((\n            (\"File name\", self.filename or \"not set\"),\n            (\"Format\", writer.DESCRIPTION),\n            (\"Type annotations\",\n             writer.OPTIONAL_TYPE_ANNOTATIONS\n             and noyes[self.add_type_annotations])\n        ))\n\n    @classmethod\n    def migrate_settings(cls, settings, version=0):\n        def migrate_to_version_2():\n            # Set the default; change later if possible\n            settings.pop(\"compression\", None)\n            settings[\"filter\"] = next(iter(cls.filters))\n            filetype = settings.pop(\"filetype\", None)\n            if filetype is None:\n                return\n\n            ext = cls._extension_from_filter(filetype)\n            if settings.pop(\"compress\", False):\n                for afilter in cls.filters:\n                    if ext + \".gz\" in afilter:\n                        settings[\"filter\"] = afilter\n                        return\n                # If not found, uncompressed may have been erroneously set\n                # for a writer that didn't support if (such as .xlsx), so\n                # fall through to uncompressed\n            for afilter in cls.filters:\n                if ext in afilter:\n                    settings[\"filter\"] = afilter\n                    return\n\n        if version < 2:\n            migrate_to_version_2()\n\n    def _initial_start_dir(self):\n        if self.filename and os.path.exists(os.path.split(self.filename)[0]):\n            return self.filename\n        else:\n            data_name = getattr(self.data, 'name', '')\n            if data_name:\n                data_name += self.writer.EXTENSIONS[0]\n            return os.path.join(self.last_dir or self.userhome, data_name)\n\n    @staticmethod\n    def _replace_extension(filename, extension):\n        if filename.endswith(extension):  # it may contain dots before extension\n            return filename\n        last_fn = None\n        while last_fn != filename:\n            last_fn, filename = filename, os.path.splitext(filename)[0]\n        return filename + extension\n\n    @staticmethod\n    def _extension_from_filter(selected_filter):\n        return re.search(r\".*\\(\\*?(\\..*)\\)$\", selected_filter).group(1)\n\n    # As of Qt 5.9, QFileDialog.setDefaultSuffix does not support double\n    # suffixes, not even in non-native dialogs. We handle each OS separately.\n    if sys.platform == \"darwin\":\n        # On macOS, is double suffixes are passed to the dialog, they are\n        # appended multiple times even if already present (QTBUG-44227).\n        # The only known workaround with native dialog is to use suffix *.*.\n        # We add the correct suffix after closing the dialog and only then check\n        # if the file exists and ask whether to override.\n        # It is a bit confusing that the user does not see the final name in the\n        # dialog, but I see no better solution.\n        def get_save_filename(self):  # pragma: no cover\n            def no_suffix(filt):\n                return filt.split(\"(\")[0] + \"(*.*)\"\n\n            mac_filters = {no_suffix(f): f for f in self.filters}\n            filename = self._initial_start_dir()\n            while True:\n                dlg = QFileDialog(\n                    None, \"Save File\", filename, \";;\".join(mac_filters))\n                dlg.setAcceptMode(dlg.AcceptSave)\n                dlg.selectNameFilter(no_suffix(self.filter))\n                dlg.setOption(QFileDialog.HideNameFilterDetails)\n                dlg.setOption(QFileDialog.DontConfirmOverwrite)\n                if dlg.exec() == QFileDialog.Rejected:\n                    return \"\", \"\"\n                filename = dlg.selectedFiles()[0]\n                selected_filter = mac_filters[dlg.selectedNameFilter()]\n                filename = self._replace_extension(\n                    filename, self._extension_from_filter(selected_filter))\n                if not os.path.exists(filename) or QMessageBox.question(\n                        self, \"Overwrite file?\",\n                        f\"File {os.path.split(filename)[1]} already exists.\\n\"\n                        \"Overwrite?\") == QMessageBox.Yes:\n                    return filename, selected_filter\n\n    elif sys.platform == \"win32\":\n        # TODO: This is not tested!!!\n        # Windows native dialog may work correctly; if not, we may do the same\n        # as for macOS?\n        def get_save_filename(self):  # pragma: no cover\n            return QFileDialog.getSaveFileName(\n                self, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters), self.filter)\n\n    else:  # Linux and any unknown platforms\n        # Qt does not use a native dialog on Linux, so we can connect to\n        # filterSelected and to overload selectFile to change the extension\n        # while the dialog is open.\n        # For unknown platforms (which?), we also use the non-native dialog to\n        # be sure we know what happens.\n        class SaveFileDialog(QFileDialog):\n            # pylint: disable=protected-access\n            def __init__(self, *args, **kwargs):\n                super().__init__(*args, **kwargs)\n                self.setAcceptMode(QFileDialog.AcceptSave)\n                self.setOption(QFileDialog.DontUseNativeDialog)\n                self.filterSelected.connect(self.updateDefaultExtension)\n\n            def selectNameFilter(self, selected_filter):\n                super().selectNameFilter(selected_filter)\n                self.updateDefaultExtension(selected_filter)\n\n            def updateDefaultExtension(self, selected_filter):\n                self.suffix = OWSave._extension_from_filter(selected_filter)\n                files = self.selectedFiles()\n                if files and not os.path.isdir(files[0]):\n                    self.selectFile(files[0].split(\".\")[0])\n\n            def selectFile(self, filename):\n                filename = OWSave._replace_extension(filename, self.suffix)\n                super().selectFile(filename)\n\n        def get_save_filename(self):\n            dlg = self.SaveFileDialog(\n                None, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters))\n            dlg.selectNameFilter(self.filter)\n            if dlg.exec() == QFileDialog.Rejected:\n                return \"\", \"\"\n            else:\n                return dlg.selectedFiles()[0], dlg.selectedNameFilter()",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 15,
                                "end_lineno": 279,
                                "parent": null
                            }
                        },
                        {
                            "file_name": "Orange/widgets/data/owsave.py",
                            "type": "class",
                            "name": "OWSave",
                            "content": "class OWSave(widget.OWWidget):\n    name = \"Save Data\"\n    description = \"Save data to an output file.\"\n    icon = \"icons/Save.svg\"\n    category = \"Data\"\n    keywords = []\n\n    settings_version = 2\n\n    writers = [TabReader, CSVReader, PickleReader, ExcelReader]\n    filters = {\n        **{f\"{w.DESCRIPTION} (*{w.EXTENSIONS[0]})\": w\n           for w in writers},\n        **{f\"Compressed {w.DESCRIPTION} (*{w.EXTENSIONS[0]}.gz)\": w\n           for w in writers if w.SUPPORT_COMPRESSED}\n    }\n    userhome = os.path.expanduser(f\"~{os.sep}\")\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Error(widget.OWWidget.Error):\n        unsupported_sparse = widget.Msg(\"Use Pickle format for sparse data.\")\n        no_file_name = widget.Msg(\"File name is not set.\")\n        general_error = widget.Msg(\"{}\")\n\n    want_main_area = False\n    resizing_enabled = False\n\n    last_dir = Setting(\"\")\n    filter = Setting(next(iter(filters)))\n    filename = Setting(\"\", schema_only=True)\n    add_type_annotations = Setting(True)\n    auto_save = Setting(False)\n\n    def __init__(self):\n        super().__init__()\n        self.data = None\n\n        grid = QGridLayout()\n        gui.widgetBox(self.controlArea, orientation=grid)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"add_type_annotations\",\n                \"Add type annotations to header\",\n                tooltip=\n                \"Some formats (Tab-delimited, Comma-separated) can include \\n\"\n                \"additional information about variables types in header rows.\",\n                callback=self._update_messages),\n            0, 0, 1, 2)\n        grid.setRowMinimumHeight(1, 8)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"auto_save\", \"Autosave when receiving new data\",\n                callback=self._update_messages),\n            2, 0, 1, 2)\n        grid.setRowMinimumHeight(3, 8)\n        self.bt_save = gui.button(None, self, \"Save\", callback=self.save_file)\n        grid.addWidget(self.bt_save, 4, 0)\n        grid.addWidget(\n            gui.button(None, self, \"Save as ...\", callback=self.save_file_as),\n            4, 1)\n\n        self.adjustSize()\n        self._update_messages()\n\n    @property\n    def writer(self):\n        return self.filters[self.filter]\n\n    @Inputs.data\n    def dataset(self, data):\n        self.Error.clear()\n        self.data = data\n        self._update_status()\n        self._update_messages()\n        if self.auto_save and self.filename:\n            self.save_file()\n\n    def save_file(self):\n        if not self.filename:\n            self.save_file_as()\n            return\n\n        self.Error.general_error.clear()\n        if self.data is None \\\n                or not self.filename \\\n                or (self.data.is_sparse()\n                        and not self.writer.SUPPORT_SPARSE_DATA):\n            return\n        try:\n            self.writer.write(\n                self.filename, self.data, self.add_type_annotations)\n        except IOError as err_value:\n            self.Error.general_error(str(err_value))\n\n    def save_file_as(self):\n        filename, selected_filter = self.get_save_filename()\n        if not filename:\n            return\n        self.filename = filename\n        self.filter = selected_filter\n        self.last_dir = os.path.split(self.filename)[0]\n        self.bt_save.setText(f\"Save as {os.path.split(filename)[1]}\")\n        self._update_messages()\n        self.save_file()\n\n    def _update_messages(self):\n        self.Error.no_file_name(\n            shown=not self.filename and self.auto_save)\n        self.Error.unsupported_sparse(\n            shown=self.data is not None and self.data.is_sparse()\n            and self.filename and not self.writer.SUPPORT_SPARSE_DATA)\n\n    def _update_status(self):\n        if self.data is None:\n            self.info.set_input_summary(self.info.NoInput)\n        else:\n            self.info.set_input_summary(\n                str(len(self.data)),\n                f\"Data set {self.data.name or '(no name)'} \"\n                f\"with {len(self.data)} instances\")\n\n    def send_report(self):\n        self.report_data_brief(self.data)\n        writer = self.writer\n        noyes = [\"No\", \"Yes\"]\n        self.report_items((\n            (\"File name\", self.filename or \"not set\"),\n            (\"Format\", writer.DESCRIPTION),\n            (\"Type annotations\",\n             writer.OPTIONAL_TYPE_ANNOTATIONS\n             and noyes[self.add_type_annotations])\n        ))\n\n    @classmethod\n    def migrate_settings(cls, settings, version=0):\n        def migrate_to_version_2():\n            # Set the default; change later if possible\n            settings.pop(\"compression\", None)\n            settings[\"filter\"] = next(iter(cls.filters))\n            filetype = settings.pop(\"filetype\", None)\n            if filetype is None:\n                return\n\n            ext = cls._extension_from_filter(filetype)\n            if settings.pop(\"compress\", False):\n                for afilter in cls.filters:\n                    if ext + \".gz\" in afilter:\n                        settings[\"filter\"] = afilter\n                        return\n                # If not found, uncompressed may have been erroneously set\n                # for a writer that didn't support if (such as .xlsx), so\n                # fall through to uncompressed\n            for afilter in cls.filters:\n                if ext in afilter:\n                    settings[\"filter\"] = afilter\n                    return\n\n        if version < 2:\n            migrate_to_version_2()\n\n    def _initial_start_dir(self):\n        if self.filename and os.path.exists(os.path.split(self.filename)[0]):\n            return self.filename\n        else:\n            data_name = getattr(self.data, 'name', '')\n            if data_name:\n                data_name += self.writer.EXTENSIONS[0]\n            return os.path.join(self.last_dir or self.userhome, data_name)\n\n    @staticmethod\n    def _replace_extension(filename, extension):\n        if filename.endswith(extension):  # it may contain dots before extension\n            return filename\n        last_fn = None\n        while last_fn != filename:\n            last_fn, filename = filename, os.path.splitext(filename)[0]\n        return filename + extension\n\n    @staticmethod\n    def _extension_from_filter(selected_filter):\n        return re.search(r\".*\\(\\*?(\\..*)\\)$\", selected_filter).group(1)\n\n    # As of Qt 5.9, QFileDialog.setDefaultSuffix does not support double\n    # suffixes, not even in non-native dialogs. We handle each OS separately.\n    if sys.platform == \"darwin\":\n        # On macOS, is double suffixes are passed to the dialog, they are\n        # appended multiple times even if already present (QTBUG-44227).\n        # The only known workaround with native dialog is to use suffix *.*.\n        # We add the correct suffix after closing the dialog and only then check\n        # if the file exists and ask whether to override.\n        # It is a bit confusing that the user does not see the final name in the\n        # dialog, but I see no better solution.\n        def get_save_filename(self):  # pragma: no cover\n            def no_suffix(filt):\n                return filt.split(\"(\")[0] + \"(*.*)\"\n\n            mac_filters = {no_suffix(f): f for f in self.filters}\n            filename = self._initial_start_dir()\n            while True:\n                dlg = QFileDialog(\n                    None, \"Save File\", filename, \";;\".join(mac_filters))\n                dlg.setAcceptMode(dlg.AcceptSave)\n                dlg.selectNameFilter(no_suffix(self.filter))\n                dlg.setOption(QFileDialog.HideNameFilterDetails)\n                dlg.setOption(QFileDialog.DontConfirmOverwrite)\n                if dlg.exec() == QFileDialog.Rejected:\n                    return \"\", \"\"\n                filename = dlg.selectedFiles()[0]\n                selected_filter = mac_filters[dlg.selectedNameFilter()]\n                filename = self._replace_extension(\n                    filename, self._extension_from_filter(selected_filter))\n                if not os.path.exists(filename) or QMessageBox.question(\n                        self, \"Overwrite file?\",\n                        f\"File {os.path.split(filename)[1]} already exists.\\n\"\n                        \"Overwrite?\") == QMessageBox.Yes:\n                    return filename, selected_filter\n\n    elif sys.platform == \"win32\":\n        # TODO: This is not tested!!!\n        # Windows native dialog may work correctly; if not, we may do the same\n        # as for macOS?\n        def get_save_filename(self):  # pragma: no cover\n            return QFileDialog.getSaveFileName(\n                self, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters), self.filter)\n\n    else:  # Linux and any unknown platforms\n        # Qt does not use a native dialog on Linux, so we can connect to\n        # filterSelected and to overload selectFile to change the extension\n        # while the dialog is open.\n        # For unknown platforms (which?), we also use the non-native dialog to\n        # be sure we know what happens.\n        class SaveFileDialog(QFileDialog):\n            # pylint: disable=protected-access\n            def __init__(self, *args, **kwargs):\n                super().__init__(*args, **kwargs)\n                self.setAcceptMode(QFileDialog.AcceptSave)\n                self.setOption(QFileDialog.DontUseNativeDialog)\n                self.filterSelected.connect(self.updateDefaultExtension)\n\n            def selectNameFilter(self, selected_filter):\n                super().selectNameFilter(selected_filter)\n                self.updateDefaultExtension(selected_filter)\n\n            def updateDefaultExtension(self, selected_filter):\n                self.suffix = OWSave._extension_from_filter(selected_filter)\n                files = self.selectedFiles()\n                if files and not os.path.isdir(files[0]):\n                    self.selectFile(files[0].split(\".\")[0])\n\n            def selectFile(self, filename):\n                filename = OWSave._replace_extension(filename, self.suffix)\n                super().selectFile(filename)\n\n        def get_save_filename(self):\n            dlg = self.SaveFileDialog(\n                None, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters))\n            dlg.selectNameFilter(self.filter)\n            if dlg.exec() == QFileDialog.Rejected:\n                return \"\", \"\"\n            else:\n                return dlg.selectedFiles()[0], dlg.selectedNameFilter()",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 15,
                            "end_lineno": 279,
                            "parent": null
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                }
            ]
        },
        {
            "old_file_content": "# pylint: disable=missing-docstring, protected-access\nimport unittest\nfrom unittest.mock import patch, Mock\nimport os\nimport sys\n\nimport scipy.sparse as sp\nfrom AnyQt.QtWidgets import QFileDialog\n\nfrom Orange.data import Table\nfrom Orange.data.io import TabReader, PickleReader, ExcelReader\nfrom Orange.tests import named_file\nfrom Orange.widgets.tests.base import WidgetTest\nfrom Orange.widgets.data.owsave import OWSave\n\n\n# Yay, MS Windows!\n# This is not the proper general way to do it, but it's simplest and sufficient\n# Short name is suitable for the function's purpose\ndef _w(s):  # pylint: disable=invalid-name\n    return s.replace(\"/\", os.sep)\n\n\nclass TestOWSave(WidgetTest):\n    def setUp(self):\n        class OWSaveMockWriter(OWSave):\n            writer = Mock()\n            writer.EXTENSIONS = [\".csv\"]\n            writer.SUPPORT_COMPRESSED = True\n            writer.SUPPORT_SPARSE_DATA = False\n            writer.OPTIONAL_TYPE_ANNOTATIONS = False\n\n        self.widget = self.create_widget(OWSaveMockWriter)  # type: OWSave\n        self.iris = Table(\"iris\")\n\n    def test_dataset(self):\n        widget = self.widget\n        widget.auto_save = True\n        insum = widget.info.set_input_summary = Mock()\n        savefile = widget.save_file = Mock()\n\n        datasig = widget.Inputs.data\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        insum.reset_mock()\n        savefile.reset_mock()\n\n        widget.filename = \"foo.tab\"\n        widget.writer = TabReader\n        widget.auto_save = False\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        savefile.assert_not_called()\n\n        widget.auto_save = True\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        savefile.assert_called()\n\n        self.send_signal(datasig, None)\n        insum.assert_called_with(widget.info.NoInput)\n\n    @unittest.skipUnless(sys.platform == \"linux\", \"Test Qt's non-native dialog\")\n    def test_get_save_filename_non_native(self):\n        widget = self.widget\n        widget._initial_start_dir = lambda: \"baz\"\n        widget.filters = dict.fromkeys(\"abc\")\n        widget.filter = \"b\"\n        dlg = widget.SaveFileDialog = Mock()  # pylint: disable=invalid-name\n        instance = dlg.return_value\n        instance.selectedFiles.return_value = [\"foo\"]\n        instance.selectedNameFilter.return_value = \"bar\"\n        self.assertEqual(widget.get_save_filename(), (\"foo\", \"bar\"))\n        self.assertEqual(dlg.call_args[0][2], \"baz\")\n        self.assertEqual(dlg.call_args[0][3], \"a;;b;;c\")\n        instance.selectNameFilter.assert_called_with(\"b\")\n\n        instance.exec.return_value = QFileDialog.Rejected\n        self.assertEqual(widget.get_save_filename(), (\"\", \"\"))\n\n    @unittest.skipUnless(sys.platform == \"linux\", \"Test Qt's non-native dialog\")\n    def test_save_file_dialog_enforces_extension(self):\n        dialog = OWSave.SaveFileDialog(\n            None, \"Save File\", \"high.txt\",\n            \"Bar files (*.bar);;Low files (*.low)\")\n\n        dialog.selectNameFilter(\"Low files (*.low)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n        dialog.selectFile(\"high.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n        dialog.selectNameFilter(\"Bar files (*.bar)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.bar\"))\n\n        dialog.selectFile(\"middle.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/middle.bar\"))\n\n        dialog.filterSelected.emit(\"Low files (*.low)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/middle.low\"))\n\n        dialog.selectFile(\"high.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n    def test_initial_start_dir(self):\n        widget = self.widget\n        widget.filename = _w(\"/usr/foo/bar.csv\")\n        self.assertEqual(widget._initial_start_dir(),\n                         _w(os.path.expanduser(\"~/\")))\n\n        with patch(\"os.path.exists\", return_value=True):\n            widget.filename = _w(\"/usr/foo/bar.csv\")\n            self.assertEqual(widget._initial_start_dir(), widget.filename)\n\n            widget.filename = \"\"\n            widget.last_dir = _w(\"/usr/bar\")\n            self.assertEqual(widget._initial_start_dir(), _w(\"/usr/bar/\"))\n\n            widget.last_dir = _w(\"/usr/bar\")\n            self.send_signal(widget.Inputs.data, self.iris)\n            self.assertEqual(widget._initial_start_dir(),\n                             _w(\"/usr/bar/iris.csv\"))\n\n            widget.last_dir = \"\"\n            self.assertEqual(widget._initial_start_dir(),\n                             os.path.expanduser(_w(\"~/iris.csv\")))\n\n    @patch(\"Orange.widgets.data.owsave.QFileDialog.getSaveFileName\")\n    def test_save_file_sets_name(self, filedialog):\n        widget = self.widget\n        filters = iter(widget.filters)\n        filter1 = next(filters)\n        filter2 = next(filters)\n\n        widget.filename = _w(\"/usr/foo/bar.csv\")\n        widget.last_dir = _w(\"/usr/foo/\")\n        widget.filter = filter1\n\n        widget._update_messages = Mock()\n        widget.save_file = Mock()\n\n        widget.get_save_filename = Mock(return_value=(\"\", filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/usr/foo/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/usr/foo/\"))\n        self.assertEqual(widget.filter, filter1)\n        widget._update_messages.assert_not_called()\n        widget.save_file.assert_not_called()\n\n        widget.get_save_filename = \\\n            Mock(return_value=(_w(\"/bar/bar.csv\"), filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/bar/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/bar\"))\n        self.assertEqual(widget.filter, filter2)\n        self.assertIn(\"bar.csv\", widget.bt_save.text())\n        widget._update_messages.assert_called()\n        widget.save_file.assert_called()\n\n        widget.get_save_filename = Mock(return_value=(\"\", filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/bar/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/bar\"))\n        self.assertEqual(widget.filter, filter2)\n        self.assertIn(\"bar.csv\", widget.bt_save.text())\n        widget._update_messages.assert_called()\n        widget.save_file.assert_called()\n\n    def test_save_file_calls_save_as(self):\n        widget = self.widget\n        widget.save_file_as = Mock()\n\n        self.send_signal(widget.Inputs.data, self.iris)\n\n        widget.filename = \"\"\n        widget.save_file()\n        widget.save_file_as.assert_called()\n        widget.save_file_as.reset_mock()\n\n        widget.filename = \"bar.csv\"\n        widget.save_file()\n        widget.save_file_as.assert_not_called()\n\n    def test_save_file_checks_can_save(self):\n        widget = self.widget\n        widget.get_save_filename = Mock(return_value=(\"\", 0))\n\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"foo\"\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"\"\n        self.send_signal(widget.Inputs.data, self.iris)\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"foo\"\n        widget.save_file()\n        widget.writer.write.assert_called()\n        widget.writer.reset_mock()\n\n        self.iris.X = sp.csr_matrix(self.iris.X)\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.writer.SUPPORT_SPARSE_DATA = True\n        widget.save_file()\n        widget.writer.write.assert_called()\n\n    def test_save_file_write_errors(self):\n        widget = self.widget\n        datasig = widget.Inputs.data\n\n        widget.auto_save = True\n        widget.filename = _w(\"bar/foo\")\n\n        widget.writer.write.side_effect = IOError\n        self.send_signal(datasig, self.iris)\n        self.assertTrue(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = None\n        self.send_signal(datasig, self.iris)\n        self.assertFalse(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = IOError\n        self.send_signal(datasig, self.iris)\n        self.assertTrue(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = None\n        self.send_signal(datasig, None)\n        self.assertFalse(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = ValueError\n        self.assertRaises(ValueError, self.send_signal, datasig, self.iris)\n\n    def test_save_file_write(self):\n        widget = self.widget\n        datasig = widget.Inputs.data\n\n        widget.auto_save = True\n\n        widget.filename = _w(\"bar/foo.csv\")\n        widget.add_type_annotations = True\n        self.send_signal(datasig, self.iris)\n        widget.writer.write.assert_called_with(\n            _w(\"bar/foo.csv\"), self.iris, True)\n\n    def test_file_name_label(self):\n        widget = self.widget\n\n        widget.filename = \"\"\n        widget._update_messages()\n        self.assertFalse(widget.Error.no_file_name.is_shown())\n\n        widget.auto_save = True\n        widget._update_messages()\n        self.assertTrue(widget.Error.no_file_name.is_shown())\n\n        widget.filename = _w(\"/foo/bar/baz.csv\")\n        widget._update_messages()\n        self.assertFalse(widget.Error.no_file_name.is_shown())\n\n    def test_sparse_error(self):\n        widget = self.widget\n        err = widget.Error.unsupported_sparse\n\n        widget.writer = ExcelReader\n        widget.filename = \"foo.xlsx\"\n        widget.data = self.iris\n\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n        widget.data.X = sp.csr_matrix(widget.data.X)\n        widget._update_messages()\n        self.assertTrue(err.is_shown())\n\n        widget.writer = PickleReader\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n        widget.writer = ExcelReader\n        widget._update_messages()\n        self.assertTrue(err.is_shown())\n\n        widget.data = None\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n    def test_send_report(self):\n        widget = self.widget\n\n        widget.report_items = Mock()\n        for writer in widget.filters.values():\n            widget.writer = writer\n            for widget.add_type_annotations in (False, True):\n                widget.filename = f\"foo.{writer.EXTENSIONS[0]}\"\n                widget.send_report()\n                items = dict(widget.report_items.call_args[0][0])\n                msg = f\"for {writer}, annotations={widget.add_type_annotations}\"\n                self.assertEqual(items[\"File name\"], widget.filename, msg=msg)\n                if writer.OPTIONAL_TYPE_ANNOTATIONS:\n                    self.assertEqual(\n                        items[\"Type annotations\"],\n                        [\"No\", \"Yes\"][widget.add_type_annotations], msg=msg)\n                else:\n                    self.assertFalse(items[\"Type annotations\"], msg=msg)\n\n    def test_migration_to_version_2(self):\n        const_settings = {\n            'add_type_annotations': True, 'auto_save': False,\n            'controlAreaVisible': True, 'last_dir': '/home/joe/Desktop',\n            '__version__': 1}\n\n        # No compression, Tab-separated values\n        settings = {**const_settings,\n                    'compress': False, 'compression': 'gzip (.gz)',\n                    'filetype': 'Tab-separated values (.tab)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Tab-separated values (*.tab)\"})\n\n        # Compression; ignore compression format (.xz is no longer supported)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Tab-separated values (.tab)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Compressed Tab-separated values (*.tab.gz)\"})\n\n        # No compression, Excel\n        settings = {**const_settings,\n                    'compress': False, 'compression': 'lzma (.xz)',\n                    'filetype': 'Microsoft Excel spreadsheet (.xlsx)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Microsoft Excel spreadsheet (*.xlsx)\"})\n\n        # Excel with compression - compression must be ignored\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Microsoft Excel spreadsheet (.xlsx)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Microsoft Excel spreadsheet (*.xlsx)\"})\n\n        # Missing filetype (is this possible?)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)'}\n        OWSave.migrate_settings(settings)\n        self.assertTrue(settings[\"filter\"] in OWSave.filters)\n\n        # Unsupported file format (is this possible?)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Bar file (.bar)'}\n        OWSave.migrate_settings(settings)\n        self.assertTrue(settings[\"filter\"] in OWSave.filters)\n\n\n\nclass TestFunctionalOWSave(WidgetTest):\n    def setUp(self):\n        self.widget = self.create_widget(OWSave)  # type: OWSave\n        self.iris = Table(\"iris\")\n\n    def test_save_uncompressed(self):\n        widget = self.widget\n        widget.auto_save = False\n\n        spiris = Table(\"iris\")\n        spiris.X = sp.csr_matrix(spiris.X)\n\n        for selected_filter, writer in widget.filters.items():\n            widget.write = writer\n            ext = writer.EXTENSIONS[0]\n            with named_file(\"\", suffix=ext) as filename:\n                widget.get_save_filename = Mock(\n                    return_value=(filename, selected_filter))\n\n                self.send_signal(widget.Inputs.data, self.iris)\n                widget.save_file_as()\n                self.assertEqual(len(Table(filename)), 150)\n\n                if writer.SUPPORT_SPARSE_DATA:\n                    self.send_signal(widget.Inputs.data, spiris)\n                    widget.save_file()\n                    self.assertEqual(len(Table(filename)), 150)\n\n\nclass TestOWSaveUtils(unittest.TestCase):\n    def test_replace_extension(self):\n        replace = OWSave._replace_extension\n        fname = \"/bing.bada.boom/foo.bar.baz\"\n        self.assertEqual(replace(fname, \".baz\"), fname)\n        self.assertEqual(replace(fname, \".bar.baz\"), fname)\n        self.assertEqual(replace(fname, \".txt\"), \"/bing.bada.boom/foo.txt\")\n\n        fname = \"foo.bar.baz\"\n        self.assertEqual(replace(fname, \".baz\"), fname)\n        self.assertEqual(replace(fname, \".bar.baz\"), fname)\n        self.assertEqual(replace(fname, \".txt\"), \"foo.txt\")\n        self.assertEqual(replace(fname, \".bar.txt\"), \"foo.bar.txt\")\n\n        fname = \"/bing.bada.boom/foo\"\n        self.assertEqual(replace(fname, \".baz\"), fname + \".baz\")\n        self.assertEqual(replace(fname, \".bar.baz\"), fname + \".bar.baz\")\n\n    def test_extension_from_filter(self):\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.foo.ba)\"), \".foo.ba\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.foo.bar)\"), \".foo.bar\")\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n",
            "new_file_content": "# pylint: disable=missing-docstring, protected-access\nimport unittest\nfrom unittest.mock import patch, Mock\nimport os\nimport sys\n\nimport scipy.sparse as sp\nfrom AnyQt.QtWidgets import QFileDialog\n\nfrom Orange.data import Table\nfrom Orange.data.io import TabReader, PickleReader, ExcelReader\nfrom Orange.tests import named_file\nfrom Orange.widgets.tests.base import WidgetTest\nfrom Orange.widgets.data.owsave import OWSave\n\n\n# Yay, MS Windows!\n# This is not the proper general way to do it, but it's simplest and sufficient\n# Short name is suitable for the function's purpose\ndef _w(s):  # pylint: disable=invalid-name\n    return s.replace(\"/\", os.sep)\n\n\nclass TestOWSave(WidgetTest):\n    def setUp(self):\n        class OWSaveMockWriter(OWSave):\n            writer = Mock()\n            writer.EXTENSIONS = [\".csv\"]\n            writer.SUPPORT_COMPRESSED = True\n            writer.SUPPORT_SPARSE_DATA = False\n            writer.OPTIONAL_TYPE_ANNOTATIONS = False\n\n        self.widget = self.create_widget(OWSaveMockWriter)  # type: OWSave\n        self.iris = Table(\"iris\")\n\n    def test_dataset(self):\n        widget = self.widget\n        widget.auto_save = True\n        insum = widget.info.set_input_summary = Mock()\n        savefile = widget.save_file = Mock()\n\n        datasig = widget.Inputs.data\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        insum.reset_mock()\n        savefile.reset_mock()\n\n        widget.filename = \"foo.tab\"\n        widget.writer = TabReader\n        widget.auto_save = False\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        savefile.assert_not_called()\n\n        widget.auto_save = True\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        savefile.assert_called()\n\n        self.send_signal(datasig, None)\n        insum.assert_called_with(widget.info.NoInput)\n\n    @unittest.skipUnless(sys.platform == \"linux\", \"Test Qt's non-native dialog\")\n    def test_get_save_filename_non_native(self):\n        widget = self.widget\n        widget._initial_start_dir = lambda: \"baz\"\n        widget.filters = dict.fromkeys(\"abc\")\n        widget.filter = \"b\"\n        dlg = widget.SaveFileDialog = Mock()  # pylint: disable=invalid-name\n        instance = dlg.return_value\n        instance.selectedFiles.return_value = [\"foo\"]\n        instance.selectedNameFilter.return_value = \"bar\"\n        self.assertEqual(widget.get_save_filename(), (\"foo\", \"bar\"))\n        self.assertEqual(dlg.call_args[0][2], \"baz\")\n        self.assertEqual(dlg.call_args[0][3], \"a;;b;;c\")\n        instance.selectNameFilter.assert_called_with(\"b\")\n\n        instance.exec.return_value = QFileDialog.Rejected\n        self.assertEqual(widget.get_save_filename(), (\"\", \"\"))\n\n    @unittest.skipUnless(sys.platform == \"linux\", \"Test Qt's non-native dialog\")\n    def test_save_file_dialog_enforces_extension(self):\n        dialog = OWSave.SaveFileDialog(\n            None, \"Save File\", \"high.txt\",\n            \"Bar files (*.bar);;Low files (*.low)\")\n\n        dialog.selectNameFilter(\"Low files (*.low)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n        dialog.selectFile(\"high.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n        dialog.selectNameFilter(\"Bar files (*.bar)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.bar\"))\n\n        dialog.selectFile(\"middle.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/middle.bar\"))\n\n        dialog.filterSelected.emit(\"Low files (*.low)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/middle.low\"))\n\n        dialog.selectFile(\"high.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n    def test_initial_start_dir(self):\n        widget = self.widget\n        widget.filename = _w(\"/usr/foo/bar.csv\")\n        self.assertEqual(widget._initial_start_dir(),\n                         _w(os.path.expanduser(\"~/\")))\n\n        with patch(\"os.path.exists\", return_value=True):\n            widget.filename = _w(\"/usr/foo/bar.csv\")\n            self.assertEqual(widget._initial_start_dir(), widget.filename)\n\n            widget.filename = \"\"\n            widget.last_dir = _w(\"/usr/bar\")\n            self.assertEqual(widget._initial_start_dir(), _w(\"/usr/bar/\"))\n\n            widget.last_dir = _w(\"/usr/bar\")\n            self.send_signal(widget.Inputs.data, self.iris)\n            self.assertEqual(widget._initial_start_dir(),\n                             _w(\"/usr/bar/iris.csv\"))\n\n            widget.last_dir = \"\"\n            self.assertEqual(widget._initial_start_dir(),\n                             os.path.expanduser(_w(\"~/iris.csv\")))\n\n    @patch(\"Orange.widgets.data.owsave.QFileDialog.getSaveFileName\")\n    def test_save_file_sets_name(self, filedialog):\n        widget = self.widget\n        filters = iter(widget.filters)\n        filter1 = next(filters)\n        filter2 = next(filters)\n\n        widget.filename = _w(\"/usr/foo/bar.csv\")\n        widget.last_dir = _w(\"/usr/foo/\")\n        widget.filter = filter1\n\n        widget._update_messages = Mock()\n        widget.save_file = Mock()\n\n        widget.get_save_filename = Mock(return_value=(\"\", filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/usr/foo/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/usr/foo/\"))\n        self.assertEqual(widget.filter, filter1)\n        widget._update_messages.assert_not_called()\n        widget.save_file.assert_not_called()\n\n        widget.get_save_filename = \\\n            Mock(return_value=(_w(\"/bar/bar.csv\"), filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/bar/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/bar\"))\n        self.assertEqual(widget.filter, filter2)\n        self.assertIn(\"bar.csv\", widget.bt_save.text())\n        widget._update_messages.assert_called()\n        widget.save_file.assert_called()\n\n        widget.get_save_filename = Mock(return_value=(\"\", filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/bar/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/bar\"))\n        self.assertEqual(widget.filter, filter2)\n        self.assertIn(\"bar.csv\", widget.bt_save.text())\n        widget._update_messages.assert_called()\n        widget.save_file.assert_called()\n\n    def test_save_file_calls_save_as(self):\n        widget = self.widget\n        widget.save_file_as = Mock()\n\n        self.send_signal(widget.Inputs.data, self.iris)\n\n        widget.filename = \"\"\n        widget.save_file()\n        widget.save_file_as.assert_called()\n        widget.save_file_as.reset_mock()\n\n        widget.filename = \"bar.csv\"\n        widget.save_file()\n        widget.save_file_as.assert_not_called()\n\n    def test_save_file_checks_can_save(self):\n        widget = self.widget\n        widget.get_save_filename = Mock(return_value=(\"\", 0))\n\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"foo\"\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"\"\n        self.send_signal(widget.Inputs.data, self.iris)\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"foo\"\n        widget.save_file()\n        widget.writer.write.assert_called()\n        widget.writer.reset_mock()\n\n        self.iris.X = sp.csr_matrix(self.iris.X)\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.writer.SUPPORT_SPARSE_DATA = True\n        widget.save_file()\n        widget.writer.write.assert_called()\n\n    def test_save_file_write_errors(self):\n        widget = self.widget\n        datasig = widget.Inputs.data\n\n        widget.auto_save = True\n        widget.filename = _w(\"bar/foo\")\n\n        widget.writer.write.side_effect = IOError\n        self.send_signal(datasig, self.iris)\n        self.assertTrue(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = None\n        self.send_signal(datasig, self.iris)\n        self.assertFalse(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = IOError\n        self.send_signal(datasig, self.iris)\n        self.assertTrue(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = None\n        self.send_signal(datasig, None)\n        self.assertFalse(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = ValueError\n        self.assertRaises(ValueError, self.send_signal, datasig, self.iris)\n\n    def test_save_file_write(self):\n        widget = self.widget\n        datasig = widget.Inputs.data\n\n        widget.auto_save = True\n\n        widget.filename = _w(\"bar/foo.csv\")\n        widget.add_type_annotations = True\n        self.send_signal(datasig, self.iris)\n        widget.writer.write.assert_called_with(\n            _w(\"bar/foo.csv\"), self.iris, True)\n\n    def test_file_name_label(self):\n        widget = self.widget\n\n        widget.filename = \"\"\n        widget._update_messages()\n        self.assertFalse(widget.Error.no_file_name.is_shown())\n\n        widget.auto_save = True\n        widget._update_messages()\n        self.assertTrue(widget.Error.no_file_name.is_shown())\n\n        widget.filename = _w(\"/foo/bar/baz.csv\")\n        widget._update_messages()\n        self.assertFalse(widget.Error.no_file_name.is_shown())\n\n    def test_sparse_error(self):\n        widget = self.widget\n        err = widget.Error.unsupported_sparse\n\n        widget.writer = ExcelReader\n        widget.filename = \"foo.xlsx\"\n        widget.data = self.iris\n\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n        widget.data.X = sp.csr_matrix(widget.data.X)\n        widget._update_messages()\n        self.assertTrue(err.is_shown())\n\n        widget.writer = PickleReader\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n        widget.writer = ExcelReader\n        widget._update_messages()\n        self.assertTrue(err.is_shown())\n\n        widget.data = None\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n    def test_send_report(self):\n        widget = self.widget\n\n        widget.report_items = Mock()\n        for writer in widget.filters.values():\n            widget.writer = writer\n            for widget.add_type_annotations in (False, True):\n                widget.filename = f\"foo.{writer.EXTENSIONS[0]}\"\n                widget.send_report()\n                items = dict(widget.report_items.call_args[0][0])\n                msg = f\"for {writer}, annotations={widget.add_type_annotations}\"\n                self.assertEqual(items[\"File name\"], widget.filename, msg=msg)\n                if writer.OPTIONAL_TYPE_ANNOTATIONS:\n                    self.assertEqual(\n                        items[\"Type annotations\"],\n                        [\"No\", \"Yes\"][widget.add_type_annotations], msg=msg)\n                else:\n                    self.assertFalse(items[\"Type annotations\"], msg=msg)\n\n    def test_migration_to_version_2(self):\n        const_settings = {\n            'add_type_annotations': True, 'auto_save': False,\n            'controlAreaVisible': True, 'last_dir': '/home/joe/Desktop',\n            '__version__': 1}\n\n        # No compression, Tab-separated values\n        settings = {**const_settings,\n                    'compress': False, 'compression': 'gzip (.gz)',\n                    'filetype': 'Tab-separated values (.tab)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Tab-separated values (*.tab)\"})\n\n        # Compression; ignore compression format (.xz is no longer supported)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Tab-separated values (.tab)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Compressed Tab-separated values (*.tab.gz)\"})\n\n        # No compression, Excel\n        settings = {**const_settings,\n                    'compress': False, 'compression': 'lzma (.xz)',\n                    'filetype': 'Microsoft Excel spreadsheet (.xlsx)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Microsoft Excel spreadsheet (*.xlsx)\"})\n\n        # Excel with compression - compression must be ignored\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Microsoft Excel spreadsheet (.xlsx)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Microsoft Excel spreadsheet (*.xlsx)\"})\n\n        # Missing filetype (is this possible?)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)'}\n        OWSave.migrate_settings(settings)\n        self.assertTrue(settings[\"filter\"] in OWSave.filters)\n\n        # Unsupported file format (is this possible?)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Bar file (.bar)'}\n        OWSave.migrate_settings(settings)\n        self.assertTrue(settings[\"filter\"] in OWSave.filters)\n\n\n\nclass TestFunctionalOWSave(WidgetTest):\n    def setUp(self):\n        self.widget = self.create_widget(OWSave)  # type: OWSave\n        self.iris = Table(\"iris\")\n\n    def test_save_uncompressed(self):\n        widget = self.widget\n        widget.auto_save = False\n\n        spiris = Table(\"iris\")\n        spiris.X = sp.csr_matrix(spiris.X)\n\n        for selected_filter, writer in widget.filters.items():\n            widget.write = writer\n            ext = writer.EXTENSIONS[0]\n            with named_file(\"\", suffix=ext) as filename:\n                widget.get_save_filename = Mock(\n                    return_value=(filename, selected_filter))\n\n                self.send_signal(widget.Inputs.data, self.iris)\n                widget.save_file_as()\n                self.assertEqual(len(Table(filename)), 150)\n\n                if writer.SUPPORT_SPARSE_DATA:\n                    self.send_signal(widget.Inputs.data, spiris)\n                    widget.save_file()\n                    self.assertEqual(len(Table(filename)), 150)\n\n\nclass TestOWSaveUtils(unittest.TestCase):\n    def test_replace_extension(self):\n        replace = OWSave._replace_extension\n        fname = \"/bing.bada.boom/foo.1942.tab\"\n        self.assertEqual(\n            replace(fname, \".tab\"), \"/bing.bada.boom/foo.1942.tab\")\n        self.assertEqual(\n            replace(fname, \".tab.gz\"), \"/bing.bada.boom/foo.1942.tab.gz\")\n        self.assertEqual(\n            replace(fname, \".xlsx\"), \"/bing.bada.boom/foo.1942.xlsx\")\n\n        fname = \"foo.tab.gz\"\n        self.assertEqual(replace(fname, \".tab\"), \"foo.tab\")\n        self.assertEqual(replace(fname, \".tab.gz\"), \"foo.tab.gz\")\n        self.assertEqual(replace(fname, \".csv\"), \"foo.csv\")\n        self.assertEqual(replace(fname, \".csv.gz\"), \"foo.csv.gz\")\n\n        fname = \"/bing.bada.boom/foo\"\n        self.assertEqual(replace(fname, \".tab\"), fname + \".tab\")\n        self.assertEqual(replace(fname, \".tab.gz\"), fname + \".tab.gz\")\n\n    def test_extension_from_filter(self):\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.foo.ba)\"), \".foo.ba\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.foo.bar)\"), \".foo.bar\")\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n",
            "header": {
                "file": {
                    "path": "Orange/widgets/data/tests/test_owsave.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "be33324bc",
                "new_commit_hash": "9b6b31766",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/widgets/data/tests/test_owsave.py"
            },
            "plus_file": {
                "path": "b/Orange/widgets/data/tests/test_owsave.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 402,
                            "length": 20
                        },
                        "new_range": {
                            "start": 402,
                            "length": 23
                        },
                        "section": "class TestFunctionalOWSave(WidgetTest):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "class TestOWSaveUtils(unittest.TestCase):",
                                "type": "context"
                            },
                            {
                                "content": "    def test_replace_extension(self):",
                                "type": "context"
                            },
                            {
                                "content": "        replace = OWSave._replace_extension",
                                "type": "context"
                            },
                            {
                                "content": "        fname = \"/bing.bada.boom/foo.bar.baz\"",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".baz\"), fname)",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".bar.baz\"), fname)",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".txt\"), \"/bing.bada.boom/foo.txt\")",
                                "type": "deleted"
                            },
                            {
                                "content": "        fname = \"/bing.bada.boom/foo.1942.tab\"",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(",
                                "type": "added"
                            },
                            {
                                "content": "            replace(fname, \".tab\"), \"/bing.bada.boom/foo.1942.tab\")",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(",
                                "type": "added"
                            },
                            {
                                "content": "            replace(fname, \".tab.gz\"), \"/bing.bada.boom/foo.1942.tab.gz\")",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(",
                                "type": "added"
                            },
                            {
                                "content": "            replace(fname, \".xlsx\"), \"/bing.bada.boom/foo.1942.xlsx\")",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "        fname = \"foo.bar.baz\"",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".baz\"), fname)",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".bar.baz\"), fname)",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".txt\"), \"foo.txt\")",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".bar.txt\"), \"foo.bar.txt\")",
                                "type": "deleted"
                            },
                            {
                                "content": "        fname = \"foo.tab.gz\"",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".tab\"), \"foo.tab\")",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".tab.gz\"), \"foo.tab.gz\")",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".csv\"), \"foo.csv\")",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".csv.gz\"), \"foo.csv.gz\")",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "        fname = \"/bing.bada.boom/foo\"",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".baz\"), fname + \".baz\")",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".bar.baz\"), fname + \".bar.baz\")",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".tab\"), fname + \".tab\")",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(replace(fname, \".tab.gz\"), fname + \".tab.gz\")",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "    def test_extension_from_filter(self):",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/data/tests/test_owsave.py",
                            "type": "class",
                            "name": "TestOWSaveUtils",
                            "content": "class TestOWSaveUtils(unittest.TestCase):\n    def test_replace_extension(self):\n        replace = OWSave._replace_extension\n        fname = \"/bing.bada.boom/foo.bar.baz\"\n        self.assertEqual(replace(fname, \".baz\"), fname)\n        self.assertEqual(replace(fname, \".bar.baz\"), fname)\n        self.assertEqual(replace(fname, \".txt\"), \"/bing.bada.boom/foo.txt\")\n\n        fname = \"foo.bar.baz\"\n        self.assertEqual(replace(fname, \".baz\"), fname)\n        self.assertEqual(replace(fname, \".bar.baz\"), fname)\n        self.assertEqual(replace(fname, \".txt\"), \"foo.txt\")\n        self.assertEqual(replace(fname, \".bar.txt\"), \"foo.bar.txt\")\n\n        fname = \"/bing.bada.boom/foo\"\n        self.assertEqual(replace(fname, \".baz\"), fname + \".baz\")\n        self.assertEqual(replace(fname, \".bar.baz\"), fname + \".bar.baz\")\n\n    def test_extension_from_filter(self):\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.foo.ba)\"), \".foo.ba\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.foo.bar)\"), \".foo.bar\")",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 402,
                            "end_lineno": 428,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/widgets/data/tests/test_owsave.py",
                            "type": "method",
                            "name": "TestOWSaveUtils.test_replace_extension",
                            "content": "class TestOWSaveUtils(unittest.TestCase):\n    def test_replace_extension(self):\n        replace = OWSave._replace_extension\n        fname = \"/bing.bada.boom/foo.bar.baz\"\n        self.assertEqual(replace(fname, \".baz\"), fname)\n        self.assertEqual(replace(fname, \".bar.baz\"), fname)\n        self.assertEqual(replace(fname, \".txt\"), \"/bing.bada.boom/foo.txt\")\n\n        fname = \"foo.bar.baz\"\n        self.assertEqual(replace(fname, \".baz\"), fname)\n        self.assertEqual(replace(fname, \".bar.baz\"), fname)\n        self.assertEqual(replace(fname, \".txt\"), \"foo.txt\")\n        self.assertEqual(replace(fname, \".bar.txt\"), \"foo.bar.txt\")\n\n        fname = \"/bing.bada.boom/foo\"\n        self.assertEqual(replace(fname, \".baz\"), fname + \".baz\")\n        self.assertEqual(replace(fname, \".bar.baz\"), fname + \".bar.baz\")\n\n    def test_extension_from_filter(self):\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.foo.ba)\"), \".foo.ba\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.foo.bar)\"), \".foo.bar\")",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 403,
                            "end_lineno": 418,
                            "parent": {
                                "file_name": "Orange/widgets/data/tests/test_owsave.py",
                                "type": "class",
                                "name": "TestOWSaveUtils",
                                "content": "class TestOWSaveUtils(unittest.TestCase):\n    def test_replace_extension(self):\n        replace = OWSave._replace_extension\n        fname = \"/bing.bada.boom/foo.bar.baz\"\n        self.assertEqual(replace(fname, \".baz\"), fname)\n        self.assertEqual(replace(fname, \".bar.baz\"), fname)\n        self.assertEqual(replace(fname, \".txt\"), \"/bing.bada.boom/foo.txt\")\n\n        fname = \"foo.bar.baz\"\n        self.assertEqual(replace(fname, \".baz\"), fname)\n        self.assertEqual(replace(fname, \".bar.baz\"), fname)\n        self.assertEqual(replace(fname, \".txt\"), \"foo.txt\")\n        self.assertEqual(replace(fname, \".bar.txt\"), \"foo.bar.txt\")\n\n        fname = \"/bing.bada.boom/foo\"\n        self.assertEqual(replace(fname, \".baz\"), fname + \".baz\")\n        self.assertEqual(replace(fname, \".bar.baz\"), fname + \".bar.baz\")\n\n    def test_extension_from_filter(self):\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.foo.ba)\"), \".foo.ba\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.foo.bar)\"), \".foo.bar\")",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 402,
                                "end_lineno": 428,
                                "parent": null
                            }
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                }
            ]
        }
    ],
    "old_commit_hash": "c56fafab522f12165258439d7bd133a6c5d4cc12^",
    "new_commit_hash": "c56fafab522f12165258439d7bd133a6c5d4cc12",
    "commit_message": "OWSave: Strip only known extensions when enforcing default extensions",
    "commit_date": "2019-03-01T13:21:19+01:00",
    "metadata": {}
}
{
    "repo_name": "orange3",
    "new_commit_hash": "c56fafab522f12165258439d7bd133a6c5d4cc12",
    "test_file_codes": [
        "# pylint: disable=missing-docstring, protected-access\nimport unittest\nfrom unittest.mock import patch, Mock\nimport os\nimport sys\n\nimport scipy.sparse as sp\nfrom AnyQt.QtWidgets import QFileDialog\n\nfrom Orange.data import Table\nfrom Orange.data.io import TabReader, PickleReader, ExcelReader\nfrom Orange.tests import named_file\nfrom Orange.widgets.tests.base import WidgetTest\nfrom Orange.widgets.data.owsave import OWSave\n\n\n# Yay, MS Windows!\n# This is not the proper general way to do it, but it's simplest and sufficient\n# Short name is suitable for the function's purpose\ndef _w(s):  # pylint: disable=invalid-name\n    return s.replace(\"/\", os.sep)\n\n\nclass TestOWSave(WidgetTest):\n    def setUp(self):\n        class OWSaveMockWriter(OWSave):\n            writer = Mock()\n            writer.EXTENSIONS = [\".csv\"]\n            writer.SUPPORT_COMPRESSED = True\n            writer.SUPPORT_SPARSE_DATA = False\n            writer.OPTIONAL_TYPE_ANNOTATIONS = False\n\n        self.widget = self.create_widget(OWSaveMockWriter)  # type: OWSave\n        self.iris = Table(\"iris\")\n\n    def test_dataset(self):\n        widget = self.widget\n        widget.auto_save = True\n        insum = widget.info.set_input_summary = Mock()\n        savefile = widget.save_file = Mock()\n\n        datasig = widget.Inputs.data\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        insum.reset_mock()\n        savefile.reset_mock()\n\n        widget.filename = \"foo.tab\"\n        widget.writer = TabReader\n        widget.auto_save = False\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        savefile.assert_not_called()\n\n        widget.auto_save = True\n        self.send_signal(datasig, self.iris)\n        self.assertEqual(insum.call_args[0][0], \"150\")\n        savefile.assert_called()\n\n        self.send_signal(datasig, None)\n        insum.assert_called_with(widget.info.NoInput)\n\n    @unittest.skipUnless(sys.platform == \"linux\", \"Test Qt's non-native dialog\")\n    def test_get_save_filename_non_native(self):\n        widget = self.widget\n        widget._initial_start_dir = lambda: \"baz\"\n        widget.filters = dict.fromkeys(\"abc\")\n        widget.filter = \"b\"\n        dlg = widget.SaveFileDialog = Mock()  # pylint: disable=invalid-name\n        instance = dlg.return_value\n        instance.selectedFiles.return_value = [\"foo\"]\n        instance.selectedNameFilter.return_value = \"bar\"\n        self.assertEqual(widget.get_save_filename(), (\"foo\", \"bar\"))\n        self.assertEqual(dlg.call_args[0][2], \"baz\")\n        self.assertEqual(dlg.call_args[0][3], \"a;;b;;c\")\n        instance.selectNameFilter.assert_called_with(\"b\")\n\n        instance.exec.return_value = QFileDialog.Rejected\n        self.assertEqual(widget.get_save_filename(), (\"\", \"\"))\n\n    @unittest.skipUnless(sys.platform == \"linux\", \"Test Qt's non-native dialog\")\n    def test_save_file_dialog_enforces_extension(self):\n        dialog = OWSave.SaveFileDialog(\n            None, \"Save File\", \"high.txt\",\n            \"Bar files (*.bar);;Low files (*.low)\")\n\n        dialog.selectNameFilter(\"Low files (*.low)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n        dialog.selectFile(\"high.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n        dialog.selectNameFilter(\"Bar files (*.bar)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.bar\"))\n\n        dialog.selectFile(\"middle.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/middle.bar\"))\n\n        dialog.filterSelected.emit(\"Low files (*.low)\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/middle.low\"))\n\n        dialog.selectFile(\"high.txt\")\n        self.assertTrue(dialog.selectedFiles()[0].endswith(\"/high.low\"))\n\n    def test_initial_start_dir(self):\n        widget = self.widget\n        widget.filename = _w(\"/usr/foo/bar.csv\")\n        self.assertEqual(widget._initial_start_dir(),\n                         _w(os.path.expanduser(\"~/\")))\n\n        with patch(\"os.path.exists\", return_value=True):\n            widget.filename = _w(\"/usr/foo/bar.csv\")\n            self.assertEqual(widget._initial_start_dir(), widget.filename)\n\n            widget.filename = \"\"\n            widget.last_dir = _w(\"/usr/bar\")\n            self.assertEqual(widget._initial_start_dir(), _w(\"/usr/bar/\"))\n\n            widget.last_dir = _w(\"/usr/bar\")\n            self.send_signal(widget.Inputs.data, self.iris)\n            self.assertEqual(widget._initial_start_dir(),\n                             _w(\"/usr/bar/iris.csv\"))\n\n            widget.last_dir = \"\"\n            self.assertEqual(widget._initial_start_dir(),\n                             os.path.expanduser(_w(\"~/iris.csv\")))\n\n    @patch(\"Orange.widgets.data.owsave.QFileDialog.getSaveFileName\")\n    def test_save_file_sets_name(self, filedialog):\n        widget = self.widget\n        filters = iter(widget.filters)\n        filter1 = next(filters)\n        filter2 = next(filters)\n\n        widget.filename = _w(\"/usr/foo/bar.csv\")\n        widget.last_dir = _w(\"/usr/foo/\")\n        widget.filter = filter1\n\n        widget._update_messages = Mock()\n        widget.save_file = Mock()\n\n        widget.get_save_filename = Mock(return_value=(\"\", filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/usr/foo/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/usr/foo/\"))\n        self.assertEqual(widget.filter, filter1)\n        widget._update_messages.assert_not_called()\n        widget.save_file.assert_not_called()\n\n        widget.get_save_filename = \\\n            Mock(return_value=(_w(\"/bar/bar.csv\"), filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/bar/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/bar\"))\n        self.assertEqual(widget.filter, filter2)\n        self.assertIn(\"bar.csv\", widget.bt_save.text())\n        widget._update_messages.assert_called()\n        widget.save_file.assert_called()\n\n        widget.get_save_filename = Mock(return_value=(\"\", filter2))\n        widget.save_file_as()\n        self.assertEqual(widget.filename, _w(\"/bar/bar.csv\"))\n        self.assertEqual(widget.last_dir, _w(\"/bar\"))\n        self.assertEqual(widget.filter, filter2)\n        self.assertIn(\"bar.csv\", widget.bt_save.text())\n        widget._update_messages.assert_called()\n        widget.save_file.assert_called()\n\n    def test_save_file_calls_save_as(self):\n        widget = self.widget\n        widget.save_file_as = Mock()\n\n        self.send_signal(widget.Inputs.data, self.iris)\n\n        widget.filename = \"\"\n        widget.save_file()\n        widget.save_file_as.assert_called()\n        widget.save_file_as.reset_mock()\n\n        widget.filename = \"bar.csv\"\n        widget.save_file()\n        widget.save_file_as.assert_not_called()\n\n    def test_save_file_checks_can_save(self):\n        widget = self.widget\n        widget.get_save_filename = Mock(return_value=(\"\", 0))\n\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"foo\"\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"\"\n        self.send_signal(widget.Inputs.data, self.iris)\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.filename = \"foo\"\n        widget.save_file()\n        widget.writer.write.assert_called()\n        widget.writer.reset_mock()\n\n        self.iris.X = sp.csr_matrix(self.iris.X)\n        widget.save_file()\n        widget.writer.write.assert_not_called()\n\n        widget.writer.SUPPORT_SPARSE_DATA = True\n        widget.save_file()\n        widget.writer.write.assert_called()\n\n    def test_save_file_write_errors(self):\n        widget = self.widget\n        datasig = widget.Inputs.data\n\n        widget.auto_save = True\n        widget.filename = _w(\"bar/foo\")\n\n        widget.writer.write.side_effect = IOError\n        self.send_signal(datasig, self.iris)\n        self.assertTrue(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = None\n        self.send_signal(datasig, self.iris)\n        self.assertFalse(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = IOError\n        self.send_signal(datasig, self.iris)\n        self.assertTrue(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = None\n        self.send_signal(datasig, None)\n        self.assertFalse(widget.Error.general_error.is_shown())\n\n        widget.writer.write.side_effect = ValueError\n        self.assertRaises(ValueError, self.send_signal, datasig, self.iris)\n\n    def test_save_file_write(self):\n        widget = self.widget\n        datasig = widget.Inputs.data\n\n        widget.auto_save = True\n\n        widget.filename = _w(\"bar/foo.csv\")\n        widget.add_type_annotations = True\n        self.send_signal(datasig, self.iris)\n        widget.writer.write.assert_called_with(\n            _w(\"bar/foo.csv\"), self.iris, True)\n\n    def test_file_name_label(self):\n        widget = self.widget\n\n        widget.filename = \"\"\n        widget._update_messages()\n        self.assertFalse(widget.Error.no_file_name.is_shown())\n\n        widget.auto_save = True\n        widget._update_messages()\n        self.assertTrue(widget.Error.no_file_name.is_shown())\n\n        widget.filename = _w(\"/foo/bar/baz.csv\")\n        widget._update_messages()\n        self.assertFalse(widget.Error.no_file_name.is_shown())\n\n    def test_sparse_error(self):\n        widget = self.widget\n        err = widget.Error.unsupported_sparse\n\n        widget.writer = ExcelReader\n        widget.filename = \"foo.xlsx\"\n        widget.data = self.iris\n\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n        widget.data.X = sp.csr_matrix(widget.data.X)\n        widget._update_messages()\n        self.assertTrue(err.is_shown())\n\n        widget.writer = PickleReader\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n        widget.writer = ExcelReader\n        widget._update_messages()\n        self.assertTrue(err.is_shown())\n\n        widget.data = None\n        widget._update_messages()\n        self.assertFalse(err.is_shown())\n\n    def test_send_report(self):\n        widget = self.widget\n\n        widget.report_items = Mock()\n        for writer in widget.filters.values():\n            widget.writer = writer\n            for widget.add_type_annotations in (False, True):\n                widget.filename = f\"foo.{writer.EXTENSIONS[0]}\"\n                widget.send_report()\n                items = dict(widget.report_items.call_args[0][0])\n                msg = f\"for {writer}, annotations={widget.add_type_annotations}\"\n                self.assertEqual(items[\"File name\"], widget.filename, msg=msg)\n                if writer.OPTIONAL_TYPE_ANNOTATIONS:\n                    self.assertEqual(\n                        items[\"Type annotations\"],\n                        [\"No\", \"Yes\"][widget.add_type_annotations], msg=msg)\n                else:\n                    self.assertFalse(items[\"Type annotations\"], msg=msg)\n\n    def test_migration_to_version_2(self):\n        const_settings = {\n            'add_type_annotations': True, 'auto_save': False,\n            'controlAreaVisible': True, 'last_dir': '/home/joe/Desktop',\n            '__version__': 1}\n\n        # No compression, Tab-separated values\n        settings = {**const_settings,\n                    'compress': False, 'compression': 'gzip (.gz)',\n                    'filetype': 'Tab-separated values (.tab)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Tab-separated values (*.tab)\"})\n\n        # Compression; ignore compression format (.xz is no longer supported)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Tab-separated values (.tab)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Compressed Tab-separated values (*.tab.gz)\"})\n\n        # No compression, Excel\n        settings = {**const_settings,\n                    'compress': False, 'compression': 'lzma (.xz)',\n                    'filetype': 'Microsoft Excel spreadsheet (.xlsx)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Microsoft Excel spreadsheet (*.xlsx)\"})\n\n        # Excel with compression - compression must be ignored\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Microsoft Excel spreadsheet (.xlsx)'}\n        OWSave.migrate_settings(settings)\n        self.assertEqual(\n            settings,\n            {**const_settings,\n             \"filter\": \"Microsoft Excel spreadsheet (*.xlsx)\"})\n\n        # Missing filetype (is this possible?)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)'}\n        OWSave.migrate_settings(settings)\n        self.assertTrue(settings[\"filter\"] in OWSave.filters)\n\n        # Unsupported file format (is this possible?)\n        settings = {**const_settings,\n                    'compress': True, 'compression': 'lzma (.xz)',\n                    'filetype': 'Bar file (.bar)'}\n        OWSave.migrate_settings(settings)\n        self.assertTrue(settings[\"filter\"] in OWSave.filters)\n\n\n\nclass TestFunctionalOWSave(WidgetTest):\n    def setUp(self):\n        self.widget = self.create_widget(OWSave)  # type: OWSave\n        self.iris = Table(\"iris\")\n\n    def test_save_uncompressed(self):\n        widget = self.widget\n        widget.auto_save = False\n\n        spiris = Table(\"iris\")\n        spiris.X = sp.csr_matrix(spiris.X)\n\n        for selected_filter, writer in widget.filters.items():\n            widget.write = writer\n            ext = writer.EXTENSIONS[0]\n            with named_file(\"\", suffix=ext) as filename:\n                widget.get_save_filename = Mock(\n                    return_value=(filename, selected_filter))\n\n                self.send_signal(widget.Inputs.data, self.iris)\n                widget.save_file_as()\n                self.assertEqual(len(Table(filename)), 150)\n\n                if writer.SUPPORT_SPARSE_DATA:\n                    self.send_signal(widget.Inputs.data, spiris)\n                    widget.save_file()\n                    self.assertEqual(len(Table(filename)), 150)\n\n\nclass TestOWSaveUtils(unittest.TestCase):\n    def test_replace_extension(self):\n        replace = OWSave._replace_extension\n        fname = \"/bing.bada.boom/foo.1942.tab\"\n        self.assertEqual(\n            replace(fname, \".tab\"), \"/bing.bada.boom/foo.1942.tab\")\n        self.assertEqual(\n            replace(fname, \".tab.gz\"), \"/bing.bada.boom/foo.1942.tab.gz\")\n        self.assertEqual(\n            replace(fname, \".xlsx\"), \"/bing.bada.boom/foo.1942.xlsx\")\n\n        fname = \"foo.tab.gz\"\n        self.assertEqual(replace(fname, \".tab\"), \"foo.tab\")\n        self.assertEqual(replace(fname, \".tab.gz\"), \"foo.tab.gz\")\n        self.assertEqual(replace(fname, \".csv\"), \"foo.csv\")\n        self.assertEqual(replace(fname, \".csv.gz\"), \"foo.csv.gz\")\n\n        fname = \"/bing.bada.boom/foo\"\n        self.assertEqual(replace(fname, \".tab\"), fname + \".tab\")\n        self.assertEqual(replace(fname, \".tab.gz\"), fname + \".tab.gz\")\n\n    def test_extension_from_filter(self):\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (*.foo.ba)\"), \".foo.ba\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.ext)\"), \".ext\")\n        self.assertEqual(\n            OWSave._extension_from_filter(\"Description (.foo.bar)\"), \".foo.bar\")\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
    ],
    "test_file_names": [
        "test_1.py"
    ],
    "setup_res_code": 0,
    "setup_res_stdout": "Starting Orange installation attempts...\nAttempting installation with Python 3.7...\nWarning: 'keywords' should be a list, got type 'tuple'\nWarning: 'classifiers' should be a list, got type 'tuple'\nWarning: 'keywords' should be a list, got type 'tuple'\nWarning: 'classifiers' should be a list, got type 'tuple'\nrunning build_ext\nrunning build_src\nbuild_src\nbuilding extension \"Orange.classification._simple_tree\" sources\nbuilding extension \"Orange.classification._tree_scorers\" sources\nbuilding extension \"Orange.data._valuecount\" sources\nbuilding extension \"Orange.data._contingency\" sources\nbuilding extension \"Orange.data._io\" sources\nbuilding extension \"Orange.data._variable\" sources\nbuilding extension \"Orange.distance._distance\" sources\nbuilding extension \"Orange.preprocess._discretize\" sources\nbuilding extension \"Orange.preprocess._relieff\" sources\nbuilding extension \"Orange.widgets.utils._grid_density\" sources\nbuild_src: building npy-pkg config files\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmpke9j_wh0/tmp\ncreating /tmp/tmpke9j_wh0/tmp/tmpke9j_wh0\ncompile options: '-MMD -MF /tmp/tmpke9j_wh0/file.c.d -c'\ncc: /tmp/tmpke9j_wh0/file.c\ncustomize UnixCCompiler using build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmp1lfrjcv8/tmp\ncreating /tmp/tmp1lfrjcv8/tmp/tmp1lfrjcv8\ncompile options: '-MMD -MF /tmp/tmp1lfrjcv8/file.c.d -c'\ncc: /tmp/tmp1lfrjcv8/file.c\ncustomize UnixCCompiler using build_ext\nbuilding 'Orange.classification._simple_tree' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange\ncreating build/temp.linux-x86_64-3.7/Orange/classification\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/classification/_simple_tree.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/classification/_simple_tree.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/classification/_simple_tree.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.classification._tree_scorers' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/classification/_tree_scorers.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/classification/_tree_scorers.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/classification/_tree_scorers.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._valuecount' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/data\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_valuecount.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_valuecount.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_valuecount.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._contingency' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_contingency.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_contingency.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_contingency.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._io' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_io.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_io.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_io.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._variable' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_variable.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_variable.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_variable.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.distance._distance' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/distance\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/distance/_distance.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/distance/_distance.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/distance/_distance.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._discretize' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/preprocess\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/preprocess/_discretize.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/preprocess/_discretize.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/preprocess/_discretize.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._relieff' extension\ncompiling C++ sources\nC compiler: c++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\nc++: Orange/preprocess/_relieff.cpp\nc++ -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/preprocess/_relieff.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/preprocess/_relieff.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.widgets.utils._grid_density' extension\ncompiling C++ sources\nC compiler: c++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/widgets\ncreating build/temp.linux-x86_64-3.7/Orange/widgets/utils\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\nc++: Orange/widgets/utils/_grid_density.cpp\nc++ -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/widgets/utils/_grid_density.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/widgets/utils/_grid_density.cpython-37m-x86_64-linux-gnu.so\nWarning: 'keywords' should be a list, got type 'tuple'\nWarning: 'classifiers' should be a list, got type 'tuple'\nWarning: 'keywords' should be a list, got type 'tuple'\nWarning: 'classifiers' should be a list, got type 'tuple'\nrunning develop\nrunning build_scripts\nrunning egg_info\nrunning build_src\nbuild_src\nbuilding extension \"Orange.classification._simple_tree\" sources\nbuilding extension \"Orange.classification._tree_scorers\" sources\nbuilding extension \"Orange.data._valuecount\" sources\nbuilding extension \"Orange.data._contingency\" sources\nbuilding extension \"Orange.data._io\" sources\nbuilding extension \"Orange.data._variable\" sources\nbuilding extension \"Orange.distance._distance\" sources\nbuilding extension \"Orange.preprocess._discretize\" sources\nbuilding extension \"Orange.preprocess._relieff\" sources\nbuilding extension \"Orange.widgets.utils._grid_density\" sources\nbuild_src: building npy-pkg config files\ncreating Orange3.egg-info\nwriting Orange3.egg-info/PKG-INFO\nwriting dependency_links to Orange3.egg-info/dependency_links.txt\nwriting entry points to Orange3.egg-info/entry_points.txt\nwriting requirements to Orange3.egg-info/requires.txt\nwriting top-level names to Orange3.egg-info/top_level.txt\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest template 'MANIFEST.in'\nwarning: no files found matching 'README*' under directory 'Orange'\nwarning: no files found matching 'LICENSE' under directory 'Orange'\nwarning: no files found matching '*.basket' under directory 'Orange/datasets'\nwarning: no files found matching '*.html' under directory 'Orange/canvas'\nwarning: no files found matching '*.css' under directory 'Orange/widgets'\nwarning: no files found matching 'COPYING'\nadding license file 'LICENSE'\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nrunning build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmphagl6v38/tmp\ncreating /tmp/tmphagl6v38/tmp/tmphagl6v38\ncompile options: '-MMD -MF /tmp/tmphagl6v38/file.c.d -c'\ncc: /tmp/tmphagl6v38/file.c\ncustomize UnixCCompiler using build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmpjbzr30e_/tmp\ncreating /tmp/tmpjbzr30e_/tmp/tmpjbzr30e_\ncompile options: '-MMD -MF /tmp/tmpjbzr30e_/file.c.d -c'\ncc: /tmp/tmpjbzr30e_/file.c\ncustomize UnixCCompiler using build_ext\nCreating /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/Orange3.egg-link (link to .)\nAdding Orange3 3.21.0.dev0+c56fafa to easy-install.pth file\nInstalling orange-canvas script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12\nProcessing dependencies for Orange3==3.21.0.dev0+c56fafa\nSearching for XlsxWriter==3.2.0\nBest match: XlsxWriter 3.2.0\nAdding XlsxWriter 3.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for xlrd==2.0.1\nBest match: xlrd 2.0.1\nAdding xlrd 2.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for setuptools==59.8.0\nBest match: setuptools 59.8.0\nAdding setuptools 59.8.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for serverfiles==0.3.1\nBest match: serverfiles 0.3.1\nAdding serverfiles 0.3.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for scipy==1.7.3\nBest match: scipy 1.7.3\nAdding scipy 1.7.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for scikit-learn==1.0.2\nBest match: scikit-learn 1.0.2\nAdding scikit-learn 1.0.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for requests==2.31.0\nBest match: requests 2.31.0\nAdding requests 2.31.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for python-louvain==0.16\nBest match: python-louvain 0.16\nAdding python-louvain 0.16 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for pyqtgraph==0.12.4\nBest match: pyqtgraph 0.12.4\nAdding pyqtgraph 0.12.4 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for pip==24.0\nBest match: pip 24.0\nAdding pip 24.0 to easy-install.pth file\nInstalling pip script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\nInstalling pip3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\nInstalling pip3.10 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for openTSNE==1.0.1\nBest match: openTSNE 1.0.1\nAdding openTSNE 1.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for numpy==1.17.5\nBest match: numpy 1.17.5\nAdding numpy 1.17.5 to easy-install.pth file\nInstalling f2py script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\nInstalling f2py3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\nInstalling f2py3.7 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for networkx==2.6.3\nBest match: networkx 2.6.3\nAdding networkx 2.6.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for matplotlib==3.5.3\nBest match: matplotlib 3.5.3\nAdding matplotlib 3.5.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for keyrings.alt==4.2.0\nBest match: keyrings.alt 4.2.0\nAdding keyrings.alt 4.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for keyring==24.1.1\nBest match: keyring 24.1.1\nAdding keyring 24.1.1 to easy-install.pth file\nInstalling keyring script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for joblib==1.3.2\nBest match: joblib 1.3.2\nAdding joblib 1.3.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for docutils==0.20.1\nBest match: docutils 0.20.1\nAdding docutils 0.20.1 to easy-install.pth file\nInstalling docutils script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for chardet==5.2.0\nBest match: chardet 5.2.0\nAdding chardet 5.2.0 to easy-install.pth file\nInstalling chardetect script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for Bottleneck==1.4.0\nBest match: Bottleneck 1.4.0\nAdding Bottleneck 1.4.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for AnyQt==0.2.0\nBest match: AnyQt 0.2.0\nAdding AnyQt 0.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for threadpoolctl==3.1.0\nBest match: threadpoolctl 3.1.0\nAdding threadpoolctl 3.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for certifi==2024.12.14\nBest match: certifi 2024.12.14\nAdding certifi 2024.12.14 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for charset-normalizer==3.4.1\nBest match: charset-normalizer 3.4.1\nAdding charset-normalizer 3.4.1 to easy-install.pth file\nInstalling normalizer script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for urllib3==2.0.7\nBest match: urllib3 2.0.7\nAdding urllib3 2.0.7 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for idna==3.10\nBest match: idna 3.10\nAdding idna 3.10 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for pyparsing==3.1.4\nBest match: pyparsing 3.1.4\nAdding pyparsing 3.1.4 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for cycler==0.11.0\nBest match: cycler 0.11.0\nAdding cycler 0.11.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for packaging==24.0\nBest match: packaging 24.0\nAdding packaging 24.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for python-dateutil==2.9.0.post0\nBest match: python-dateutil 2.9.0.post0\nAdding python-dateutil 2.9.0.post0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for kiwisolver==1.4.5\nBest match: kiwisolver 1.4.5\nAdding kiwisolver 1.4.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for Pillow==9.5.0\nBest match: Pillow 9.5.0\nAdding Pillow 9.5.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for fonttools==4.38.0\nBest match: fonttools 4.38.0\nAdding fonttools 4.38.0 to easy-install.pth file\nInstalling fonttools script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\nInstalling pyftmerge script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\nInstalling pyftsubset script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\nInstalling ttx script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for jaraco.classes==3.2.3\nBest match: jaraco.classes 3.2.3\nAdding jaraco.classes 3.2.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for SecretStorage==3.3.3\nBest match: SecretStorage 3.3.3\nAdding SecretStorage 3.3.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for importlib-metadata==6.7.0\nBest match: importlib-metadata 6.7.0\nAdding importlib-metadata 6.7.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for jeepney==0.8.0\nBest match: jeepney 0.8.0\nAdding jeepney 0.8.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for importlib-resources==5.12.0\nBest match: importlib-resources 5.12.0\nAdding importlib-resources 5.12.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for six==1.17.0\nBest match: six 1.17.0\nAdding six 1.17.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for typing-extensions==4.7.1\nBest match: typing-extensions 4.7.1\nAdding typing-extensions 4.7.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for more-itertools==9.1.0\nBest match: more-itertools 9.1.0\nAdding more-itertools 9.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for cryptography==44.0.0\nBest match: cryptography 44.0.0\nAdding cryptography 44.0.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for zipp==3.15.0\nBest match: zipp 3.15.0\nAdding zipp 3.15.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for cffi==1.15.1\nBest match: cffi 1.15.1\nAdding cffi 1.15.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nSearching for pycparser==2.21\nBest match: pycparser 2.21\nAdding pycparser 2.21 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages\nFinished processing dependencies for Orange3==3.21.0.dev0+c56fafa\nVerifying Orange installation...\n✅ Orange installation successful!\nSuccessfully installed orange using Python 3.7\n",
    "setup_res_stderr": "Using CPython 3.7.9\nCreating virtual environment at: .venv\nActivate with: source .venv/bin/activate\nResolved 18 packages in 84ms\nPrepared 18 packages in 30ms\nInstalled 18 packages in 122ms\n + cython==0.29.37\n + exceptiongroup==1.2.2\n + importlib-metadata==6.7.0\n + iniconfig==2.0.0\n + numpy==1.17.5\n + packaging==24.0\n + pluggy==1.2.0\n + pyqt5==5.15.10\n + pyqt5-qt5==5.15.16\n + pyqt5-sip==12.13.0\n + pyqtwebengine==5.15.6\n + pyqtwebengine-qt5==5.15.16\n + pytest==7.4.4\n + setuptools==59.8.0\n + tomli==2.0.1\n + typing-extensions==4.7.1\n + wheel==0.42.0\n + zipp==3.15.0\nResolved 33 packages in 181ms\nInstalled 28 packages in 537ms\n + bottleneck==1.4.0\n + certifi==2024.12.14\n + cffi==1.15.1\n + chardet==5.2.0\n + charset-normalizer==3.4.1\n + cryptography==44.0.0\n + idna==3.10\n + importlib-resources==5.12.0\n + jaraco-classes==3.2.3\n + jeepney==0.8.0\n + joblib==1.3.2\n + keyring==24.1.1\n + keyrings-alt==4.2.0\n + more-itertools==9.1.0\n + networkx==2.6.3\n + opentsne==1.0.1\n + pip==24.0\n + pycparser==2.21\n + python-louvain==0.16\n + requests==2.31.0\n + scikit-learn==1.0.2\n + scipy==1.7.3\n + secretstorage==3.3.3\n + serverfiles==0.3.1\n + threadpoolctl==3.1.0\n + urllib3==2.0.7\n + xlrd==2.0.1\n + xlsxwriter==3.2.0\nResolved 14 packages in 51ms\nInstalled 11 packages in 103ms\n + anyqt==0.2.0\n + cycler==0.11.0\n + docutils==0.20.1\n + fonttools==4.38.0\n + kiwisolver==1.4.5\n + matplotlib==3.5.3\n + pillow==9.5.0\n + pyparsing==3.1.4\n + pyqtgraph==0.12.4\n + python-dateutil==2.9.0.post0\n + six==1.17.0\nResolved 2 packages in 5ms\nInstalled 2 packages in 54ms\n + psycopg2==2.9.9\n + pymssql==2.3.2\nResolved 5 packages in 19ms\nInstalled 2 packages in 616ms\n + pandas==1.3.5\n + pytz==2024.2\nAudited 2 packages in 1ms\nOrange/classification/_simple_tree.c: In function ‘gain_ratio_c’:\nOrange/classification/_simple_tree.c:63:9: warning: implicit declaration of function ‘qsort_r’; did you mean ‘qsort’? [-Wimplicit-function-declaration]\n   63 |         qsort_r(base, nel, size, compar, thunk)\n      |         ^~~~~~~\nOrange/classification/_simple_tree.c:147:9: note: in expansion of macro ‘QSORT_R_FUNC’\n  147 |         QSORT_R_FUNC(examples, size, sizeof(struct Example), (void*) &compar_attr, compar_examples);\n      |         ^~~~~~~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/classification/_tree_scorers.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_2find_threshold_entropy’:\nOrange/classification/_tree_scorers.c:3115:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 3115 |   __pyx_t_7 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_6find_threshold_MSE’:\nOrange/classification/_tree_scorers.c:4619:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 4619 |   __pyx_t_1 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_8find_binarization_MSE’:\nOrange/classification/_tree_scorers.c:5396:43: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5396 |           for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {\n      |                                           ^\nOrange/classification/_tree_scorers.c:5517:39: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5517 |           __pyx_t_27 = ((__pyx_v_left >= __pyx_v_min_leaf) != 0);\n      |                                       ^~\nOrange/classification/_tree_scorers.c:5523:53: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5523 |           __pyx_t_27 = (((__pyx_v_N - __pyx_v_left) >= __pyx_v_min_leaf) != 0);\n      |                                                     ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_14compute_predictions_csr’:\nOrange/classification/_tree_scorers.c:7051:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7051 |         for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_16compute_predictions_csc’:\nOrange/classification/_tree_scorers.c:7741:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7741 |         for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c:7801:143: warning: comparison of integer expressions of different signedness: ‘__pyx_t_5numpy_int32_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]\n 7801 |               __pyx_t_17 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_indices.data + __pyx_t_18 * __pyx_v_indices.strides[0]) ))) != __pyx_v_i) != 0);\n      |                                                                                                                                               ^~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/data/_valuecount.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/data/_contingency.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/data/_io.c: In function ‘__pyx_pf_6Orange_4data_3_io_sparse_read_float.constprop’:\nOrange/data/_io.c:3881:24: warning: ‘__pyx_v_decs’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3881 |           __pyx_v_decs = (__pyx_v_decs / 10.0);\n      |           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:4070:24: warning: ‘__pyx_v_value’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4070 |           __pyx_t_10 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 221, __pyx_L5_error)\n      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:480:40: warning: ‘__pyx_v_attr_index’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n  480 |   #define PyInt_FromLong               PyLong_FromLong\n      |                                        ^~~~~~~~~~~~~~~\nOrange/data/_io.c:1301:7: note: ‘__pyx_v_attr_index’ was declared here\n 1301 |   int __pyx_v_attr_index;\n      |       ^~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:2935:25: warning: ‘__pyx_v_atomp’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 2935 |           __pyx_v_atomp = (__pyx_v_atomp + 1);\n      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/distance/_distance.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/preprocess/_discretize.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/preprocess/_relieff.cpp:581:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n  setuptools.SetuptoolsDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/setuptools/command/easy_install.py:159: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.\n  EasyInstallDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n  setuptools.SetuptoolsDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12/.venv/lib/python3.7/site-packages/setuptools/command/egg_info.py:628: SetuptoolsDeprecationWarning: Custom 'build_py' does not implement 'get_data_files_without_manifest'.\nPlease extend command classes from setuptools instead of distutils.\n  SetuptoolsDeprecationWarning\n",
    "new_commit_res_code": 1,
    "new_commit_res_stdout": "============================= test session starts ==============================\nplatform linux -- Python 3.7.9, pytest-7.4.4, pluggy-1.2.0\nrootdir: /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12\ncollected 16 items\n\nr2e_tests/test_1.py EEEEEEEEEEEEEE..                                     [100%]\n\n==================================== ERRORS ====================================\n__________________ ERROR at setup of TestOWSave.test_dataset ___________________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n______________ ERROR at setup of TestOWSave.test_file_name_label _______________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n________ ERROR at setup of TestOWSave.test_get_save_filename_non_native ________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n_____________ ERROR at setup of TestOWSave.test_initial_start_dir ______________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n___________ ERROR at setup of TestOWSave.test_migration_to_version_2 ___________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n__________ ERROR at setup of TestOWSave.test_save_file_calls_save_as ___________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n_________ ERROR at setup of TestOWSave.test_save_file_checks_can_save __________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n____ ERROR at setup of TestOWSave.test_save_file_dialog_enforces_extension _____\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n____________ ERROR at setup of TestOWSave.test_save_file_sets_name _____________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n______________ ERROR at setup of TestOWSave.test_save_file_write _______________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n___________ ERROR at setup of TestOWSave.test_save_file_write_errors ___________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n________________ ERROR at setup of TestOWSave.test_send_report _________________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n________________ ERROR at setup of TestOWSave.test_sparse_error ________________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be771df80f0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n________ ERROR at setup of TestFunctionalOWSave.test_save_uncompressed _________\n\ncls = <class 'r2e_tests.test_1.TestFunctionalOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7be7bf15b550>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestOWSaveUtils::test_extension_from_filter\nPASSED r2e_tests/test_1.py::TestOWSaveUtils::test_replace_extension\nERROR r2e_tests/test_1.py::TestOWSave::test_dataset - TypeError: addWidget(se...\nERROR r2e_tests/test_1.py::TestOWSave::test_file_name_label - TypeError: addW...\nERROR r2e_tests/test_1.py::TestOWSave::test_get_save_filename_non_native - Ty...\nERROR r2e_tests/test_1.py::TestOWSave::test_initial_start_dir - TypeError: ad...\nERROR r2e_tests/test_1.py::TestOWSave::test_migration_to_version_2 - TypeErro...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_calls_save_as - TypeErr...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_checks_can_save - TypeE...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_dialog_enforces_extension\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_sets_name - TypeError: ...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_write - TypeError: addW...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_write_errors - TypeErro...\nERROR r2e_tests/test_1.py::TestOWSave::test_send_report - TypeError: addWidge...\nERROR r2e_tests/test_1.py::TestOWSave::test_sparse_error - TypeError: addWidg...\nERROR r2e_tests/test_1.py::TestFunctionalOWSave::test_save_uncompressed - Typ...\n========================= 2 passed, 14 errors in 3.79s =========================\n",
    "new_commit_res_stderr": "",
    "old_commit_res_code": 1,
    "old_commit_res_stdout": "============================= test session starts ==============================\nplatform linux -- Python 3.7.9, pytest-7.4.4, pluggy-1.2.0\nrootdir: /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_c56fafab522f12165258439d7bd133a6c5d4cc12\ncollected 16 items\n\nr2e_tests/test_1.py EEEEEEEEEEEEEE.F                                     [100%]\n\n==================================== ERRORS ====================================\n__________________ ERROR at setup of TestOWSave.test_dataset ___________________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n______________ ERROR at setup of TestOWSave.test_file_name_label _______________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n________ ERROR at setup of TestOWSave.test_get_save_filename_non_native ________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n_____________ ERROR at setup of TestOWSave.test_initial_start_dir ______________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n___________ ERROR at setup of TestOWSave.test_migration_to_version_2 ___________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n__________ ERROR at setup of TestOWSave.test_save_file_calls_save_as ___________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n_________ ERROR at setup of TestOWSave.test_save_file_checks_can_save __________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n____ ERROR at setup of TestOWSave.test_save_file_dialog_enforces_extension _____\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n____________ ERROR at setup of TestOWSave.test_save_file_sets_name _____________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n______________ ERROR at setup of TestOWSave.test_save_file_write _______________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n___________ ERROR at setup of TestOWSave.test_save_file_write_errors ___________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n________________ ERROR at setup of TestOWSave.test_send_report _________________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n________________ ERROR at setup of TestOWSave.test_sparse_error ________________\n\ncls = <class 'r2e_tests.test_1.TestOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b8695b04af0>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n________ ERROR at setup of TestFunctionalOWSave.test_save_uncompressed _________\n\ncls = <class 'r2e_tests.test_1.TestFunctionalOWSave'>\n\n    @classmethod\n    def setUpClass(cls):\n        \"\"\"Prepare environment for test execution\n    \n        Construct a dummy signal manager and monkey patch\n        OWReport.get_instance to return a manually created instance.\n        \"\"\"\n        super().setUpClass()\n    \n        cls.widgets = []\n    \n        cls.signal_manager = DummySignalManager()\n    \n>       report = OWReport()\n\nOrange/widgets/tests/base.py:106: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/widgets/report/owreport.py:136: in __init__\n    self._setup_ui_()\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Orange.widgets.report.owreport.OWReport object at 0x7b86cf74bd70>\n\n    def _setup_ui_(self):\n        self.table_model = ReportItemModel(0, len(Column.__members__))\n        self.table = ReportTable(self.controlArea)\n        self.table.setModel(self.table_model)\n        self.table.setShowGrid(False)\n        self.table.setSelectionBehavior(QTableView.SelectRows)\n        self.table.setSelectionMode(QTableView.SingleSelection)\n        self.table.setWordWrap(False)\n        self.table.setMouseTracking(True)\n        self.table.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)\n        self.table.verticalHeader().setDefaultSectionSize(20)\n        self.table.verticalHeader().setVisible(False)\n        self.table.horizontalHeader().setVisible(False)\n        self.table.setFixedWidth(250)\n        self.table.setColumnWidth(Column.item, 200)\n        self.table.setColumnWidth(Column.remove, 23)\n        self.table.setColumnWidth(Column.scheme, 25)\n        self.table.clicked.connect(self._table_clicked)\n        self.table.selectionModel().selectionChanged.connect(\n            self._table_selection_changed)\n        self.controlArea.layout().addWidget(self.table)\n    \n        self.last_scheme = None\n        self.scheme_button = gui.button(\n            self.controlArea, self, \"Back to Last Scheme\",\n            callback=self._show_last_scheme\n        )\n        box = gui.hBox(self.controlArea)\n        box.setContentsMargins(-6, 0, -6, 0)\n        self.save_button = gui.button(\n            box, self, \"Save\", callback=self.save_report, disabled=True\n        )\n        self.print_button = gui.button(\n            box, self, \"Print\", callback=self._print_report, disabled=True\n        )\n    \n        class PyBridge(QObject):\n            @pyqtSlot(str)\n            def _select_item(myself, item_id):\n                item = self.table_model.get_item_by_id(item_id)\n                self.table.selectRow(self.table_model.indexFromItem(item).row())\n                self._change_selected_item(item)\n    \n            @pyqtSlot(str, str)\n            def _add_comment(myself, item_id, value):\n                item = self.table_model.get_item_by_id(item_id)\n                item.comment = value\n                self.report_changed = True\n    \n        self.report_view = WebviewWidget(self.mainArea, bridge=PyBridge(self))\n>       self.mainArea.layout().addWidget(self.report_view)\nE       TypeError: addWidget(self, a0: Optional[QWidget], stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'Mock'\n\nOrange/widgets/report/owreport.py:193: TypeError\n=================================== FAILURES ===================================\n____________________ TestOWSaveUtils.test_replace_extension ____________________\n\nself = <r2e_tests.test_1.TestOWSaveUtils testMethod=test_replace_extension>\n\n    def test_replace_extension(self):\n        replace = OWSave._replace_extension\n        fname = \"/bing.bada.boom/foo.1942.tab\"\n        self.assertEqual(\n            replace(fname, \".tab\"), \"/bing.bada.boom/foo.1942.tab\")\n        self.assertEqual(\n>           replace(fname, \".tab.gz\"), \"/bing.bada.boom/foo.1942.tab.gz\")\nE       AssertionError: '/bing.bada.boom/foo.tab.gz' != '/bing.bada.boom/foo.1942.tab.gz'\nE       - /bing.bada.boom/foo.tab.gz\nE       + /bing.bada.boom/foo.1942.tab.gz\nE       ?                     +++++\n\nr2e_tests/test_1.py:409: AssertionError\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestOWSaveUtils::test_extension_from_filter\nERROR r2e_tests/test_1.py::TestOWSave::test_dataset - TypeError: addWidget(se...\nERROR r2e_tests/test_1.py::TestOWSave::test_file_name_label - TypeError: addW...\nERROR r2e_tests/test_1.py::TestOWSave::test_get_save_filename_non_native - Ty...\nERROR r2e_tests/test_1.py::TestOWSave::test_initial_start_dir - TypeError: ad...\nERROR r2e_tests/test_1.py::TestOWSave::test_migration_to_version_2 - TypeErro...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_calls_save_as - TypeErr...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_checks_can_save - TypeE...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_dialog_enforces_extension\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_sets_name - TypeError: ...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_write - TypeError: addW...\nERROR r2e_tests/test_1.py::TestOWSave::test_save_file_write_errors - TypeErro...\nERROR r2e_tests/test_1.py::TestOWSave::test_send_report - TypeError: addWidge...\nERROR r2e_tests/test_1.py::TestOWSave::test_sparse_error - TypeError: addWidg...\nERROR r2e_tests/test_1.py::TestFunctionalOWSave::test_save_uncompressed - Typ...\nFAILED r2e_tests/test_1.py::TestOWSaveUtils::test_replace_extension - Asserti...\n==================== 1 failed, 1 passed, 14 errors in 3.22s ====================\n",
    "old_commit_res_stderr": ""
}
Orange/widgets/data/owsave.py Orange/widgets/data/tests/test_owsave.py
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** Incorrect Handling of Multi-Part Extensions When Enforcing Default Extensions

**Description:**
When enforcing default extensions on filenames that have multiple extensions, such as `.tab.gz`, the extension replacement function fails to handle them correctly. Specifically, it strips only part of the extension instead of recognizing and removing the entire known multi-part extension.

**Example Buggy Code:**
```python
filename = "/bing.bada.boom/foo.1942.tab"
new_filename = OWSave._replace_extension(filename, ".tab.gz")
print(new_filename)  # Outputs: "/bing.bada.boom/foo.tab.gz"
```

**Expected Behavior:**
The filename should correctly replace the existing multi-part extension, resulting in `/bing.bada.boom/foo.1942.tab.gz`. This ensures that the original identifier (`1942`) is preserved while updating the file extension.

**Actual Behavior:**
Only part of the extension is stripped, leading to an incorrect filename `/bing.bada.boom/foo.tab.gz`. This removes the identifier (`1942`) unintentionally and does not properly enforce the desired multi-part extension.

[/ISSUE]
--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.

--- BEGIN FILE ---
```
### Orange/widgets/data/owsave.py
import os.path
import sys
import re

from AnyQt.QtWidgets import QFileDialog, QGridLayout, QMessageBox

from Orange.data.table import Table
from Orange.data.io import TabReader, CSVReader, PickleReader, ExcelReader
from Orange.widgets import gui, widget
from Orange.widgets.settings import Setting
from Orange.widgets.utils.widgetpreview import WidgetPreview
from Orange.widgets.widget import Input


class OWSave(widget.OWWidget):
    name = "Save Data"
    description = "Save data to an output file."
    icon = "icons/Save.svg"
    category = "Data"
    keywords = []

    settings_version = 2

    writers = [TabReader, CSVReader, PickleReader, ExcelReader]
    filters = {
        **{f"{w.DESCRIPTION} (*{w.EXTENSIONS[0]})": w
           for w in writers},
        **{f"Compressed {w.DESCRIPTION} (*{w.EXTENSIONS[0]}.gz)": w
           for w in writers if w.SUPPORT_COMPRESSED}
    }
    userhome = os.path.expanduser(f"~{os.sep}")

    class Inputs:
        data = Input("Data", Table)

    class Error(widget.OWWidget.Error):
        unsupported_sparse = widget.Msg("Use Pickle format for sparse data.")
        no_file_name = widget.Msg("File name is not set.")
        general_error = widget.Msg("{}")

    want_main_area = False
    resizing_enabled = False

    last_dir = Setting("")
    filter = Setting(next(iter(filters)))
    filename = Setting("", schema_only=True)
    add_type_annotations = Setting(True)
    auto_save = Setting(False)

    def __init__(self):
        super().__init__()
        self.data = None

        grid = QGridLayout()
        gui.widgetBox(self.controlArea, orientation=grid)
        grid.addWidget(
            gui.checkBox(
                None, self, "add_type_annotations",
                "Add type annotations to header",
                tooltip=
                "Some formats (Tab-delimited, Comma-separated) can include \n"
                "additional information about variables types in header rows.",
                callback=self._update_messages),
            0, 0, 1, 2)
        grid.setRowMinimumHeight(1, 8)
        grid.addWidget(
            gui.checkBox(
                None, self, "auto_save", "Autosave when receiving new data",
                callback=self._update_messages),
            2, 0, 1, 2)
        grid.setRowMinimumHeight(3, 8)
        self.bt_save = gui.button(None, self, "Save", callback=self.save_file)
        grid.addWidget(self.bt_save, 4, 0)
        grid.addWidget(
            gui.button(None, self, "Save as ...", callback=self.save_file_as),
            4, 1)

        self.adjustSize()
        self._update_messages()

    @property
    def writer(self):
        return self.filters[self.filter]

    @Inputs.data
    def dataset(self, data):
        self.Error.clear()
        self.data = data
        self._update_status()
        self._update_messages()
        if self.auto_save and self.filename:
            self.save_file()

    def save_file(self):
        if not self.filename:
            self.save_file_as()
            return

        self.Error.general_error.clear()
        if self.data is None \
                or not self.filename \
                or (self.data.is_sparse()
                        and not self.writer.SUPPORT_SPARSE_DATA):
            return
        try:
            self.writer.write(
                self.filename, self.data, self.add_type_annotations)
        except IOError as err_value:
            self.Error.general_error(str(err_value))

    def save_file_as(self):
        filename, selected_filter = self.get_save_filename()
        if not filename:
            return
        self.filename = filename
        self.filter = selected_filter
        self.last_dir = os.path.split(self.filename)[0]
        self.bt_save.setText(f"Save as {os.path.split(filename)[1]}")
        self._update_messages()
        self.save_file()

    def _update_messages(self):
        self.Error.no_file_name(
            shown=not self.filename and self.auto_save)
        self.Error.unsupported_sparse(
            shown=self.data is not None and self.data.is_sparse()
            and self.filename and not self.writer.SUPPORT_SPARSE_DATA)

    def _update_status(self):
        if self.data is None:
            self.info.set_input_summary(self.info.NoInput)
        else:
            self.info.set_input_summary(
                str(len(self.data)),
                f"Data set {self.data.name or '(no name)'} "
                f"with {len(self.data)} instances")

    def send_report(self):
        self.report_data_brief(self.data)
        writer = self.writer
        noyes = ["No", "Yes"]
        self.report_items((
            ("File name", self.filename or "not set"),
            ("Format", writer.DESCRIPTION),
            ("Type annotations",
             writer.OPTIONAL_TYPE_ANNOTATIONS
             and noyes[self.add_type_annotations])
        ))

    @classmethod
    def migrate_settings(cls, settings, version=0):
        def migrate_to_version_2():
            # Set the default; change later if possible
            settings.pop("compression", None)
            settings["filter"] = next(iter(cls.filters))
            filetype = settings.pop("filetype", None)
            if filetype is None:
                return

            ext = cls._extension_from_filter(filetype)
            if settings.pop("compress", False):
                for afilter in cls.filters:
                    if ext + ".gz" in afilter:
                        settings["filter"] = afilter
                        return
                # If not found, uncompressed may have been erroneously set
                # for a writer that didn't support if (such as .xlsx), so
                # fall through to uncompressed
            for afilter in cls.filters:
                if ext in afilter:
                    settings["filter"] = afilter
                    return

        if version < 2:
            migrate_to_version_2()

    def _initial_start_dir(self):
        if self.filename and os.path.exists(os.path.split(self.filename)[0]):
            return self.filename
        else:
            data_name = getattr(self.data, 'name', '')
            if data_name:
                data_name += self.writer.EXTENSIONS[0]
            return os.path.join(self.last_dir or self.userhome, data_name)

    @staticmethod
    def _replace_extension(filename, extension):
        if filename.endswith(extension):  # it may contain dots before extension
            return filename
        last_fn = None
        while last_fn != filename:
            last_fn, filename = filename, os.path.splitext(filename)[0]
        return filename + extension

    @staticmethod
    def _extension_from_filter(selected_filter):
        return re.search(r".*\(\*?(\..*)\)$", selected_filter).group(1)

    # As of Qt 5.9, QFileDialog.setDefaultSuffix does not support double
    # suffixes, not even in non-native dialogs. We handle each OS separately.
    if sys.platform == "darwin":
        # On macOS, is double suffixes are passed to the dialog, they are
        # appended multiple times even if already present (QTBUG-44227).
        # The only known workaround with native dialog is to use suffix *.*.
        # We add the correct suffix after closing the dialog and only then check
        # if the file exists and ask whether to override.
        # It is a bit confusing that the user does not see the final name in the
        # dialog, but I see no better solution.
        def get_save_filename(self):  # pragma: no cover
            def no_suffix(filt):
                return filt.split("(")[0] + "(*.*)"

            mac_filters = {no_suffix(f): f for f in self.filters}
            filename = self._initial_start_dir()
            while True:
                dlg = QFileDialog(
                    None, "Save File", filename, ";;".join(mac_filters))
                dlg.setAcceptMode(dlg.AcceptSave)
                dlg.selectNameFilter(no_suffix(self.filter))
                dlg.setOption(QFileDialog.HideNameFilterDetails)
                dlg.setOption(QFileDialog.DontConfirmOverwrite)
                if dlg.exec() == QFileDialog.Rejected:
                    return "", ""
                filename = dlg.selectedFiles()[0]
                selected_filter = mac_filters[dlg.selectedNameFilter()]
                filename = self._replace_extension(
                    filename, self._extension_from_filter(selected_filter))
                if not os.path.exists(filename) or QMessageBox.question(
                        self, "Overwrite file?",
                        f"File {os.path.split(filename)[1]} already exists.\n"
                        "Overwrite?") == QMessageBox.Yes:
                    return filename, selected_filter

    elif sys.platform == "win32":
        # TODO: This is not tested!!!
        # Windows native dialog may work correctly; if not, we may do the same
        # as for macOS?
        def get_save_filename(self):  # pragma: no cover
            return QFileDialog.getSaveFileName(
                self, "Save File", self._initial_start_dir(),
                ";;".join(self.filters), self.filter)

    else:  # Linux and any unknown platforms
        # Qt does not use a native dialog on Linux, so we can connect to
        # filterSelected and to overload selectFile to change the extension
        # while the dialog is open.
        # For unknown platforms (which?), we also use the non-native dialog to
        # be sure we know what happens.
        class SaveFileDialog(QFileDialog):
            # pylint: disable=protected-access
            def __init__(self, *args, **kwargs):
                super().__init__(*args, **kwargs)
                self.setAcceptMode(QFileDialog.AcceptSave)
                self.setOption(QFileDialog.DontUseNativeDialog)
                self.filterSelected.connect(self.updateDefaultExtension)

            def selectNameFilter(self, selected_filter):
                super().selectNameFilter(selected_filter)
                self.updateDefaultExtension(selected_filter)

            def updateDefaultExtension(self, selected_filter):
                self.suffix = OWSave._extension_from_filter(selected_filter)
                files = self.selectedFiles()
                if files and not os.path.isdir(files[0]):
                    self.selectFile(files[0].split(".")[0])

            def selectFile(self, filename):
                filename = OWSave._replace_extension(filename, self.suffix)
                super().selectFile(filename)

        def get_save_filename(self):
            dlg = self.SaveFileDialog(
                None, "Save File", self._initial_start_dir(),
                ";;".join(self.filters))
            dlg.selectNameFilter(self.filter)
            if dlg.exec() == QFileDialog.Rejected:
                return "", ""
            else:
                return dlg.selectedFiles()[0], dlg.selectedNameFilter()


if __name__ == "__main__":  # pragma: no cover
    WidgetPreview(OWSave).run(Table("iris"))

```
--- END FILE ---

Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.

Every *SEARCH/REPLACE* edit must use this format:
1. The file path
2. The start of search block: <<<<<<< SEARCH
3. A contiguous chunk of lines to search for in the existing source code
4. The dividing line: =======
5. The lines to replace into the source code
6. The end of the replace block: >>>>>>> REPLACE

Here is an example:

```python
### mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
</solution>

Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
Wrap each *SEARCH/REPLACE* edit in a code block as shown in the example above. If you have multiple *SEARCH/REPLACE* edits, use a separate code block for each one.
[ISSUE]
**Title:** Incorrect Handling of Multi-Part Extensions When Enforcing Default Extensions

**Description:**
When enforcing default extensions on filenames that have multiple extensions, such as `.tab.gz`, the extension replacement function fails to handle them correctly. Specifically, it strips only part of the extension instead of recognizing and removing the entire known multi-part extension.

**Example Buggy Code:**
```python
filename = "/bing.bada.boom/foo.1942.tab"
new_filename = OWSave._replace_extension(filename, ".tab.gz")
print(new_filename)  # Outputs: "/bing.bada.boom/foo.tab.gz"
```

**Expected Behavior:**
The filename should correctly replace the existing multi-part extension, resulting in `/bing.bada.boom/foo.1942.tab.gz`. This ensures that the original identifier (`1942`) is preserved while updating the file extension.

**Actual Behavior:**
Only part of the extension is stripped, leading to an incorrect filename `/bing.bada.boom/foo.tab.gz`. This removes the identifier (`1942`) unintentionally and does not properly enforce the desired multi-part extension.

[/ISSUE]
{
    "TestOWSaveUtils.test_extension_from_filter": "PASSED",
    "TestOWSaveUtils.test_replace_extension": "PASSED",
    "TestOWSave.test_dataset": "ERROR",
    "TestOWSave.test_file_name_label": "ERROR",
    "TestOWSave.test_get_save_filename_non_native": "ERROR",
    "TestOWSave.test_initial_start_dir": "ERROR",
    "TestOWSave.test_migration_to_version_2": "ERROR",
    "TestOWSave.test_save_file_calls_save_as": "ERROR",
    "TestOWSave.test_save_file_checks_can_save": "ERROR",
    "TestOWSave.test_save_file_dialog_enforces_extension": "ERROR",
    "TestOWSave.test_save_file_sets_name": "ERROR",
    "TestOWSave.test_save_file_write": "ERROR",
    "TestOWSave.test_save_file_write_errors": "ERROR",
    "TestOWSave.test_send_report": "ERROR",
    "TestOWSave.test_sparse_error": "ERROR",
    "TestFunctionalOWSave.test_save_uncompressed": "ERROR"
}
diff --git a/Orange/widgets/data/owsave.py b/Orange/widgets/data/owsave.py
index fd5212b7e..37ba1b3dc 100644
--- a/Orange/widgets/data/owsave.py
+++ b/Orange/widgets/data/owsave.py
@@ -185,11 +185,11 @@ class OWSave(widget.OWWidget):
 
     @staticmethod
     def _replace_extension(filename, extension):
-        if filename.endswith(extension):  # it may contain dots before extension
-            return filename
-        last_fn = None
-        while last_fn != filename:
-            last_fn, filename = filename, os.path.splitext(filename)[0]
+        known_extensions = map(OWSave._extension_from_filter, OWSave.filters)
+        for known_ext in sorted(known_extensions, key=len, reverse=True):
+            if filename.endswith(known_ext):
+                filename = filename[:-len(known_ext)]
+                break
         return filename + extension
 
     @staticmethod

{"Orange/widgets/data/owsave.py": "import os.path\nimport sys\nimport re\n\nfrom AnyQt.QtWidgets import QFileDialog, QGridLayout, QMessageBox\n\nfrom Orange.data.table import Table\nfrom Orange.data.io import TabReader, CSVReader, PickleReader, ExcelReader\nfrom Orange.widgets import gui, widget\nfrom Orange.widgets.settings import Setting\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.widget import Input\n\n\nclass OWSave(widget.OWWidget):\n    name = \"Save Data\"\n    description = \"Save data to an output file.\"\n    icon = \"icons/Save.svg\"\n    category = \"Data\"\n    keywords = []\n\n    settings_version = 2\n\n    writers = [TabReader, CSVReader, PickleReader, ExcelReader]\n    filters = {\n        **{f\"{w.DESCRIPTION} (*{w.EXTENSIONS[0]})\": w\n           for w in writers},\n        **{f\"Compressed {w.DESCRIPTION} (*{w.EXTENSIONS[0]}.gz)\": w\n           for w in writers if w.SUPPORT_COMPRESSED}\n    }\n    userhome = os.path.expanduser(f\"~{os.sep}\")\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Error(widget.OWWidget.Error):\n        unsupported_sparse = widget.Msg(\"Use Pickle format for sparse data.\")\n        no_file_name = widget.Msg(\"File name is not set.\")\n        general_error = widget.Msg(\"{}\")\n\n    want_main_area = False\n    resizing_enabled = False\n\n    last_dir = Setting(\"\")\n    filter = Setting(next(iter(filters)))\n    filename = Setting(\"\", schema_only=True)\n    add_type_annotations = Setting(True)\n    auto_save = Setting(False)\n\n    def __init__(self):\n        super().__init__()\n        self.data = None\n\n        grid = QGridLayout()\n        gui.widgetBox(self.controlArea, orientation=grid)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"add_type_annotations\",\n                \"Add type annotations to header\",\n                tooltip=\n                \"Some formats (Tab-delimited, Comma-separated) can include \\n\"\n                \"additional information about variables types in header rows.\",\n                callback=self._update_messages),\n            0, 0, 1, 2)\n        grid.setRowMinimumHeight(1, 8)\n        grid.addWidget(\n            gui.checkBox(\n                None, self, \"auto_save\", \"Autosave when receiving new data\",\n                callback=self._update_messages),\n            2, 0, 1, 2)\n        grid.setRowMinimumHeight(3, 8)\n        self.bt_save = gui.button(None, self, \"Save\", callback=self.save_file)\n        grid.addWidget(self.bt_save, 4, 0)\n        grid.addWidget(\n            gui.button(None, self, \"Save as ...\", callback=self.save_file_as),\n            4, 1)\n\n        self.adjustSize()\n        self._update_messages()\n\n    @property\n    def writer(self):\n        return self.filters[self.filter]\n\n    @Inputs.data\n    def dataset(self, data):\n        self.Error.clear()\n        self.data = data\n        self._update_status()\n        self._update_messages()\n        if self.auto_save and self.filename:\n            self.save_file()\n\n    def save_file(self):\n        if not self.filename:\n            self.save_file_as()\n            return\n\n        self.Error.general_error.clear()\n        if self.data is None \\\n                or not self.filename \\\n                or (self.data.is_sparse()\n                        and not self.writer.SUPPORT_SPARSE_DATA):\n            return\n        try:\n            self.writer.write(\n                self.filename, self.data, self.add_type_annotations)\n        except IOError as err_value:\n            self.Error.general_error(str(err_value))\n\n    def save_file_as(self):\n        filename, selected_filter = self.get_save_filename()\n        if not filename:\n            return\n        self.filename = filename\n        self.filter = selected_filter\n        self.last_dir = os.path.split(self.filename)[0]\n        self.bt_save.setText(f\"Save as {os.path.split(filename)[1]}\")\n        self._update_messages()\n        self.save_file()\n\n    def _update_messages(self):\n        self.Error.no_file_name(\n            shown=not self.filename and self.auto_save)\n        self.Error.unsupported_sparse(\n            shown=self.data is not None and self.data.is_sparse()\n            and self.filename and not self.writer.SUPPORT_SPARSE_DATA)\n\n    def _update_status(self):\n        if self.data is None:\n            self.info.set_input_summary(self.info.NoInput)\n        else:\n            self.info.set_input_summary(\n                str(len(self.data)),\n                f\"Data set {self.data.name or '(no name)'} \"\n                f\"with {len(self.data)} instances\")\n\n    def send_report(self):\n        self.report_data_brief(self.data)\n        writer = self.writer\n        noyes = [\"No\", \"Yes\"]\n        self.report_items((\n            (\"File name\", self.filename or \"not set\"),\n            (\"Format\", writer.DESCRIPTION),\n            (\"Type annotations\",\n             writer.OPTIONAL_TYPE_ANNOTATIONS\n             and noyes[self.add_type_annotations])\n        ))\n\n    @classmethod\n    def migrate_settings(cls, settings, version=0):\n        def migrate_to_version_2():\n            # Set the default; change later if possible\n            settings.pop(\"compression\", None)\n            settings[\"filter\"] = next(iter(cls.filters))\n            filetype = settings.pop(\"filetype\", None)\n            if filetype is None:\n                return\n\n            ext = cls._extension_from_filter(filetype)\n            if settings.pop(\"compress\", False):\n                for afilter in cls.filters:\n                    if ext + \".gz\" in afilter:\n                        settings[\"filter\"] = afilter\n                        return\n                # If not found, uncompressed may have been erroneously set\n                # for a writer that didn't support if (such as .xlsx), so\n                # fall through to uncompressed\n            for afilter in cls.filters:\n                if ext in afilter:\n                    settings[\"filter\"] = afilter\n                    return\n\n        if version < 2:\n            migrate_to_version_2()\n\n    def _initial_start_dir(self):\n        if self.filename and os.path.exists(os.path.split(self.filename)[0]):\n            return self.filename\n        else:\n            data_name = getattr(self.data, 'name', '')\n            if data_name:\n                data_name += self.writer.EXTENSIONS[0]\n            return os.path.join(self.last_dir or self.userhome, data_name)\n\n    @staticmethod\n    def _replace_extension(filename, extension):\n        if filename.endswith(extension):  # it may contain dots before extension\n            return filename\n        last_fn = None\n        while last_fn != filename:\n            last_fn, filename = filename, os.path.splitext(filename)[0]\n        return filename + extension\n\n    @staticmethod\n    def _extension_from_filter(selected_filter):\n        return re.search(r\".*\\(\\*?(\\..*)\\)$\", selected_filter).group(1)\n\n    # As of Qt 5.9, QFileDialog.setDefaultSuffix does not support double\n    # suffixes, not even in non-native dialogs. We handle each OS separately.\n    if sys.platform == \"darwin\":\n        # On macOS, is double suffixes are passed to the dialog, they are\n        # appended multiple times even if already present (QTBUG-44227).\n        # The only known workaround with native dialog is to use suffix *.*.\n        # We add the correct suffix after closing the dialog and only then check\n        # if the file exists and ask whether to override.\n        # It is a bit confusing that the user does not see the final name in the\n        # dialog, but I see no better solution.\n        def get_save_filename(self):  # pragma: no cover\n            def no_suffix(filt):\n                return filt.split(\"(\")[0] + \"(*.*)\"\n\n            mac_filters = {no_suffix(f): f for f in self.filters}\n            filename = self._initial_start_dir()\n            while True:\n                dlg = QFileDialog(\n                    None, \"Save File\", filename, \";;\".join(mac_filters))\n                dlg.setAcceptMode(dlg.AcceptSave)\n                dlg.selectNameFilter(no_suffix(self.filter))\n                dlg.setOption(QFileDialog.HideNameFilterDetails)\n                dlg.setOption(QFileDialog.DontConfirmOverwrite)\n                if dlg.exec() == QFileDialog.Rejected:\n                    return \"\", \"\"\n                filename = dlg.selectedFiles()[0]\n                selected_filter = mac_filters[dlg.selectedNameFilter()]\n                filename = self._replace_extension(\n                    filename, self._extension_from_filter(selected_filter))\n                if not os.path.exists(filename) or QMessageBox.question(\n                        self, \"Overwrite file?\",\n                        f\"File {os.path.split(filename)[1]} already exists.\\n\"\n                        \"Overwrite?\") == QMessageBox.Yes:\n                    return filename, selected_filter\n\n    elif sys.platform == \"win32\":\n        # TODO: This is not tested!!!\n        # Windows native dialog may work correctly; if not, we may do the same\n        # as for macOS?\n        def get_save_filename(self):  # pragma: no cover\n            return QFileDialog.getSaveFileName(\n                self, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters), self.filter)\n\n    else:  # Linux and any unknown platforms\n        # Qt does not use a native dialog on Linux, so we can connect to\n        # filterSelected and to overload selectFile to change the extension\n        # while the dialog is open.\n        # For unknown platforms (which?), we also use the non-native dialog to\n        # be sure we know what happens.\n        class SaveFileDialog(QFileDialog):\n            # pylint: disable=protected-access\n            def __init__(self, *args, **kwargs):\n                super().__init__(*args, **kwargs)\n                self.setAcceptMode(QFileDialog.AcceptSave)\n                self.setOption(QFileDialog.DontUseNativeDialog)\n                self.filterSelected.connect(self.updateDefaultExtension)\n\n            def selectNameFilter(self, selected_filter):\n                super().selectNameFilter(selected_filter)\n                self.updateDefaultExtension(selected_filter)\n\n            def updateDefaultExtension(self, selected_filter):\n                self.suffix = OWSave._extension_from_filter(selected_filter)\n                files = self.selectedFiles()\n                if files and not os.path.isdir(files[0]):\n                    self.selectFile(files[0].split(\".\")[0])\n\n            def selectFile(self, filename):\n                filename = OWSave._replace_extension(filename, self.suffix)\n                super().selectFile(filename)\n\n        def get_save_filename(self):\n            dlg = self.SaveFileDialog(\n                None, \"Save File\", self._initial_start_dir(),\n                \";;\".join(self.filters))\n            dlg.selectNameFilter(self.filter)\n            if dlg.exec() == QFileDialog.Rejected:\n                return \"\", \"\"\n            else:\n                return dlg.selectedFiles()[0], dlg.selectedNameFilter()\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWSave).run(Table(\"iris\"))\n"}
A user will ask you to solve a task. You should first draft your thinking process (inner monologue). Then, generate the solution.

Your response format must follow the template below:
<think>
Your thoughts or/and draft, like working through an exercise on scratch paper. Be as casual and as long as you want until you are confident to generate a correct solution.
</think>
<solution>
Final solution presented to the user.
</solution>
system
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** Incorrect Handling of Multi-Part Extensions When Enforcing Default Extensions

**Description:**
When enforcing default extensions on filenames that have multiple extensions, such as `.tab.gz`, the extension replacement function fails to handle them correctly. Specifically, it strips only part of the extension instead of recognizing and removing the entire known multi-part extension.

**Example Buggy Code:**
```python
filename = "/bing.bada.boom/foo.1942.tab"
new_filename = OWSave._replace_extension(filename, ".tab.gz")
print(new_filename)  # Outputs: "/bing.bada.boom/foo.tab.gz"
```

**Expected Behavior:**
The filename should correctly replace the existing multi-part extension, resulting in `/bing.bada.boom/foo.1942.tab.gz`. This ensures that the original identifier (`1942`) is preserved while updating the file extension.

**Actual Behavior:**
Only part of the extension is stripped, leading to an incorrect filename `/bing.bada.boom/foo.tab.gz`. This removes the identifier (`1942`) unintentionally and does not properly enforce the desired multi-part extension.

[/ISSUE]
--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.

--- BEGIN FILE ---
```
### Orange/widgets/data/owsave.py
import os.path
import sys
import re

from AnyQt.QtWidgets import QFileDialog, QGridLayout, QMessageBox

from Orange.data.table import Table
from Orange.data.io import TabReader, CSVReader, PickleReader, ExcelReader
from Orange.widgets import gui, widget
from Orange.widgets.settings import Setting
from Orange.widgets.utils.widgetpreview import WidgetPreview
from Orange.widgets.widget import Input


class OWSave(widget.OWWidget):
    name = "Save Data"
    description = "Save data to an output file."
    icon = "icons/Save.svg"
    category = "Data"
    keywords = []

    settings_version = 2

    writers = [TabReader, CSVReader, PickleReader, ExcelReader]
    filters = {
        **{f"{w.DESCRIPTION} (*{w.EXTENSIONS[0]})": w
           for w in writers},
        **{f"Compressed {w.DESCRIPTION} (*{w.EXTENSIONS[0]}.gz)": w
           for w in writers if w.SUPPORT_COMPRESSED}
    }
    userhome = os.path.expanduser(f"~{os.sep}")

    class Inputs:
        data = Input("Data", Table)

    class Error(widget.OWWidget.Error):
        unsupported_sparse = widget.Msg("Use Pickle format for sparse data.")
        no_file_name = widget.Msg("File name is not set.")
        general_error = widget.Msg("{}")

    want_main_area = False
    resizing_enabled = False

    last_dir = Setting("")
    filter = Setting(next(iter(filters)))
    filename = Setting("", schema_only=True)
    add_type_annotations = Setting(True)
    auto_save = Setting(False)

    def __init__(self):
        super().__init__()
        self.data = None

        grid = QGridLayout()
        gui.widgetBox(self.controlArea, orientation=grid)
        grid.addWidget(
            gui.checkBox(
                None, self, "add_type_annotations",
                "Add type annotations to header",
                tooltip=
                "Some formats (Tab-delimited, Comma-separated) can include \n"
                "additional information about variables types in header rows.",
                callback=self._update_messages),
            0, 0, 1, 2)
        grid.setRowMinimumHeight(1, 8)
        grid.addWidget(
            gui.checkBox(
                None, self, "auto_save", "Autosave when receiving new data",
                callback=self._update_messages),
            2, 0, 1, 2)
        grid.setRowMinimumHeight(3, 8)
        self.bt_save = gui.button(None, self, "Save", callback=self.save_file)
        grid.addWidget(self.bt_save, 4, 0)
        grid.addWidget(
            gui.button(None, self, "Save as ...", callback=self.save_file_as),
            4, 1)

        self.adjustSize()
        self._update_messages()

    @property
    def writer(self):
        return self.filters[self.filter]

    @Inputs.data
    def dataset(self, data):
        self.Error.clear()
        self.data = data
        self._update_status()
        self._update_messages()
        if self.auto_save and self.filename:
            self.save_file()

    def save_file(self):
        if not self.filename:
            self.save_file_as()
            return

        self.Error.general_error.clear()
        if self.data is None \
                or not self.filename \
                or (self.data.is_sparse()
                        and not self.writer.SUPPORT_SPARSE_DATA):
            return
        try:
            self.writer.write(
                self.filename, self.data, self.add_type_annotations)
        except IOError as err_value:
            self.Error.general_error(str(err_value))

    def save_file_as(self):
        filename, selected_filter = self.get_save_filename()
        if not filename:
            return
        self.filename = filename
        self.filter = selected_filter
        self.last_dir = os.path.split(self.filename)[0]
        self.bt_save.setText(f"Save as {os.path.split(filename)[1]}")
        self._update_messages()
        self.save_file()

    def _update_messages(self):
        self.Error.no_file_name(
            shown=not self.filename and self.auto_save)
        self.Error.unsupported_sparse(
            shown=self.data is not None and self.data.is_sparse()
            and self.filename and not self.writer.SUPPORT_SPARSE_DATA)

    def _update_status(self):
        if self.data is None:
            self.info.set_input_summary(self.info.NoInput)
        else:
            self.info.set_input_summary(
                str(len(self.data)),
                f"Data set {self.data.name or '(no name)'} "
                f"with {len(self.data)} instances")

    def send_report(self):
        self.report_data_brief(self.data)
        writer = self.writer
        noyes = ["No", "Yes"]
        self.report_items((
            ("File name", self.filename or "not set"),
            ("Format", writer.DESCRIPTION),
            ("Type annotations",
             writer.OPTIONAL_TYPE_ANNOTATIONS
             and noyes[self.add_type_annotations])
        ))

    @classmethod
    def migrate_settings(cls, settings, version=0):
        def migrate_to_version_2():
            # Set the default; change later if possible
            settings.pop("compression", None)
            settings["filter"] = next(iter(cls.filters))
            filetype = settings.pop("filetype", None)
            if filetype is None:
                return

            ext = cls._extension_from_filter(filetype)
            if settings.pop("compress", False):
                for afilter in cls.filters:
                    if ext + ".gz" in afilter:
                        settings["filter"] = afilter
                        return
                # If not found, uncompressed may have been erroneously set
                # for a writer that didn't support if (such as .xlsx), so
                # fall through to uncompressed
            for afilter in cls.filters:
                if ext in afilter:
                    settings["filter"] = afilter
                    return

        if version < 2:
            migrate_to_version_2()

    def _initial_start_dir(self):
        if self.filename and os.path.exists(os.path.split(self.filename)[0]):
            return self.filename
        else:
            data_name = getattr(self.data, 'name', '')
            if data_name:
                data_name += self.writer.EXTENSIONS[0]
            return os.path.join(self.last_dir or self.userhome, data_name)

    @staticmethod
    def _replace_extension(filename, extension):
        if filename.endswith(extension):  # it may contain dots before extension
            return filename
        last_fn = None
        while last_fn != filename:
            last_fn, filename = filename, os.path.splitext(filename)[0]
        return filename + extension

    @staticmethod
    def _extension_from_filter(selected_filter):
        return re.search(r".*\(\*?(\..*)\)$", selected_filter).group(1)

    # As of Qt 5.9, QFileDialog.setDefaultSuffix does not support double
    # suffixes, not even in non-native dialogs. We handle each OS separately.
    if sys.platform == "darwin":
        # On macOS, is double suffixes are passed to the dialog, they are
        # appended multiple times even if already present (QTBUG-44227).
        # The only known workaround with native dialog is to use suffix *.*.
        # We add the correct suffix after closing the dialog and only then check
        # if the file exists and ask whether to override.
        # It is a bit confusing that the user does not see the final name in the
        # dialog, but I see no better solution.
        def get_save_filename(self):  # pragma: no cover
            def no_suffix(filt):
                return filt.split("(")[0] + "(*.*)"

            mac_filters = {no_suffix(f): f for f in self.filters}
            filename = self._initial_start_dir()
            while True:
                dlg = QFileDialog(
                    None, "Save File", filename, ";;".join(mac_filters))
                dlg.setAcceptMode(dlg.AcceptSave)
                dlg.selectNameFilter(no_suffix(self.filter))
                dlg.setOption(QFileDialog.HideNameFilterDetails)
                dlg.setOption(QFileDialog.DontConfirmOverwrite)
                if dlg.exec() == QFileDialog.Rejected:
                    return "", ""
                filename = dlg.selectedFiles()[0]
                selected_filter = mac_filters[dlg.selectedNameFilter()]
                filename = self._replace_extension(
                    filename, self._extension_from_filter(selected_filter))
                if not os.path.exists(filename) or QMessageBox.question(
                        self, "Overwrite file?",
                        f"File {os.path.split(filename)[1]} already exists.\n"
                        "Overwrite?") == QMessageBox.Yes:
                    return filename, selected_filter

    elif sys.platform == "win32":
        # TODO: This is not tested!!!
        # Windows native dialog may work correctly; if not, we may do the same
        # as for macOS?
        def get_save_filename(self):  # pragma: no cover
            return QFileDialog.getSaveFileName(
                self, "Save File", self._initial_start_dir(),
                ";;".join(self.filters), self.filter)

    else:  # Linux and any unknown platforms
        # Qt does not use a native dialog on Linux, so we can connect to
        # filterSelected and to overload selectFile to change the extension
        # while the dialog is open.
        # For unknown platforms (which?), we also use the non-native dialog to
        # be sure we know what happens.
        class SaveFileDialog(QFileDialog):
            # pylint: disable=protected-access
            def __init__(self, *args, **kwargs):
                super().__init__(*args, **kwargs)
                self.setAcceptMode(QFileDialog.AcceptSave)
                self.setOption(QFileDialog.DontUseNativeDialog)
                self.filterSelected.connect(self.updateDefaultExtension)

            def selectNameFilter(self, selected_filter):
                super().selectNameFilter(selected_filter)
                self.updateDefaultExtension(selected_filter)

            def updateDefaultExtension(self, selected_filter):
                self.suffix = OWSave._extension_from_filter(selected_filter)
                files = self.selectedFiles()
                if files and not os.path.isdir(files[0]):
                    self.selectFile(files[0].split(".")[0])

            def selectFile(self, filename):
                filename = OWSave._replace_extension(filename, self.suffix)
                super().selectFile(filename)

        def get_save_filename(self):
            dlg = self.SaveFileDialog(
                None, "Save File", self._initial_start_dir(),
                ";;".join(self.filters))
            dlg.selectNameFilter(self.filter)
            if dlg.exec() == QFileDialog.Rejected:
                return "", ""
            else:
                return dlg.selectedFiles()[0], dlg.selectedNameFilter()


if __name__ == "__main__":  # pragma: no cover
    WidgetPreview(OWSave).run(Table("iris"))

```
--- END FILE ---

Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.

Every *SEARCH/REPLACE* edit must use this format:
1. The file path
2. The start of search block: <<<<<<< SEARCH
3. A contiguous chunk of lines to search for in the existing source code
4. The dividing line: =======
5. The lines to replace into the source code
6. The end of the replace block: >>>>>>> REPLACE

Here is an example:

```python
### mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
</solution>

Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
Wrap each *SEARCH/REPLACE* edit in a code block as shown in the example above. If you have multiple *SEARCH/REPLACE* edits, use a separate code block for each one.
user