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

[Service Bus] Hide encoding and dead_letter_* from Peeked Message #14733

Merged
merged 7 commits into from
Oct 29, 2020

Conversation

rakshith91
Copy link
Contributor

@rakshith91 rakshith91 commented Oct 23, 2020

Fixes #14641
Fixes #14640

@@ -84,7 +84,6 @@ class Message(object): # pylint: disable=too-many-public-methods,too-many-insta
:keyword str to: The `to` address used for auto_forward chaining scenarios.
:keyword str reply_to: The address of an entity to send replies to.
:keyword str reply_to_session_id: The session identifier augmenting the `reply_to` address.
:keyword str encoding: The encoding for string data. Default is UTF-8.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm inclining towards just stopping to document the encoding keyword since we just want to hide it for now - thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

good to me

Choose a reason for hiding this comment

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

Seconded.

@@ -28,11 +28,11 @@


class BaseSession(object):
def __init__(self, session_id, receiver, encoding="UTF-8"):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

would LOVE to change this to keyword only instead

Copy link
Contributor

@yunhaoling yunhaoling Oct 23, 2020

Choose a reason for hiding this comment

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

I don't have a strong preference here, either works for me as session is something that user shouldn't create by themselves, and we don't document it.

Choose a reason for hiding this comment

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

I'm inclined not to because of what Adam said. Kwarg hiding is workable for public surface areas, but still suboptimal there, and in a way that I'm nervous to expose us to internally: namely, you don't notice typod arguments any more.

Let me know if this isn't a convincing argument and I can try harder, don't want to come in and flip the table :P

@rakshith91 rakshith91 changed the title [Service Bus] Hide encoding [Service Bus] Hide encoding and dead_letter_* from Peeked Message Oct 24, 2020
@ramya-rao-a
Copy link
Contributor

@rakshith91 Can you please resolve the merge conflicts in this PR? I think that is the last thing needed for Kieran and Adam to approve the PR

@@ -652,7 +651,7 @@ def dead_letter_reason(self):
return None

@property
def dead_letter_source(self):
def _dead_letter_source(self):
Copy link
Contributor

@yunhaoling yunhaoling Oct 29, 2020

Choose a reason for hiding this comment

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

sorry for not pointing out earlier,
these three shall be moved from PeekedMessage to ReceivedMessage as dead_letter_* should be still available on ReceivedMessage.

Copy link
Contributor

@yunhaoling yunhaoling Oct 29, 2020

Choose a reason for hiding this comment

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

@rakshith91 , actually I think you could just revert the change, as my settlement move PR will completely remove the PeekedMessage class #14681

Copy link
Contributor

@yunhaoling yunhaoling left a comment

Choose a reason for hiding this comment

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

LGTM

@rakshith91 rakshith91 merged commit 5133d08 into Azure:master Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Service Bus] Hide encoding [Service Bus] Remove dead letter info from PeekedMessage
4 participants