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

"New -> Module..." menu not saving the new module file to the disk #3186

Closed
ShenggaoZhu opened this issue May 26, 2016 · 1 comment
Closed

Comments

@ShenggaoZhu
Copy link
Contributor

Description

What steps will reproduce the problem?

  1. In the Project explorer or File explorer, right click to pop up the context menu, and then select menu "New -> Module...".
  2. The "New module" dialog shows up for the user to input the module file name, say "a.py". After clicking the Save button on the dialog, the module file "a.py" is not saved to the disk. Also, in the Editor, a new tab is opened for the new module with the default name "untitled0.py", rather than "a.py".
  3. If you edit and try to save the new module, the "Save file" dialog pops up and requires to input the module name again.

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

I would expect that the new module to be saved to the disk, and the Editor shows the new module with the correct name.

Please provide any additional information below

It seems this problem exists for other versions of Spyder as well.

Version and main components

  • Spyder Version: 3.0.0dev
  • Python Version: 2.7.11
  • Qt Versions: 5.5.1, PyQt5 5.5.1 on Darwin

Dependencies

pyflakes >=0.5.0:  1.0.0 (OK)
pep8 >=0.6      :  1.7.0 (OK)
pygments >=1.6  :  2.1 (OK)
qtconsole >=4.0 :  4.1.1 (OK)
nbconvert >=4.0 :  4.1.0 (OK)
pandas >=0.13.1 :  0.17.1 (OK)
numpy >=1.7     :  1.11.0 (OK)
sphinx >=0.6.6  :  1.3.3 (OK)
rope >=0.9.4    :  0.9.4-1 (OK)
jedi >=0.8.1    :  0.8.1 (OK)
psutil >=0.3    :  3.4.2 (OK)
matplotlib >=1.0:  1.5.1 (OK)
sympy >=0.7.3   :  0.7.6.1 (OK)
pylint >=0.25   :  1.5.2 (OK)

@Nodd
Copy link
Contributor

Nodd commented May 26, 2016

Thanks for the reports.
Please note that the status of Projects in spyder is a bit chaotic, we planned to remake it for 3.0 but it looks like it won't be ready.

ShenggaoZhu added a commit to ShenggaoZhu/spyder that referenced this issue May 26, 2016
…-ide#3186

The original `@Slot()` decorator of `Editor.new(self, fname, ...)` ignores the
`fname` argument which is passed in when creating a new module with a given
name (e.g., through context menu "New -> Module..." in Project explorer).
The correct decorator should be `@Slot(str)`, which can also be ignored
completely since a Qt Signal can connect to a plain Python callable.
@ccordoba12 ccordoba12 added this to the v3.0beta4 milestone Jun 1, 2016
ShenggaoZhu added a commit to ShenggaoZhu/spyder that referenced this issue Jun 10, 2016
…-ide#3186

The original `@Slot()` decorator of `Editor.new(self, fname, ...)` ignores the
`fname` argument which is passed in when creating a new module with a given
name (e.g., through context menu "New -> Module..." in Project explorer).
The correct decorator should be `@Slot(str)`, which can also be ignored
completely since a Qt Signal can connect to a plain Python callable.
@ccordoba12 ccordoba12 modified the milestones: v3.0beta4, v3.0rc1 Jun 18, 2016
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

4 participants