Skip to content

Commit

Permalink
remove patches for Spyder<5.2
Browse files Browse the repository at this point in the history
Update requirements/conda.txt

Co-authored-by: Daniel Althviz Moré <d.althviz10@uniandes.edu.co>

Update conda.recipe/meta.yaml

Co-authored-by: Daniel Althviz Moré <d.althviz10@uniandes.edu.co>
  • Loading branch information
skjerns and dalthviz committed May 4, 2022
1 parent 8c55746 commit 34eaba7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requirements:
run:
- line_profiler
- python
- spyder >=5
- spyder >=5.2

test:
# On Linux, importing requires an X server
Expand Down
2 changes: 1 addition & 1 deletion requirements/conda.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
line_profiler
spyder >=5
spyder >=5.2
21 changes: 1 addition & 20 deletions spyder_line_profiler/spyder/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ def is_lineprofiler_installed():
return (programs.is_module_installed('line_profiler')
and programs.find_program('kernprof') is not None)

class PatchPythonModulesComboBox(PythonModulesComboBox):
# for backwards compatibility to Spyder<5.1.5, where no id_ is used
def __init__(self, parent, adjust_to_contents=False, id_=None, **kwargs):
try:
PythonModulesComboBox.__init__(self, parent=parent, id_=id_,
adjust_to_contents=adjust_to_contents)
except Exception:
PythonModulesComboBox.__init__(self, parent=parent,
adjust_to_contents=adjust_to_contents)




class TreeWidgetItem(QTreeWidgetItem):
"""
Expand Down Expand Up @@ -182,7 +170,7 @@ def __init__(self, name=None, plugin=None, parent=None):
self.started_time = None

# Widgets
self.filecombo = PatchPythonModulesComboBox(
self.filecombo = PythonModulesComboBox(
self, id_= SpyderLineProfilerWidgetMainToolbarItems.FileCombo)
self.datatree = LineProfilerDataTree(self)
self.datelabel = QLabel()
Expand All @@ -202,13 +190,6 @@ def __init__(self, name=None, plugin=None, parent=None):
# --- PluginMainWidget API
# ------------------------------------------------------------------------

def create_stretcher(self, id_):
# for backwards compatibility to Spyder<5.1.5, where no id_ is used
try:
return PluginMainWidget.create_stretcher(self, id_)
except Exception:
return PluginMainWidget.create_stretcher(self)

def get_title(self):
return _("Line Profiler")

Expand Down

0 comments on commit 34eaba7

Please sign in to comment.