Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running ./bootstap.py --test should open an empty history.py #7112

Closed
10 tasks done
bcolsen opened this issue May 11, 2018 · 1 comment
Closed
10 tasks done

Running ./bootstap.py --test should open an empty history.py #7112

bcolsen opened this issue May 11, 2018 · 1 comment

Comments

@bcolsen
Copy link
Member

bcolsen commented May 11, 2018

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide 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
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

I found that ./bootstap.py --test would also open a default Spyder instance for debugging.

But it opens your local history and opens new file with my template

It would be easier to debug issues with out resetting my Syder config all the time.

What steps reproduce the problem?

  1. Start Spyder Master
  2. See your 10+mb(I guess I like my code cells) history.py in the history
  3. Start a new file and see your template

What is the expected output? What do you see instead?

Like temporary a spyder reset

Versions

From anaconda in a new environ.
Spyder started from the command line with ./bootstrap.py --test

  • Spyder version: current master
  • Python version: 3.6.5 64bits
  • Qt version: 5.9.4
  • PyQt version: 5.9.2
  • Operating System name/version: Ubuntu 16.04

Dependencies

pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.4.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  None (NOK)
numpy >=1.7      :  None (NOK)
sphinx >=0.6.6   :  1.7.4 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.11.0    :  0.12.0 (OK)
psutil >=0.3     :  5.4.5 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  None (NOK)
cython >=0.21    :  None (NOK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.4.0 (OK)
pylint >=0.25    :  1.8.4 (OK)
@CAM-Gerlach
Copy link
Member

Thanks @bcolsen . Basically, unlike setting SPYDER_PYTEST, which is set by the test suite to force Spyder to run with a clean configuration directory, passing the --test flag to bootstrap.py just sets the SPYDER_TEST env variable which instead tells spyder to not load and save your individual settings file, spyder.ini (or its Linux equivalent), while not affecting handling of anything else inside for spyder-py3 directory, including the history logs for the normal and internal consoles, along with your pylint, profiler, working dir, help, and online help histories, your language and rope settings, any third party plugins you may have installed, and your default temp.py and template.py (new file template) files. Obviously, this is not particularly desirable for most testing scenarios—one would want "clean" to be truly "clean", without such cruft.

While we could just have the history log check for TEST when loading/saving history and handle it accordingly, as we currently do with spyder.ini the better solution I would think would be to just have --test set the Spyder config dir to a clean temp one, just like SPYDER_PYTEST currently does. I've implemented and tested it locally, and everything seems to work fine—I'll push a PR momentarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants