Uh oh!
There was an error while loading. Please reload this page.
Some fixes for Python 3 - #23669
Conversation
Trott
commented
Oct 16, 2018
The change to the one file in |
cclauss
commented
Oct 16, 2018
Done in openssl/openssl#7409 |
Uh oh!
There was an error while loading. Please reload this page.
silverwind
commented
Oct 16, 2018
Generally LGTM, but isn't |
refack
commented
Oct 16, 2018
The popular linter these days is |
cclauss
commented
Oct 17, 2018
@silverwind PyLint in its default configuration does not do very will on the following... importsysabc=collections.namedtuple("abc", "a b c") # Missing importhi=ur"hello"# Illegal in Python 3foriinxrange(2): # Illegal in Python 3long_i=long(i) # Illegal in Python 3printi# Illegal in Python 3ifisinstance(i, basestring): # Illegal in Python 3print(unicode(i)) # Illegal in Python 3reload(sys) # Illegal in Python 3sys.setdefaultencoding("utf-8") # Illegal in Python 3asyncdefasync_print(s): # Illegal in Python 2print(s, end=" ") # Illegal in Python 2 |
| cmd = ([os.path.abspath(os.path.join(THIS_DIR, FUZZER))] + sys.argv[2:] | ||
| + ["-artifact_prefix=" + corpora[1] + "/"] + corpora) | ||
| print" ".join(cmd) | ||
| print(" ".join(cmd)) |
There was a problem hiding this comment.
Merged in upstream in openssl/openssl#7409 but retained here because openssl in not pip installed but is vendored in.
Uh oh!
There was an error while loading. Please reload this page.
Yes, IIRC, pylint needs quite a bit of configuration to be useful. Anyways, I'd appreciate if you'd remove linter-specific comments, we can decide on a python linter later on, this PR should be about fixing compatibilty only, the lint result doesn't need to be 100% clean. |
| :license: BSD, see LICENSE for details. | ||
| """ | ||
| # flake8: noqa | ||
There was a problem hiding this comment.
suggesting to drop these based on my earlier comment.
There was a problem hiding this comment.
+1
It's also excluded from new lint-py target:
https://github.com/nodejs/node/blob/4458162cfaf8c1eed987323fbb21c86783a8e914/Makefile#L1221-L1223
refack
commented
Nov 19, 2018
@cclauss do you mind if I close this issue as |
Python 3 compatibility fixes as discussed in #23659 (comment)
These changes get the test scores equivalent on the following two tests.
E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety.
namenamein__all__@refack@eirnym