-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
PR: Disable autosave if not running in single instance mode #9660
Conversation
To clarify, I am submitting a temporary fix so that the issue does not block the release of v4.0 beta 3. |
Don't be lazy, Jitse, just add a test! |
As I understand it, the test failures are due to on-going work on the Object Explorer and not related to this PR. |
Yes, that's right. I'm working right now to finish PR #8852 so our tests pass again. I'll let you know when that's done. |
6c7eb33
to
7062730
Compare
Hello @jitseniesen! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-06-25 13:51:04 UTC |
Please merge with master to get a new set of fixes for our tests. |
This is a temporary stop gap to work around bugs in the autosave system when multiple Spyder instances are running simultaneously (e.g., issue spyder-ide#9420). Once a more permanent fix is developed, this can be reverted.
7062730
to
b85d333
Compare
The test |
That's fine @jitseniesen, don't worry about it. Unfortunately those tests are very flaky. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @jitseniesen for your help with this one!
For what its worth, as I stated on #9420 ,
This would avoid completely silently and invisibly disabling the autosave safety net if and when a user had disabled single instance mode, as I normally always do. As a result of this PR, over the past month I've lost a total of several hours of work over the dozens of times when Spyder hangs seemingly at random every few hours. Until I realized it could not be mere bad luck not having autosaves and poured line by line through the verbose mode logs to figure out what was really the problem, I had no way of knowing why. There's no warning on startup, no warning when enabling or disabling single instance mode, no warning when enabling or disabling autosaves, autosaves still shows as enabled in the preferences, and nothing in the UI or tooltip text of either option to indicate this major and potentially crippling consequence. As a user, if I didn't already have it happen to me and lose work, know how to enable verbose logging and exactly what to look for it there, and then know how and where to search for this PR (i.e. if I wasn't part of the 0.1% of Spyder's userbase that was a contributor/developer), it would be essentially impossible to figure out why this was happening. This might be excusable if it was only in the Github builds for a short time, but this has made it into not one but two public betas so far. I know I don't have any credibility around here anymore, but if you can remember one thing from me, please try to carefully think through the UX implications of your changes. Whiz bang features may attract users initially, but its good UX that keeps them coming back over the long term. |
It is not only |
Betas are betas, i.e. they are not expected to be stable nor the final version. So I don't agree with making the extra effort of informing users that autosaving doesn't work with multiple instances when that's going to be fixed before the final release. |
Yes, of course, but the broader point is that silently and invisibly rendering autosave completely disabled without warning, notification or any indication whatsoever (even a still indicating it as enabled in preferences) is a much more impactful issue for the group of users without single instance mode enabled than any of the originals were. Those issues were a nuisance, while this one is a potential disaster. |
If the betas were only used by the very small population of contributors and developers capable of knowing all the above steps in order to figure out why autosave suddenly stopped working, as opposed to a much wider user population likely to be confused and frustrated by this inexplicable behavior, then they serve little purpose as those are the very users already (or at least capable of) running straight from a Github clone. However, the 27 629 total downloads of Spyder from the Furthermore, unless doing so would take more than a few hours to implement, it would already would have been worthwhile in terms of avoiding wasted time, effort and frustration this cost one single user (myself) out of at least thousands. It would take only a few minutes to at the very least tweak the UI text/tooltips of these options to reflect the change and mention something in the beta release notes, (although inexplicably there no longer appears to be any summary of the major changes in each beta), and I would be in bed asleep right now instead of still at the lab complaining about this to you. |
Compared to the ~200k from Anaconda + ~40K from PyPi downloads per month, that's certainly negligible. And I'm sorry if those users feel frustrated but that's the chance they take by using a beta. And again, betas are really for experimentation without disrupting our entire user base. So please don't insist on us working to make our betas production ready.
If you felt so concerned about this, I don't understand why you didn't take the time to add this yourself instead of asking us to do it. Final note: I'm locking this PR because it makes no sense to keep discussing about this. |
This is a temporary stop gap to work around bugs in the autosave system like #9420 when multiple Spyder instances are running simultaneously. Once a more permanent fix is developed, this can be reverted.
I did not include a test, because the code is already run by existing tests and it seems a bit too much effort to write a test for what is meant to be a temporary change,Issue(s) Resolved
This does not truly resolve the issue, so no "Fixes #..."
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: Jitse Niesen