-
Notifications
You must be signed in to change notification settings - Fork 916
using async in names is deprecated on python 3.6 #21
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
Conversation
It looks like @johnnoone hasn't signed our Contributor License Agreement, yet. Appreciation of efforts, clabot |
@johnnoone Good catch, we would like to avoid abusing the keyword if possible. @edenhill I think the main concern here is probably compatibility. Are we comfortable breaking the existing API given how new this is? Or should we make the patch support both |
This is still a young project so I vote for not being backwards compatible, let's go with asynchronous in the next release. Is asynchronous user friendly enough, or should it be something easier to spell, like do_async? |
@edenhill Doesn't look like the PEP suggests a specific alternative. Maybe check a couple of other libraries that have async options to see if there is a de facto standard? |
Sort of missed the train with this one, so we'll add
|
I think it's time to implement this now, since async has started to error on Python 3.7 nightly:
Renaming async to asynchronous sounds like a decent solution. |
@ah- I think we should provide an "async" alias for <Py3.7 for a while to not break existing applications. What do you think? We have an upcoming 1.0.0 release bump coming up in a couple of months at which time we can break the API. |
Yes, keeping backwards compatibility would be great. Looking at https://github.com/confluentinc/confluent-kafka-python/blob/master/confluent_kafka/src/Consumer.c#L378 it should be as trivial as adding "asynchronous" to the list of kwargs and then having We can probably even keep the old |
Something like this ought to do it (not very pretty though!): def foo(..., asynchronous=None, **kwargs):
asynch = asynchronous or kwargs.get('async') |
@Renstrom That will allow any (unknown) kw arg to be set though. Say Hi to Löfling from me :) A PR is on the way. |
Updated PR in #319 |
…319) Thanks to @johnnoone for the initial PR
No description provided.