-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Leave Open] Fix metadata sorting issue #13753
Conversation
/azp run python - storage - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run python - storage - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run python - storage - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run python - storage - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run python - storage - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -30,7 +31,7 @@ | |||
|
|||
|
|||
logger = logging.getLogger(__name__) | |||
|
|||
locale.setlocale(locale.LC_COLLATE, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a global setting ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is. I've been looking into ways to create some form of a locale object to sort based on without having to set globally. So far, my findings have been: I can either run a child process and set the locale in it or set the locale right before my sort then undo it right after my sort (by resetting to the original locale).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should explore other ways to get sorting right. We shouldn't be setting globals like this as it may interfere with customers application.
I'm not sure if setting and unsetting is good option either. That might lead to race conditions if there's some parallel work being done meanwhile.
Hi @tasherif-msft. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Hi @tasherif-msft. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass. |
This PR resolves #10277
Currently the server side is sorting header metadata using conventional alphabetical ordering and its corresponding weights. In this PR the Python standard lib is used which should provide the necessary alphabetical ordering (very closely matches the Unicode collation algorithm)