Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Create command to enable pydevd to send data using http-procotol instead of by line with urllib quoting. #764

Merged
merged 2 commits into from
Aug 28, 2018

Conversation

fabioz
Copy link
Contributor

@fabioz fabioz commented Aug 21, 2018

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 for ptvsd).

@codecov-io
Copy link

codecov-io commented Aug 27, 2018

Codecov Report

Merging #764 into master will decrease coverage by 0.13%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
ptvsd/wrapper.py 51.9% <100%> (-0.31%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c84e72b...c3745f9. Read the comment docs.

else:
time.sleep(.01)
cmd = self.cmdQueue.get(0)
cmd = self.cmdQueue.get(1, 0.1)
Copy link
Contributor

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?

Copy link
Member

@karthiknadig karthiknadig Aug 27, 2018

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

Copy link
Contributor Author

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)
Copy link
Contributor

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?

Copy link
Contributor

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@karthiknadig karthiknadig merged commit 2e78687 into microsoft:master Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants