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
Add support for Python3.8 #6439
Conversation
* fixing some broken tests for python 3.8 * fix test for AST replacement * fixing missing error msg in server Co-authored-by: James <james@conan.io>
Rationale for 3452db2: lutris/lutris#2518
|
|
||
def _execute(command): | ||
proc = Popen(command, shell=True, bufsize=1, stdout=PIPE, stderr=STDOUT) | ||
# In Python 3.8, open() emits RuntimeWarning if buffering=1 for binary mode. | ||
bufsize = -1 if isPY38 else 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.
The solution adopted in develop is:
proc = subprocess.Popen(command, shell=True, bufsize=1, universal_newlines=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
Maybe use it instead of bufsize?
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.
Oh, I didn't see the above. No problem.
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 saw it in develop
, but it is the same line with a bufsize=1
and I don't know why that one is not failing... so it should be the place where we are running this function from.
The only thing different is the universal_newlines
, but I wouldn't expect it to make a difference related to the buffering
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 the universal_newlines=True,
that fixes it
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.
IMO, this is a patch affecting only py38
(which is not officially supported for v1.21.x), it let us pass the testsuite without modifying our CI. We may investigate it to find the difference between this branch and develop
, but to be honest, we have come across this because of this patch release, otherwise we would have kept working without noticing it, and this change won't affect develop
...
Cherry-pick changesets:
Changelog: Bugfix: Fix broken compression of .tgz files due to Python 3.8 changing tar default schema.
Changelog: Fix: Recipe substitution for scm (old behavior) fixed for multiline comments in Python 3.8
Docs: omit
I omit the docs, with this release we don't want to remove python 3.8 warnings from the docs
#tags: slow, svn
#revisions: 1