msrest-for-python
msrest-for-python copied to clipboard
The runtime library "msrest" for AutoRest generated Python clients.
This `assert` follows a `return`, so it's trivially unreachable: https://github.com/Azure/msrest-for-python/blob/8896f85c559786213e7f7f4438cce20ab60b820c/tests/asynctests/test_universal_http.py#L84-L85
https://github.com/Azure/msrest-for-python/blob/98e2ebe7e5ed8a656f333963339ad8d20fc330d3/msrest/serialization.py#L319 To avoid: https://github.com/Azure/azure-sdk-for-python/pull/14344/files#r501379989
See https://github.com/Azure/autorest.python/issues/718 and https://github.com/OAI/OpenAPI-Specification/issues/630#issuecomment-350680346
Right now, attribute_map is using a regular dict, which means items are ordered starting CPython 3.6 (or Python 3.7), but before that they are not. This is not a concern...
Example: ```python from enum import Enum from msrest.serialization import Model class A(Enum): b = "b" class C(Model): _attribute_map = {"a": {"key": "a", "type": "A"}} assert C(a=A.b).validate() == [] assert C(a="d").validate()...
To build the additional properties set, we need to know what was consumed by the extractors to build the final object. What was NOT consumed, will go to the additional...
We cannot model it in Python and the datetime native object (and we won't use numpy just for that with datetime64). Problem is mostly on deserialization, that will truncate the...
https://en.wikipedia.org/wiki/ISO_8601#Time_intervals See also https://github.com/Azure/azure-sdk-for-python/pull/2557#issuecomment-392217652
Currently defined in Ansible: ```python # Quick 'n dirty hash impl suitable for monkeypatching onto SDK model objects (so we can use set comparisons) def gethash(self): if not getattr(self, '_cachedhash',...
Following discussion with @zooba about [isodate](https://github.com/gweis/isodate): - Isodate is not maintained anymore for 2 years. Direct Gmail email to the author get no answer as well. - Isodate still uses...