Skip to content

Fix constructor doc (#321) #397

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

Merged
merged 2 commits into from
Jun 8, 2018
Merged

Fix constructor doc (#321) #397

merged 2 commits into from
Jun 8, 2018

Conversation

rnpridgeon
Copy link
Contributor

No description provided.

@rnpridgeon rnpridgeon requested a review from edenhill June 7, 2018 01:59
@rnpridgeon rnpridgeon changed the title Fix constructor doc (#231) Fix constructor doc (#321) Jun 7, 2018
Copy link
Contributor

@edenhill edenhill left a comment

Choose a reason for hiding this comment

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

The kwargs isn't very helpful without an explanation, so I suggest you remove them.

Also, add a param stanza for the config, saying something like: :param dict config: Configuration properties

@rnpridgeon
Copy link
Contributor Author

So silently accept kwargs then without advertising this capability in the docs? Is that the right move or perhaps a brief description linking the rdkafka configuration page

@edenhill
Copy link
Contributor

edenhill commented Jun 7, 2018

we should link to CONFIGURATION.md, but that is for the config dict.
The kwargs is really just an alternative to the dict, it takes the same keys (but none of the standard config properties will work since they contain dots . ).

You can do this:
p = Producer({"bootstrap.servers":"gnägg"}, logger=mylogger)
which is identical to:
p = Producer({"bootstrap.servers":"gnägg", "logger": mylogger})

so I don't think there is any need to expose kwargs.

@rnpridgeon
Copy link
Contributor Author

rnpridgeon commented Jun 7, 2018

To encourage good behavior perhaps its a good idea to expose kwargs referencing the configs specific to the python binding in the docs

default.topic.config as I understand it is on its way out anyway :)

@rnpridgeon
Copy link
Contributor Author

There are some extra formatting changes to appease the sphinx gods

Copy link
Contributor

@edenhill edenhill left a comment

Choose a reason for hiding this comment

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

LGTM

@rnpridgeon rnpridgeon changed the base branch from adminapi to master June 8, 2018 09:19
@rnpridgeon rnpridgeon merged commit 6e7a10b into confluentinc:master Jun 8, 2018
@jliunyu jliunyu mentioned this pull request Mar 4, 2022
2 tasks
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