-
Notifications
You must be signed in to change notification settings - Fork 52
Syntax error: "except gflags_validators.Error, e:" line 1091 of gflags.py #20
Comments
Yep! Same error. Is there anyone paying attention to this? You posted the issue on July 31 and today it's October 12, 2015 so my guess is no. I think python-gflags is only for Python 2.7. I wonder if 2to3 would fix this? |
I am currently working on pushing a very new version of gflags here (at my free time, so don't expect it to happen very soon) which may or may not fix this problem (and I'm sure will introduce more problems). So yes - we are paying attention, but it does not make much sense to push a fix to version which is currently here. Please stay tuned. |
No worries. I did get it fixed on my end with a few simple changes between Python 2 and 3. Those changes can be found here if interested but nothing really interesting - changing print statements and error handling syntax. |
It is declares python2-only at the momens since there are still issues with python3 support. Related: - github pull request #22 - github pull request #26 - github pull request #29 - github issue #28 - github issue #20 Change on 2016/06/20 by vrusinov <[email protected]> ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125322335
@vrusinov, I recently noticed that python-gflags is the only Python package my team uses that doesn't support Python 3, so I am planning to migrate to argparse. I say this in the interest of transparency/providing anecdotal data as opposed to telling Google how it should prioritize support for its generous open-source contributions. (We do, all things being equal, prefer the distributed nature of gflags to the monolithic nature of argparse.) I am curious, given my plan, if there is an approximate ETA for Python 3 support in python-gflags available. I also noticed that Ubuntu maintains a Python 3 version of gflags in case that is of any help. |
Using There are some other existing Python 3 ports of gflags out there as you have noticed. My vision is for an gflags-like API, supporting Python 2.7 and 3.4+, that also synchronizes flags with C++ gflags when any extension modules are linked against C++ code using that. This might even be based on |
Thank you, @gpshead. Will switch over to |
We recommend |
Oh, gotcha. Thanks again. |
python-gflags users should migrate to absl-py: It is the modern version of this library. |
|
shouldn't it be the following?
The text was updated successfully, but these errors were encountered: