-
Notifications
You must be signed in to change notification settings - Fork 33
update to python3 and googleauth libraries #40
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
base: master
Are you sure you want to change the base?
Conversation
- upgraded oauth to use google_auth (oauth2client has been deprecated)
- upgraded to absl flags (python-gflags was deprecated
added setup.py for installation (python setup.py install)
added .devcontainer for vscode remote container development
added some convenience files
.pylintrc - to get pylance to stop giving me dumb warnings
.gitignore - to ignore build files
|
thanks for writing tasky, it has been useful for me. i forked it and updated it to use python3, and the recommended google oauth libraries. thought i would contribute it back if it is useful for you... cheers,
|
jrupac
left a comment
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.
Thanks a lot for this rewrite! This looks great!
I had added a couple of py3-specific branches a long time ago but never fully finished it up. By now, it makes sense to just have the main branch be py3 anyway.
I just had a few small comments below.
In addition, could you also update the README to mention Python 3 instead of 2.7?
| [console_scripts] | ||
| tasky=tasky.__main__:main | ||
| ''', | ||
| author="someone", |
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.
It's probably fine to leave out author and author_email (lower down) since many have contributed to this over time.
| TASKY_DIR = os.path.join(os.environ['HOME'], '.tasky') | ||
| KEYS_FILE = os.path.join(TASKY_DIR, 'client_id.json') | ||
| TOKEN_FILE = os.path.join(TASKY_DIR, 'user_token.json') | ||
| SCOPES = ['https://www.googleapis.com/auth/tasks'] |
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.
Since SCOPES is used in multiple files, maybe it's better to have one place where it's defined and referenced throughout?
| HERE = pathlib.Path(__file__).parent | ||
|
|
||
| # The text of the README file | ||
| README = (HERE / "README.md").read_text() |
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.
Use path.join here.
| # Ensure that stdout is written as utf-8. | ||
| writer = codecs.getwriter('utf-8') | ||
| sys.stdout = writer(sys.stdout) | ||
| # writer = codecs.getwriter('utf-8') |
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 this not needed anymore? If it still is, I guess there's a py3 idiom for it: https://stackoverflow.com/Questions/4374455/how-to-set-sys-stdout-encoding-in-python-3
| A Google Tasks command line interface. | ||
| """ | ||
|
|
||
| __author__ = 'Ajay Roopakalu (https://github.com/jrupac/tasky)' |
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.
Let's just drop this line since it's not there in the other files either.
No description provided.