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

Fix fdopen RuntimeWarning in 3.8 #2146

Merged
merged 1 commit into from Oct 30, 2019
Merged

Fix fdopen RuntimeWarning in 3.8 #2146

merged 1 commit into from Oct 30, 2019

Conversation

junnplus
Copy link
Contributor

Fix #2091

@junnplus junnplus changed the title Fix RuntimeWarning in 3.8 for fdopen Fix fdopen RuntimeWarning in 3.8 Oct 29, 2019
@@ -32,7 +32,7 @@ def __init__(self, cfg):
try:
if not IS_CYGWIN:
util.unlink(name)
self._tmp = os.fdopen(fd, 'w+b', 1)
self._tmp = os.fdopen(fd, 'w+b', 0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice to add a comment to explain why we pass 0 here as explained in #2091 (comment).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you for you suggestion, i try to add a comment for explain

@saru2020
Copy link

saru2020 commented Mar 13, 2021

In my case, the ports were used and it worked after killing the process running on the port.

Command to kill the process running on the port:
sudo lsof -t -i tcp:12000 -s tcp:listen | sudo xargs kill

[Replace the port number with the one from the error]

flavio-fernandes added a commit to flavio-fernandes/mqtt2cmd that referenced this pull request May 15, 2022
ref: benoitc/gunicorn#2146

/usr/lib/python3.9/subprocess.py:941: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, 'rb', bufsize)
@jalsaman
Copy link

jalsaman commented Jan 15, 2023

Hi All,

I am trying to run autopkg and my process if getting stuck at this prompt. /Library/AutoPkg/Python3/Python.framework/Versions/3.10/lib/python3.10/subprocess.py:959: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, 'rb', bufsize)
/Library/AutoPkg/Python3/Python.framework/Versions/3.10/lib/python3.10/subprocess.py:964: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stderr = io.open(errread, 'rb', bufsize)

There is no error but the process isn't completed at all.

My Primary command was

autopkg run -v Firefox.munki -k MUNKI_REPO_PLUGIN="SimpleMDMRepo" -k MUNKI_REPO="" -k extract_icon=True

Screenshot 2023-01-15 at 16 26 35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants