Skip to content
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

Bitbucket OAuth. Resolve #201. #280

Merged

Conversation

ryneeverett
Copy link
Collaborator

@ryneeverett ryneeverett force-pushed the bitbucket-oauth2 branch 3 times, most recently from 6d88bae to 84ca895 Compare February 18, 2016 17:46
return None


def set(key, value):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a lockfile around this? The w+ flag gives me the race-condition heebie-jeebies.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good catch.

@ralphbean
Copy link
Collaborator

The oauth bits look fine to me. Can you look at the lockfile question above and rebase on develop?

@ryneeverett ryneeverett force-pushed the bitbucket-oauth2 branch 4 times, most recently from 1c09721 to 43a827c Compare March 4, 2016 22:16
@ryneeverett
Copy link
Collaborator Author

I still gotta look at the lockfile issue.

FYI, I tested out using dbm as a key/value store since we wouldn't have to repetitiously serialize, deserialize and overwrite the whole file. It's beautifully simple, but on some systems it creates additional .dir and .pag files and that doesn't seem acceptable.

@ryneeverett
Copy link
Collaborator Author

FYI, I did add a lockfile.

@ralphbean
Copy link
Collaborator

Oh, I'd missed it. 👍 here. Feel free to merge. 🍡

- Implement OAuth2. Thanks to @ibuchanan for helping me navigate
  bitbucket's idiosyncratic implementation.
- Add a bugwarrior.data file to the ~/.task directory, per [taskwarrior's
  third-party guidelines](https://taskwarrior.org/docs/3rd-party.html#guidelines).
- Use lockfile for writes.
- Use 'r+' rather than 'rw'. (The latter raises an exception in
  python 3).
- Catch ValueError if data file isn't JSON.
- Add `get_data_path` helper function.
ryneeverett added a commit that referenced this pull request Mar 10, 2016
@ryneeverett ryneeverett merged commit 9f03f4c into GothenburgBitFactory:develop Mar 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants