You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by jeking3 <gi...@git.apache.org> on 2017/10/25 13:57:47 UTC
[GitHub] thrift pull request #1399: THRIFT-4370: build generated code before running ...
GitHub user jeking3 opened a pull request:
https://github.com/apache/thrift/pull/1399
THRIFT-4370: build generated code before running static code analysis…
… - fix E722 flake8 issues identified in python code
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jeking3/thrift THRIFT-4370
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1399.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1399
----
commit 85d94cce732f289d596b98c76042f1caae17d269
Author: James E. King, III <jk...@apache.org>
Date: 2017-10-25T13:57:18Z
THRIFT-4370: build generated code before running static code analysis - fix E722 flake8 issues identified in python code
----
---
[GitHub] thrift pull request #1399: THRIFT-4370: build generated code before running ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/thrift/pull/1399
---
[GitHub] thrift pull request #1399: THRIFT-4370: build generated code before running ...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1399#discussion_r147157619
--- Diff: lib/py/setup.py ---
@@ -22,7 +22,7 @@
import sys
try:
from setuptools import setup, Extension
-except:
+except Exception:
--- End diff --
I have to resubmit anyway to kick off another PR build, but I'd like to leave it as I changed it for now, and it can be improved later through a subsequent PR. I was just trying to eliminate those pesky E722 errors in flake8. There are a lot more issues in generated code that flake8 pulls out.
---
[GitHub] thrift pull request #1399: THRIFT-4370: build generated code before running ...
Posted by RobberPhex <gi...@git.apache.org>.
Github user RobberPhex commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1399#discussion_r147048687
--- Diff: lib/py/setup.py ---
@@ -22,7 +22,7 @@
import sys
try:
from setuptools import setup, Extension
-except:
+except Exception:
--- End diff --
I think we should use distutils.core, and setuptools is feedback,
And we should only process ImportError.
```py
try:
from distutils.core import setup, Extension
except ImportError:
from setuptools import setup, Extension
```
---