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

Fixing subprocess issue in Python 3.6+ #13

Merged
merged 1 commit into from
Jun 27, 2018
Merged

Fixing subprocess issue in Python 3.6+ #13

merged 1 commit into from
Jun 27, 2018

Conversation

theunraveler
Copy link
Contributor

This fixes the issue detailed in #12. I don't know if using a private attribute of the Django's OutputWrapper class is the best approach, but I don't really see any other way of doing it at the moment.

Closes #12

@beaugunderson
Copy link
Owner

I also checked whether there was a better solution and there doesn't seem to be. If we used e.g. subprocess.STDOUT then we'd lose the ability for the runner of the command to redirect stdout somewhere else, e.g. with call_command(stdout=somewhere_else).

It also seems like _out exists in very old versions of Django, so we should be safe here.

And for completeness, I'll also link to this related Stack Overflow question.

@beaugunderson beaugunderson merged commit 230a2e9 into beaugunderson:master Jun 27, 2018
@beaugunderson
Copy link
Owner

and thank you for the PR, and sorry for the delay!

@beaugunderson
Copy link
Owner

released in 4.0.0.

@theunraveler
Copy link
Contributor Author

Thanks :-)

@theunraveler theunraveler deleted the fileno_fix branch June 27, 2018 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3: Error in invoking subprocess.Popen with stream wrapper
2 participants