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

azure.storage.QueueMessage considered harmful #156

Closed
saschagottfried opened this issue May 28, 2014 · 1 comment
Closed

azure.storage.QueueMessage considered harmful #156

saschagottfried opened this issue May 28, 2014 · 1 comment
Labels
Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@saschagottfried
Copy link
Contributor

This week I wrote code addressing Azure Storage Blobs, Tables and Queues. Great stuff. Since I ran into errors while removing message that were dequeued more often than my limit, I looked into the details of azure.storage.QueueMessage. The implementation was surprising me...

azure.storage.QueueMessage is just a bunch of strings. I was really surprised that this class (obviously nothing more than a Data Transfer Object) ships with an SDK that is marked as 'production/stable/ on PyPI.

class QueueMessage(WindowsAzureData):

''' Queue message class. '''

def __init__(self):
    self.message_id = u''
    self.insertion_time = u''
    self.expiration_time = u''
    self.pop_receipt = u''
    self.time_next_visible = u''
    self.dequeue_count = u''
    self.message_text = u''

I would expect members having names containing 'time' to have type DateTime and members having names indicating an integer (dequeue_count) to be an Integer. Instances of this class are just prone to error. That's what happened to me.

Focused Python developers may expect a standard-level pythonic API coming from Microsoft that of course will hide transport implementations details as well that are discussed in this issue [https://github.com//issues/150].

Can anybody comment this or explain why it is like that or even has to be like that? Any suggestions how to contribute on that important topic without breaking APIs are welcome.

@crwilcox
Copy link
Contributor

Issue Migrated to Azure/azure-storage-python#16

AutorestCI added a commit that referenced this issue Feb 6, 2018
Add CAA record support to DNS swagger #156
@bsiegel bsiegel added the Service Attention Workflow: This issue is responsible by Azure service team. label Sep 26, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

4 participants