-
Notifications
You must be signed in to change notification settings - Fork 68
Create command to enable pydevd to send data using http-procotol instead of by line with urllib quoting. #764
Conversation
…ead of by line with urllib quoting.
Codecov Report
@@ Coverage Diff @@
## master #764 +/- ##
==========================================
- Coverage 60.1% 59.97% -0.14%
==========================================
Files 27 27
Lines 3828 3840 +12
==========================================
+ Hits 2301 2303 +2
- Misses 1527 1537 +10
Continue to review full report at Codecov.
|
else: | ||
time.sleep(.01) | ||
cmd = self.cmdQueue.get(0) | ||
cmd = self.cmdQueue.get(1, 0.1) |
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.
Is this okay for upstream?
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.
It is already on upstream https://github.com/fabioz/PyDev.Debugger/blob/master/_pydevd_bundle/pydevd_comm.py#L458
@fabioz usually makes the changes upstream then ports them over here
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.
Yeap... that code was for some really old versions of Python (2.3 and before), so, now that the minimum is 2.6 it should be safe.
if isinstance(text, unicode): | ||
text = text.encode('utf-8') | ||
else: | ||
assert isinstance(text, str) |
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.
Looks like this assert should be outside of if
?
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.
Or rather there should be some assert in the above branch that does the equivalent check there (in case if
doesn't get triggered).
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.
Done.
This is the first step to support json messages (to later address #45).
Will pause working on that to address other issues but it'd be nice to have that already integrated.
Also, this fixes an issue where enabling debug info (with a
PYDEV_DEBUG=True
env var) triggered a recursion of debug messages when the output was redirected (which is always the case forptvsd
).