-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement a new Async Server approach based on pyzmq to get completions on the Editor #3049
Conversation
@blink1073, thanks a lot for working on this. I'd like to know what you mean by
What's left to be done to solve that issue? Also, please add |
@ccordoba12, I'll close the other issue with this and make a new one specific to analysis tasks for clarity. |
Ok, nice! Please remember that this PR also fixes #3041 :-) |
@ccordoba12, done on all counts. |
# Set up the heartbeat timer. | ||
self.timer = QTimer(self) | ||
self.timer.timeout.connect(self._heartbeat) | ||
self.timer.start(HEATBEAT) |
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.
heatbeat? is that a new ryrthm?
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.
I verified this works on Windows 7. |
@@ -139,17 +139,18 @@ a Python version greater than 2.7 (Python 3.2 is not supported anymore). | |||
* **Python** 2.7 or 3.3+ | |||
* **PyQt5** 5.2+ or **PyQt4** 4.6+: PyQt5 is recommended. | |||
* **qtconsole**: Enhanced Python interpreter. | |||
* **Rope** and **Jedi**: Editor code completion, calltips | |||
* **Rope** and **Jedi**: Editor code completion, calltips. |
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.
There's no need to put a dot at the end here. Please notice that the text continues in the next line :-)
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.
Fixed.
This is working very nice, thanks @blink1073! I'm just getting this error in the internal console after a completion request is performed and succeeds: Traceback (most recent call last):
File "/home/carlos/miniconda/envs/test-async/lib/python2.7/site-packages/spyderlib/utils/introspection/manager.py", line 125, in handle_response
self._finalize(response)
File "/home/carlos/miniconda/envs/test-async/lib/python2.7/site-packages/spyderlib/utils/introspection/manager.py", line 137, in _finalize
% (self.info.name, response['name'],
AttributeError: 'NoneType' object has no attribute 'name' This happens on Linux, with PyQ4 and PyQt5, and Python 2.7 |
Does the latest push address the error? |
Yes, it does. But now there's a problem when I start Spyder with Could you verify it in your side? |
Couldn't verify, but tried another fix, care to try again? |
Thanks, your last commit fixes the freeze I was seeing. So, as soon as Travis and AppVeyor are green, I'll merge ;-) |
Implement a new Async Server approach based on pyzmq to get completions on the Editor
Implements streamlined async server for introspection, fixes #3033, fixes #3041.
Uses a single port for communication that is managed by zmq.
Uses socket notification rather than a thread in the client.
Adds a heartbeat to keep the server alive.
The main classes will be moved elsewhere and used for code analysis background tasks after beta3.