Repository navigation
Apply code upgrades for python >= 3.7 - #9401
Conversation
|
We've already dropped support for Python 3.6 :-) |
Oh! Should I go ahead and implement all the TODOs then? |
|
I would very much welcome that :-) |
|
I don't really understand what is going wrong with the |
That "error" is safe to ignore. Sorry :/ Maybe we can turn off |
GMNGeoffrey
left a comment
There was a problem hiding this comment.
Nice, thank you. Please fix the PR description before merging and merge with a squash commit with title and description matching that of the PR, per https://github.com/google/iree/blob/main/CONTRIBUTING.md
| process = subprocess.run(command_line, capture_output=True, **run_args) | ||
| if process.returncode != 0: | ||
| raise CompilerToolError(process) | ||
| # Emit stderr contents. |
There was a problem hiding this comment.
I guess Stella is doing something more complicated than just printing directly to stderr here, though I'm still a little skeptical that this couldn't use the default behavior.
Hmmm it seems like that should actually be really easy to do: https://github.com/google/iree/blob/427a94a09be70631c5d9f89d12616bb7f1954257/build_tools/pytype/check_diff.sh#L56 @ramiro050 can you try editing that line in this PR so we can test if it makes the error go away (we can actually make the change in a separate PR, since it's not really releated) |
bdea0ce to
29286dc
Compare
I tried adding |
|
It seems we are not alone in this problem: google/pytype#198. And it's a ninja flag, not a pytype flag. |
|
To be clear, this is not a problem you need to solve for this PR and you can merge past the pytype errors. Although looking at the build failures you're getting, this could be something that would've been caught by pytype. |
3e3efb2 to
cdaf90c
Compare
1b4ae38 to
7578c15
Compare
This commit upgrades the python scripts to use the following features supported since python 3.7: - postponed type annotations - `dataclass` - `capture_output=` and `text=` in some `subprocess` functions This closes iree-org#4131
7578c15 to
5654287
Compare
This commit upgrades the python scripts to use the following features
supported since python 3.7:
dataclasscapture_output=andtext=in somesubprocessfunctionsThis closes #4131