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

Allow getting a new client with a context.Context #8

Merged
merged 1 commit into from
Mar 6, 2018

Conversation

ernesto-jimenez
Copy link

@ernesto-jimenez ernesto-jimenez commented Jan 30, 2018

Context is great to allow for cancellation of requests.

With this change it will be possible to get a new client which will set
a different context for all its requests.

This solution is backwards-compatible. However, since this package
always embeds itself to provide methods like *Board.GetLists(). The
current solution could lead to memory leaks or using old contexts if the
user is holding the responses in memory.

Context is great to allow for cancellation of requests.

With this change it will be possible to get a new client which will set
a different context for all it's requests.

This solution is backwards-compatible. However, since this package
always embeds itself to provide methods like *Board.GetLists(). The
current solution could lead to memory leaks or using old contexts if the
user is holding the responses in memory.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 70.072% when pulling 75f1ba3 on ernesto-jimenez:context-enabled into d2192fc on adlio:master.

1 similar comment
@coveralls
Copy link

coveralls commented Jan 30, 2018

Coverage Status

Coverage increased (+0.3%) to 70.072% when pulling 75f1ba3 on ernesto-jimenez:context-enabled into d2192fc on adlio:master.

@ernesto-jimenez
Copy link
Author

@adlio what is your plan to deprecate support for old Go versions?

It is possible to work around the current failure with some build tags. But I'm wondering whether it's worth it. The last three major versions have been out for over a year and a half.

@adlio
Copy link
Owner

adlio commented Jan 31, 2018

@ernesto-jimenez I'm fine with deprecating now, assuming we maintain backwards compatibility with the trello package API, which your change does. Want to update the PR with travis config changes?

I'm still considering the implications of client/context re-use.

@adlio adlio merged commit e72acf3 into adlio:master Mar 6, 2018
@ernesto-jimenez ernesto-jimenez deleted the context-enabled branch March 16, 2018 20:05
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.

None yet

3 participants