[MRG] Fix <Name of a class impacts the value of its __metadata_request__* variables> #28431
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #28430
The bug was observed in 2 classes with the same implementation but different names. The first one was named
class_1, and the otherClass_1.It was observed that in the
_metadata_requestsfunctions, sorting was performed between dictionary keys. Considering that the defaultsorted()function follows ASCII order, where uppercase letters precede lowercase letters and underscores precede alphanumeric characters.It appears that the sorting order is affecting the final results of
._get_metadata_request().What does this implement/fix? Explain your changes.
Removed the sorting of the dictionary
defaultsin_metadata_requests.py.By sorting this dictionary, the
__metadata_request__*attributes were not the same as the child class but the same as the last class in the sorted dictionary.