Skip to content

Commit

Permalink
Remove deprecated Qt modules and most other Qt-related code
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Feb 27, 2024
1 parent 5f38baf commit 5217e3c
Show file tree
Hide file tree
Showing 120 changed files with 3 additions and 538 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ This repository contains the **glue-core** package which includes much of the co
functionality of glue that is used for the different front-ends, including the Qt-based
application and the Jupyter-based application. Other key repositories include:

* `glue-qt <https://github.com/astrofrog/glue-qt/>`_: the original Qt/desktop application for glue
* `glue-jupyter <https://github.com/astrofrog/glue-jupyter/>`_: a Jupyter front-end for glue
* `glue-qt <https://github.com/glue-viz/glue-qt/>`_: the original Qt/desktop application for glue
* `glue-jupyter <https://github.com/glue-viz/glue-jupyter/>`_: a Jupyter front-end for glue

In addition to these, there are a number of plugin packages available. For a full list of repositories,
see https://github.com/glue-viz/.
Expand Down
7 changes: 0 additions & 7 deletions glue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
from .config import load_configuration
env = load_configuration()


def qglue(*args, **kwargs):
warnings.warn('glue.qglue is deprecated, import qglue from the glue_qt module instead', GlueDeprecationWarning)
from glue_qt import qglue
return qglue(*args, **kwargs)


from .main import load_plugins # noqa


Expand Down
2 changes: 1 addition & 1 deletion glue/_mpl_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Import hook to make sure the proper backend is set when importing
Matplotlib.
"""

Expand Down
4 changes: 0 additions & 4 deletions glue/app/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/actions.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/application.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/edit_subset_mode_toolbar.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/feedback.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/keyboard_shortcuts.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/layer_tree_widget.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/mdi_area.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/metadata.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/plugin_manager.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/preferences.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/save_data.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/splash_screen.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/terminal.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/app/qt/versions.py

This file was deleted.

63 changes: 0 additions & 63 deletions glue/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@

import pytest

try:
from qtpy import PYSIDE2
except Exception:
PYSIDE2 = False

from glue.config import CFG_DIR as CFG_DIR_ORIG

try:
Expand Down Expand Up @@ -73,61 +68,3 @@ def pytest_unconfigure(config):
# Reset configuration directory to original one
from glue import config
config.CFG_DIR = CFG_DIR_ORIG

# Remove reference to QApplication to prevent segmentation fault on PySide
try:
from glue.utils.qt import app
app.qapp = None
except Exception: # for when we run the tests without the qt directories
# Note that we catch any exception, not just ImportError, because
# QtPy can raise a PythonQtError.
pass

if OBJGRAPH_INSTALLED and not ON_APPVEYOR:

# Make sure there are no lingering references to GlueApplication
obj = objgraph.by_type('GlueApplication')
if len(obj) > 0:
objgraph.show_backrefs(objgraph.by_type('GlueApplication'))
warnings.warn('There are {0} remaining references to GlueApplication'.format(len(obj)))

# Uncomment when checking for memory leaks
# objgraph.show_most_common_types(limit=100)


# With PySide2, tests can fail in a non-deterministic way on a teardown error
# or with the following error:
#
# AttributeError: 'PySide2.QtGui.QStandardItem' object has no attribute '...'
#
# Until this can be properly debugged and fixed, we xfail any test that fails
# with one of these exceptions.

if PYSIDE2:
QTSTANDARD_EXC = "QtGui.QStandardItem' object has no attribute "
QTSTANDARD_ATTRS = ["'connect'", "'item'", "'triggered'"]

@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_setup():
try:
outcome = yield
return outcome.get_result()
except AttributeError:
exc = str(outcome.excinfo[1])
for attr in QTSTANDARD_ATTRS:
if QTSTANDARD_EXC + attr in exc:
pytest.xfail(f'Known issue {exc}')

@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_call():
try:
outcome = yield
return outcome.get_result()
# excinfo seems only to be preserved through a single hook
except (AttributeError, ValueError):
exc = str(outcome.excinfo[1])
if "No net viewers should be created in tests" in exc:
pytest.xfail(f'Known issue {exc}')
for attr in QTSTANDARD_ATTRS:
if QTSTANDARD_EXC + attr in exc:
pytest.xfail(f'Known issue {exc}')
4 changes: 0 additions & 4 deletions glue/core/data_exporters/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/data_exporters/qt/dialog.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/data_collection_model.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/dialogs.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/fitters.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/layer_artist_model.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/message_widget.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/mime.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/simpleforms.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/core/qt/style_dialog.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/autolinker/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/autolinker/qt/autolinker.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/common/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/common/qt/component_tree_widget.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/component_arithmetic/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/component_arithmetic/qt/component_arithmetic.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/component_arithmetic/qt/equation_editor.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/component_manager/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/component_manager/qt/component_manager.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/data_wizard/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/data_wizard/qt/data_wizard_dialog.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/link_editor/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/link_editor/qt/data_graph.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/link_editor/qt/link_editor.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/subset_facet/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/dialogs/subset_facet/qt/subset_facet.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/icons/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/icons/qt/helpers.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/io/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/io/qt/directory_importer/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/io/qt/directory_importer/directory_importer.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/io/qt/subset_mask.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/plugins/dendro_viewer/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/plugins/dendro_viewer/qt/data_viewer.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/plugins/dendro_viewer/qt/layer_style_editor.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/plugins/dendro_viewer/qt/options_widget.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/plugins/tools/pv_slicer/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/plugins/tools/pv_slicer/qt/pv_slicer.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/utils/qt/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/utils/qt/app.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/utils/qt/autocomplete_widget.py

This file was deleted.

4 changes: 0 additions & 4 deletions glue/utils/qt/colors.py

This file was deleted.

Loading

0 comments on commit 5217e3c

Please sign in to comment.