internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: spyder-ide/spyder

Issue:
Debugger message bug gets printed in the IPython Console
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->

## Problem Description

After starting an IPython Console with the standalon installer on Windows sometimes you get a message at the top regarding the debugger.

Checking seems like this was reported at https://github.com/spyder-ide/spyder/issues/16896#issuecomment-979837635 but I only notice it until now. Not totally sure if this is some sort of warning that needs to be handled/removed or something else @ccordoba12 @impact27 ?


### Paste Traceback/Error Below (if applicable)
<!--- Copy from error dialog or View > Panes > Internal Console --->

```python-traceback

It seems the debugger cannot resolve D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\ntpath.py
This may make the debugger miss breakpoints in the standard library.
Related bug: https://bugs.python.org/issue1180193

```

## Versions
* Spyder version: 5.2.0 None
* Python version: 3.7.9 64-bit
* Qt version: 5.12.10
* PyQt5 version: 5.12.3
* Operating System: Windows 10


Discussion:
In PR https://github.com/spyder-ide/spyder/pull/14025 there was an issue with: 


This version of python seems to be incorrectly compiled
  (internal generated filenames are not absolute).
  This may make the debugger miss breakpoints.
  Related bug: http://bugs.python.org/issue1666807


(Maybe related, we solved that one by skipping it)
Do you see any adverse effect while debugging?
I checked putting some breakpoints in a simple script and seems like the breakpoints work. 

Will check then the logic to skip it. Thanks for the info @impact27 :+1:

Resolving patch:
diff --git a/spyder/plugins/ipythonconsole/widgets/client.py b/spyder/plugins/ipythonconsole/widgets/client.py
--- a/spyder/plugins/ipythonconsole/widgets/client.py
+++ b/spyder/plugins/ipythonconsole/widgets/client.py
@@ -498,6 +498,9 @@ def show_kernel_error(self, error):
         if "http://bugs.python.org/issue1666807" in error:
             # See spyder-ide/spyder#16828
             return
+        if "https://bugs.python.org/issue1180193" in error:
+            # See spyder-ide/spyder#16927
+            return
 
         InstallerIPythonKernelError(error)
 


Test patch:
Repository: spyder-ide/spyder

Issue:
Latex rendering with dark theme is broken
When I use Astropy quantities, they are rendered as black-text latex in Spyder's ipython console. This is fine when the console has a light background, but unreadable when I choose a dark theme for Spyder. There is a similar issue with pint.
I was not able to find settings anywhere in Astropy/ipython/Spyder to fix this.
Astropy defines a _repr_latex_ method. The only workaround I could find was to delete the method.



Discussion:
Hi @moux233,

Can you give me a set of steps to reproduce your issue? Also if you can post an image of the console?
Hi @steff456 

![image](https://user-images.githubusercontent.com/56129128/110511322-65a38680-8104-11eb-9a4b-6d3fe5180ce9.png)

import astropy.units as u
x = 2 << u.m

and then display x at the console
Thanks for the example! Right now all the team is working really hard on Spyder 5, but once it is out we will work in this issue.

Thanks for reporting!
![image](https://user-images.githubusercontent.com/84018859/118206516-4d434580-b480-11eb-8f2e-5eb3ac3e697f.png)
I just wanted to give another example using SymPy. Perhaps a way to change the colour of the LaTeXed text would be helpful.
@Kshitij-rgb, if you want Latex expressions to be properly rendered when using dark themes, you need to use our Sympy consoles. You can open one by going the menu

    Consoles > New special console > New SymPy console

If you don't want to use them, you need to import first [`init_printing`](https://docs.sympy.org/latest/modules/interactive.html?highlight=init_printing#sympy.interactive.printing.init_printing) and pass the appropriate parameters to it.

Resolving patch:
diff --git a/spyder/plugins/ipythonconsole/widgets/shell.py b/spyder/plugins/ipythonconsole/widgets/shell.py
--- a/spyder/plugins/ipythonconsole/widgets/shell.py
+++ b/spyder/plugins/ipythonconsole/widgets/shell.py
@@ -23,6 +23,7 @@
 # Local imports
 from spyder.config.base import (
     _, is_pynsist, running_in_mac_app, running_under_pytest)
+from spyder.config.gui import get_color_scheme
 from spyder.py3compat import to_text_string
 from spyder.utils.palette import SpyderPalette
 from spyder.utils import encoding
@@ -945,6 +946,17 @@ def _syntax_style_changed(self):
         else:
             self._highlighter.set_style_sheet(self.style_sheet)
 
+    def _get_color(self, color):
+        """
+        Get a color as qtconsole.styles._get_color() would return from
+        a builtin Pygments style.
+        """
+        color_scheme = get_color_scheme(self.syntax_style)
+        return dict(
+            bgcolor=color_scheme['background'],
+            select=color_scheme['background'],
+            fgcolor=color_scheme['normal'][0])[color]
+
     def _prompt_started_hook(self):
         """Emit a signal when the prompt is ready."""
         if not self._reading:


Test patch:
Repository: spyder-ide/spyder

Issue:
No possibility to select yapf as auto-formatter in preferences
```
autopep8                  1.5.7
black                     19.10b0
yapf                      0.31.0
```

But I can only choose autopep8 or black in auto-formatter. I use spyder on Linux

```
spyder                    5.1.5
```


Discussion:
Hi @Firestar-Reimu,

We decided to not include yapf in the auto formatter options because the server doesn't support changing the maximum line length and other options that are in the preferences dialog. This made really hard to include it and made the current UI work for it. We are waiting for them to add these options into the server so we can add it smoothly in Spyder.

For now, we are unable to add it to Spyder.

Resolving patch:
diff --git a/spyder/plugins/completion/providers/languageserver/conftabs/formatting.py b/spyder/plugins/completion/providers/languageserver/conftabs/formatting.py
--- a/spyder/plugins/completion/providers/languageserver/conftabs/formatting.py
+++ b/spyder/plugins/completion/providers/languageserver/conftabs/formatting.py
@@ -120,9 +120,9 @@ def __init__(self, parent):
             "<a href='https://black.readthedocs.io/en/stable'>Black</a>"
         )
         code_fmt_label = QLabel(
-            _("Spyder can use {0}, {1} or {2} to format your code for "
-              "conformance to the {3} convention.").format(
-                  autopep8_url, yapf_url, black_url, pep_url))
+            _("Spyder can use {0} or {1} to format your code for "
+              "conformance to the {2} convention.").format(
+                  autopep8_url, black_url, pep_url))
         code_fmt_label.setOpenExternalLinks(True)
         code_fmt_label.setWordWrap(True)
 


Test patch:
Repository: spyder-ide/spyder

Issue:
Remove Kite startup splash screen when Spyder starts
Kite nagger screen is a BUG as far as I am concerned.  

There is no checkbox to permanently disable the Spyder Startup "Nagger" Screen for Kite. 

Please add a way to get rid of this forever.  I've seen it too many times.   

Where do I disable this permanently ?  

Please post instructions to eliminate it !!

Thank you.  

Richard

### Issue Report Checklist

* [ ] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [ ] Read the relevant sections of the [Spyder Troubleshooting Guide](https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ) and followed its advice
* [ ] Reproduced the issue after updating with ``conda update spyder`` (or ``pip``, if not using Anaconda)
* [ ] Could not reproduce inside ``jupyter qtconsole`` (if console-related)
* [ ] Tried basic troubleshooting (if a bug/error)
    * [ ] Restarted Spyder
    * [ ] Reset preferences with ``spyder --reset``
    * [ ] Reinstalled the latest version of [Anaconda](https://www.anaconda.com/download/)
    * [ ] Tried the other applicable steps from the Troubleshooting Guide
* [ ] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below


## Problem Description



### What steps reproduce the problem?

1. 
2. 
3. 

### What is the expected output? What do you see instead?



### Paste Traceback/Error Below (if applicable)
<!--- Copy from error dialog or View > Panes > Internal Console --->

```python-traceback

PASTE TRACEBACK HERE

```

## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: 
* Python version: 
* Qt version: 
* PyQt version: 
* Operating System name/version: 

### Dependencies
<!--- Please go to the menu entry Help > Dependencies,
press the Copy to clipboard button and paste below --->

```
PASTE DEPENDENCIES HERE
```



Discussion:
Hi @richdevboston , sorry for the late reply. Could you submit here a screenshot to better undertand what are you talking? Let us know
Closing due to lack of response

Resolving patch:
diff --git a/spyder/plugins/completion/providers/kite/provider.py b/spyder/plugins/completion/providers/kite/provider.py
--- a/spyder/plugins/completion/providers/kite/provider.py
+++ b/spyder/plugins/completion/providers/kite/provider.py
@@ -140,8 +140,6 @@ def shutdown(self):
             self.kite_process.kill()
 
     def on_mainwindow_visible(self):
-        self.sig_call_statusbar.emit(
-            KiteStatusWidget.ID, 'mainwindow_setup_finished', tuple(), {})
         self.client.sig_response_ready.connect(self._kite_onboarding)
         self.client.sig_status_response_ready.connect(self._kite_onboarding)
         self.client.sig_onboarding_response_ready.connect(


Test patch:
Repository: spyder-ide/spyder

Issue:
Add spyder-terminal plugin to macOS and Windows installers
The macOS installer currently does not incorporate external plugins.
As a first step, attempt to include Spyder Terminal.



Discussion:
I think that's a great idea! For now, the only one that is stable and well maintained (thanks to @steff456) is Spyder-terminal. When Spyder-notebook reaches that level of maturity, we could include it as well.
@dalthviz, what do you think about doing the same for the Windows installer?
Makes sense to me :+1: although in the future maybe we should think in a way for users to install the plugins they want even when using a standalone distribution (some sort of plugin manager that enables the installation of plugins or something like that)
> Makes sense to me 👍 although in the future maybe we should think in a way for users to install the plugins they want even when using a standalone distribution (some sort of plugin manager that enables the installation of plugins or something like that)

I think that would be a great idea. Not sure how to make it work, though, since at present the python packages have to be present in the build environment when the macOS application is bundled. Some time in the future, I should try to install python packages into the Spyder macOS application _after_ it's bundled; if that could work, then it should be pretty straight forward to implement.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -50,6 +50,8 @@
 # =============================================================================
 NAME = 'spyder'
 LIBNAME = 'spyder'
+WINDOWS_INSTALLER_NAME = os.environ.get('EXE_NAME')
+
 from spyder import __version__, __website_url__  #analysis:ignore
 
 
@@ -243,6 +245,12 @@ def run(self):
     'watchdog>=0.10.3'
 ]
 
+# Replace spyder-kernels constraint to enable
+# building Windows installers on PRs
+if 'dev' in __version__ and WINDOWS_INSTALLER_NAME:
+    install_requires.remove('spyder-kernels>=2.2.1,<2.3.0')
+    install_requires.append('spyder-kernels>=2.2.1,<=2.3.0.dev0')
+
 extras_require = {
     'test:platform_system == "Linux"': ['pytest-xvfb'],
     'test:platform_system == "Windows"': ['pywin32'],


Test patch:
Repository: spyder-ide/spyder

Issue:
Drop support for Python 3.6
Python 3.6 will reach end-of-life (EOL) in two weeks and we have several blockers due to us still supporting that old version:

* https://github.com/spyder-ide/spyder/pull/16957 (it's much easier to deal with those changes by simply requiring 3.7+)
* https://github.com/python-lsp/python-lsp-server/pull/130 (this is required to add new functionality to the PyLSP).

Since the 3.6 EOL will happen in the middle of our 5.2 cycle, I plan to include this in 5.2.2. Fortunately, I haven't seen people opening issues with Python 3.6 in a long time.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -39,8 +39,8 @@
 # Taken from the notebook setup.py -- Modified BSD License
 # =============================================================================
 v = sys.version_info
-if v[0] >= 3 and v[:2] < (3, 6):
-    error = "ERROR: Spyder requires Python version 3.6 and above."
+if v[0] >= 3 and v[:2] < (3, 7):
+    error = "ERROR: Spyder requires Python version 3.7 and above."
     print(error, file=sys.stderr)
     sys.exit(1)
 
@@ -178,14 +178,13 @@ def run(self):
     package_data={LIBNAME: get_package_data(LIBNAME, EXTLIST)},
     scripts=[osp.join('scripts', fname) for fname in SCRIPTS],
     data_files=get_data_files(),
-    python_requires='>=3.6',
+    python_requires='>=3.7',
     classifiers=[
         'License :: OSI Approved :: MIT License',
         'Operating System :: MacOS',
         'Operating System :: Microsoft :: Windows',
         'Operating System :: POSIX :: Linux',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
         'Programming Language :: Python :: 3.9',
diff --git a/spyder/requirements.py b/spyder/requirements.py
--- a/spyder/requirements.py
+++ b/spyder/requirements.py
@@ -39,7 +39,7 @@ def check_path():
 
 def check_qt():
     """Check Qt binding requirements"""
-    qt_infos = dict(pyqt5=("PyQt5", "5.6"), pyside2=("PySide2", "5.6"))
+    qt_infos = dict(pyqt5=("PyQt5", "5.9"), pyside2=("PySide2", "5.12"))
     try:
         import qtpy
         package_name, required_ver = qt_infos[qtpy.API]


Test patch:
diff --git a/spyder/app/tests/spyder-boilerplate/setup.py b/spyder/app/tests/spyder-boilerplate/setup.py
--- a/spyder/app/tests/spyder-boilerplate/setup.py
+++ b/spyder/app/tests/spyder-boilerplate/setup.py
@@ -19,7 +19,7 @@
     author_email="spyder.python@gmail.com",
     description="Plugin that registers a programmatic custom layout",
     license="MIT license",
-    python_requires='>= 3.6',
+    python_requires='>= 3.7',
     install_requires=[
         "qtpy",
         "qtawesome",
Repository: spyder-ide/spyder

Issue:
Require IPython >= 7.31.1 due to CVE-2022-21699 ?
In light of [CVE-2022-21699](https://github.com/advisories/GHSA-pq7m-3gw7-gq5x) and its severity, should Spyder require patched IPython versions? Considering that dropping 3.6 is planned (https://github.com/spyder-ide/spyder/issues/16971) and IPython >= 8 is not currently supported this should mean the requirement of `ipython >=7.31.1,<8.0.0`


Discussion:
Hey @rhkarls, thanks a lot for the suggestion! We'll request that IPython version in our next version (5.3.0), to be released in a couple of months.
Thanks for the follow up @ccordoba12 .It appears that at least 5.2.2 Windows installer is already packaged with 7.31.1, so that's great!

Resolving patch:
diff --git a/external-deps/spyder-kernels/setup.py b/external-deps/spyder-kernels/setup.py
--- a/external-deps/spyder-kernels/setup.py
+++ b/external-deps/spyder-kernels/setup.py
@@ -42,7 +42,7 @@ def get_version(module='spyder_kernels'):
     'ipykernel<5; python_version<"3"',
     'ipykernel>=6.6.1; python_version>="3"',
     'ipython<6; python_version<"3"',
-    'ipython>=7.6.0,<8; python_version>="3"',
+    'ipython>=7.31.1,<8; python_version>="3"',
     'jupyter-client>=5.3.4,<6; python_version<"3"',
     'jupyter-client>=7.1.0; python_version>="3"',
     'pyzmq>=17,<20; python_version<"3"',
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -207,7 +207,7 @@ def run(self):
     'cookiecutter>=1.6.0',
     'diff-match-patch>=20181111',
     'intervaltree>=3.0.2',
-    'ipython>=7.6.0,<8.0.0',
+    'ipython>=7.31.1,<8.0.0',
     'jedi>=0.17.2,<0.19.0',
     'jellyfish>=0.7',
     'jsonschema>=3.2.0',
diff --git a/spyder/dependencies.py b/spyder/dependencies.py
--- a/spyder/dependencies.py
+++ b/spyder/dependencies.py
@@ -39,7 +39,7 @@
 # None for pynsist install for now
 # (check way to add dist.info/egg.info from packages without wheels available)
 INTERVALTREE_REQVER = None if is_pynsist() else '>=3.0.2'
-IPYTHON_REQVER = ">=7.6.0;<8.0.0"
+IPYTHON_REQVER = ">=7.31.1;<8.0.0"
 JEDI_REQVER = '>=0.17.2;<0.19.0'
 JELLYFISH_REQVER = '>=0.7'
 JSONSCHEMA_REQVER = '>=3.2.0'


Test patch:
diff --git a/external-deps/spyder-kernels/requirements/tests.txt b/external-deps/spyder-kernels/requirements/tests.txt
--- a/external-deps/spyder-kernels/requirements/tests.txt
+++ b/external-deps/spyder-kernels/requirements/tests.txt
@@ -11,5 +11,3 @@ pytest-cov
 scipy
 xarray
 pillow
-# Remove when Anaconda updates to a newer ipykernel
-ipython_genutils
Repository: spyder-ide/spyder

Issue:
On closing a message from the spyder-terminal appears on the Windows installer
I checked with the full installer and seems like is closing without segfaults. However while checking it when closing a message from the spyder-terminal appears:

![imagen](https://user-images.githubusercontent.com/16781833/158633014-69481a0d-5efb-41ab-a147-c5eb7c06ad3b.png)

_Originally posted by @dalthviz in https://github.com/spyder-ide/spyder/pull/16409#discussion_r828185130_


Discussion:
To solve this the right way perhaps we also need to add support for PyQt 5.15 to Spyder-terminal.

So the easiest thing we could do before the release is to force a clean shutdown using `os._exit(0)` for the Windows installer, as we're doing for the Mac one too.

Resolving patch:
diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -1529,7 +1529,9 @@ def closing(self, cancelable=False, close_immediately=False):
                 return False
 
         # TODO: This should be managed in a different way
-        if running_in_mac_app():
+        # Prevents segfaults on close in the MacOS app and showing a warning
+        # message if spyder-terminal is installed
+        if not running_under_pytest():
             # Save window settings *after* closing all plugin windows, in order
             # to show them in their previous locations in the next session.
             # Fixes spyder-ide/spyder#12139


Test patch:
Repository: spyder-ide/spyder

Issue:
IPython kernel error with debugpy 1.6.0
`debugpy` was updated to 1.6.0 22 hours ago and is used by `ipykernel` and results in the following error in the IPython Console.
<img width="658" alt="Screen Shot 2022-03-25 at 12 07 33 PM" src="https://user-images.githubusercontent.com/9618975/160185782-6d10a3ef-ab6b-4c67-978e-a0778f396223.png">

This is an evolution of the problem in #16828. I'll provide a fix in a subsequent PR.



Discussion:

Resolving patch:
diff --git a/spyder/plugins/ipythonconsole/utils/kernelspec.py b/spyder/plugins/ipythonconsole/utils/kernelspec.py
--- a/spyder/plugins/ipythonconsole/utils/kernelspec.py
+++ b/spyder/plugins/ipythonconsole/utils/kernelspec.py
@@ -198,9 +198,15 @@ def env(self):
             env_vars['SPY_RUN_CYTHON'] = True
 
         # App considerations
-        if (running_in_mac_app() or is_pynsist()) and not default_interpreter:
-            env_vars.pop('PYTHONHOME', None)
-            env_vars.pop('PYTHONPATH', None)
+        if (running_in_mac_app() or is_pynsist()):
+            if default_interpreter:
+                # See spyder-ide/spyder#16927
+                # See spyder-ide/spyder#16828
+                # See spyder-ide/spyder#17552
+                env_vars['PYDEVD_DISABLE_FILE_VALIDATION'] = 1
+            else:
+                env_vars.pop('PYTHONHOME', None)
+                env_vars.pop('PYTHONPATH', None)
 
         # Remove this variable because it prevents starting kernels for
         # external interpreters when present.
diff --git a/spyder/plugins/ipythonconsole/widgets/client.py b/spyder/plugins/ipythonconsole/widgets/client.py
--- a/spyder/plugins/ipythonconsole/widgets/client.py
+++ b/spyder/plugins/ipythonconsole/widgets/client.py
@@ -521,14 +521,6 @@ def show_kernel_error(self, error):
     def is_benign_error(self, error):
         """Decide if an error is benign in order to filter it."""
         benign_errors = [
-            # See spyder-ide/spyder#16828
-            "This version of python seems to be incorrectly compiled",
-            "internal generated filenames are not absolute",
-            "This may make the debugger miss breakpoints",
-            "http://bugs.python.org/issue1666807",
-            # See spyder-ide/spyder#16927
-            "It seems the debugger cannot resolve",
-            "https://bugs.python.org/issue1180193",
             # Old error
             "No such comm"
         ]


Test patch:
Repository: spyder-ide/spyder

Issue:
Deactivate by default `Exclude all upper-case variables` option in Variable Explorer
![spyder_version](https://user-images.githubusercontent.com/11318756/132954925-30bdcedb-beec-47a0-b753-cf7bc7ab96b2.png)

Program source:
```
C = 3e8 # m/s
CSQ = C * C
csq = C * C
D = C + 1
DSQ = D * D
dsq = D * D
E = D + 1
```

This is what I see in the Variable Explorer:
![ve](https://user-images.githubusercontent.com/11318756/132954980-7c9db6ad-f199-46d3-b767-6bbaa868e89a.png)

Why are some of the variables whose names are spelled in all caps not displayed?



Discussion:
Hey @texadactyl, thanks for reporting. You need to deactivate the option called `Exclude all upper-case variables` in the Options menu of the Variable Explorer:

![imagen](https://user-images.githubusercontent.com/365293/132959687-be7e71a4-929a-4f6a-80ef-319adccfc9b6.png)

I think having that option activated by default is counterintuitive and it usually surprises people the wrong way (like in this case). @texadactyl, what do you think? Should we deactivate it?
Thanks, @ccordoba12 
That really was a surprise.  Works fine now.
Yes, I think that it should be deactivated by default for the reason you said - counterintuitive.
> Yes, I think that it should be deactivated by default for the reason you said - counterintuitive.

Ok, we'll fix that in our next version (5.2.0), to be released next month.

Resolving patch:
diff --git a/spyder/config/main.py b/spyder/config/main.py
--- a/spyder/config/main.py
+++ b/spyder/config/main.py
@@ -174,7 +174,7 @@
                                           # with ConfigParser's interpolation
               'excluded_names': EXCLUDED_NAMES,
               'exclude_private': True,
-              'exclude_uppercase': True,
+              'exclude_uppercase': False,
               'exclude_capitalized': False,
               'exclude_unsupported': False,
               'exclude_callables_and_modules': True,
@@ -639,4 +639,4 @@
 #    or if you want to *rename* options, then you need to do a MAJOR update in
 #    version, e.g. from 3.0.0 to 4.0.0
 # 3. You don't need to touch this value if you're just adding a new option
-CONF_VERSION = '70.3.0'
+CONF_VERSION = '70.4.0'


Test patch: