msrest
AutoRest swagger generator Python client runtime.
Downloads: 0 (30 days)
Description
AutoRest: Python Client Runtime
===============================
.. image:: https://travis-ci.org/Azure/msrest-for-python.svg?branch=master
:target: https://travis-ci.org/Azure/msrest-for-python
.. image:: https://codecov.io/gh/azure/msrest-for-python/branch/master/graph/badge.svg
:target: https://codecov.io/gh/azure/msrest-for-python
Installation
------------
To install:
.. code-block:: bash
$ pip install msrest
Release History
---------------
2022-06-10 Version 0.7.1
+++++++++++++++++++++++++
**Bugfixes**
- Declare correctly msrest as Python 3.6 and more only for clarity #251
2022-06-07 Version 0.7.0
+++++++++++++++++++++++++
**Features**
- Add `azure-core` as installation requirement #247
- Replace `SerializationError` and `DeserializationError` in `msrest.exceptions` with those in `azure.core` #247
**Bugfixes**
- Typing annotation in LROPoller (thanks to akx) #242
Thanks to kianmeng for typo fixes in the documentation.
2021-01-26 Version 0.6.21
+++++++++++++++++++++++++
**Bug Fixes**
- Fixes `failsafe_deserialize` introduced in `0.6.20` #232
2021-01-25 Version 0.6.20
+++++++++++++++++++++++++
**Features**
- Add `failsafe_deserialize` method to the `Deserializer` object. #232
- Serialize `datetime`, `date`, `time`, `timedelta` and `Decimal` correctly when serializing `object` . #224
2020-09-08 Version 0.6.19
+++++++++++++++++++++++++
**Bugfixes**
- Fix serialization of random Model object #220
- Fix serialization of unicode string in Py2 and object mode #221
2020-07-27 Version 0.6.18
+++++++++++++++++++++++++
**Features**
- Add support for attributes/text in the same XML node #218
2020-06-25 Version 0.6.17
+++++++++++++++++++++++++
**Bugfixes**
- Fix XML and discriminator #214
2020-06-09 Version 0.6.16
+++++++++++++++++++++++++
**Bugfixes**
- Fix XML parsing with namespaces and attributes #209
**Features**
- Add py.typed for mypy support
2020-06-04 Version 0.6.15
+++++++++++++++++++++++++
**Bugfixes**
- Fix RFC regression introduced in 0.6.14 (RFC parse date are no longer pickable) #208
- Fix XML parsing with namespaces #206
Thanks to ivanst0 for the contribution
2020-05-18 Version 0.6.14
+++++++++++++++++++++++++
**Bugfixes**
- Fix "from_dict" in some complex flattening scenario #204
- Fix RFC date parsing if machine locale is not English #201
2020-04-07 Version 0.6.13
+++++++++++++++++++++++++
**Bugfixes**
- Fix deserializer and flattening if intermediate node is None #198
- Fix validation exception message for minimum/maximum checks #199
2020-04-06 Version 0.6.12
+++++++++++++++++++++++++
**Features**
- Add "time" serializer/deserializer #196
2020-01-30 Version 0.6.11
+++++++++++++++++++++++++
**Features**
- XML mode can now be enabled even if the given Model has no XML metadata #184
- Add Kerberos Authentication #186
- Improve error message if expected type is dictionary and something else is provided #188
**Bugfixes**
- Fix comma separated serialization of array in query #186
- Fix validation of basic types in some complex scenario #189
Thanks to catatonicprime for the contribution
2019-09-04 Version 0.6.10
+++++++++++++++++++++++++
**Features**
- XML mode now supports OpenAPI additional properties # 174
**Bugfixes**
- Accept "is_xml" kwargs to force XML serialization #178
- Disable XML deserialization if received element is not an ElementTree #178
- A "null" enum deserialize as None, and not "None" anymore #173
- Fix some UTF8 encoding issue in Python 2.7 and XML mode #172
2019-07-24 Version 0.6.9
++++++++++++++++++++++++
**Features**
- Accept extensions of JSON mimetype as valid JSON #167
2019-06-24 Version 0.6.8
++++++++++++++++++++++++
**BugFixes**
- Impossible to serialize XML if model contains UTF8 characters on Python 2.7 #165
- Impossible to deserialize a HTTP response as XML if body contains UTF8 characters on Python 2.7 #165
- Loading a serialized configuration fails with NameError on NoOptionError #162
Thanks to cclauss for the contribution
2019-06-12 Version 0.6.7
++++++++++++++++++++++++
**Features**
- Add DomainCredentials credentials for EventGrid
Thanks to kalyanaj for the contribution
2019-03-21 Version 0.6.6
++++++++++++++++++++++++
**Bugfixes**
- Make 0.6.x series compatible with pyinstaller again
- sdist now includes tests
Thanks to dotlambda for the contribution
2019-03-11 Version 0.6.5
++++++++++++++++++++++++
**Bugfixes**
- Fix list of integers serialization if div is provided #151
- Fix parsing of UTF8 with BOM #145
Thanks to eduardomourar for the contribution
2019-01-09 Version 0.6.4
++++++++++++++++++++++++
**Bugfixes**
- Fix regression on credentials configuration if used outside of Autorest scope #135
2019-01-08 Version 0.6.3
++++++++++++++++++++++++
**Features**
- Updated **experimental** async support. Requires Autorest.Python 4.0.64.
2018-11-19 Version 0.6.2
++++++++++++++++++++++++
**Bugfixes**
- Fix circular dependency in TYPE_CHECKING mode #128
2018-10-15 Version 0.6.1
++++++++++++++++++++++++
**Bugfixes**
- Remove unnecessary verbose "warnings" log #126
2018-10-02 Version 0.6.0
++++++++++++++++++++++++
**Features**
- The environment variable AZURE_HTTP_USER_AGENT, if present, is now injected part of the UserAgent
- New **preview** msrest.universal_http module. Provide tools to generic HTTP management (sync/async, requests/aiohttp, etc.)
- New **preview** msrest.pipeline implementation:
- A Pipeline is an ordered list of Policies than can process an HTTP request and response in a generic way.
- More details in the wiki page about Pipeline: https://github.com/Azure/msrest-for-python/wiki/msrest-0.6.0---Pipeline
- Adding new attributes to Configuration instance:
- http_logger_policy - Policy to handle HTTP logging
- user_agent_policy - Policy to handle UserAgent
- pipeline - The current pipeline used by the SDK client
- async_pipeline - The current async pipeline used by the async SDK client
- Installing "msrest[async]" now installs the **experimental** async support. Works ONLY for Autorest.Python 4.0.63.
**Breaking changes**
- The HTTPDriver API introduced in 0.5.0 has been replaced by the Pipeline implementation.
- The following classes have been moved from "msrest.pipeline" to "msrest.universal_http":
- ClientRedirectPolicy
- ClientProxies
- ClientConnection
- The following classes have been moved from "msrest.pipeline" to "msrest.universal_http.requests":
- ClientRetryPolicy
**Bugfixes**
- Fix "long" on Python 2 if used with the "object" type #121
Thanks to robgolding for the contribution
2018-09-04 Version 0.5.5
++++++++++++++++++++++++
**Bugfixes**
- Fix a serialization issue if additional_properties is declared, and "automatic model" syntax is used
("automatic model" being the ability to pass a dict to command and have the model auto-created) # 120
2018-07-12 Version 0.5.4
++++++++++++++++++++++++
**Features**
- Support additionalProperties and XML
**BugFixes**
- Better parse empty node and not string types
- Improve "object" XML parsing
2018-07-10 Version 0.5.3
++++++++++++++++++++++++
**BugFixes**
- Fix some XML serialization subtle scenarios
2018-07-09 Version 0.5.2
++++++++++++++++++++++++
**Features**
- deserialize/from_dict now accepts a content-type parameter to parse XML strings
**Bugfixes**
- Fix some complex XML Swagger definitions.
This release likely breaks already generated XML SDKs, that needs to be regenerated with autorest.python 3.0.58
2018-06-21 Version 0.5.1
++++++++++++++++++++++++
**Bugfixes**
- Lower Accept header overwrite logging message #110
- Fix 'object' type and XML format
Thanks to dharmab for the contribution
2018-06-12 Version 0.5.0
++++++++++++++++++++++++
**Disclaimer**
This released is designed to be backward compatible with 0.4.x, but there is too many internal refactoring
and new features to continue with 0.4.x versioning
**Features**
- Add XML support
- Add many type hints, and MyPY testing on CI.
- HTTP calls are made through a HTTPDriver API. Only implementation is `requests` for now. This driver API is *not* considered stable
and you should pin your msrest version if you want to provide a personal implementation.
**Bugfixes**
- Incorrect milliseconds serialization for some datetime object #94
**Deprecation**
That will trigger a DeprecationWarning if an old Autorest generated code is used.
- _client.add_header is deprecated, and config.headers should be used instead
- _client.send_formdata is deprecated, and _client.put/get/delete/post + _client.send should be used instead
2018-04-30 Version 0.4.29
+++++++++++++++++++++++++
**Bugfixes**
- Improve `SDKClient.__exit__` to take exc_details as optional parameters and not required #93
- refresh_session should also use the permanent HTTP session if available #91
2018-04-18 Version 0.4.28
+++++++++++++++++++++++++
**Features**
- msrest is now able to keep the "requests.Session" alive for performance. To activate this behavior:
- Use the final Client as a context manager (requires generation with Autorest.Python 3.0.50 at least)
- Use `client.config.keep_alive = True` and `client.close()` (requires generation with Autorest.Python 3.0.50 at least)
- Use `client.config.keep_alive = True` and client._client.close() (not recommended, but available in old releases of SDK)
- All Authentication classes now define `signed_session` and `refresh_session` with an optional `session` parameter.
To take benefits of the session improvement, a subclass of Authentication *MUST* add this optional parameter
and use it if it's not `None`:
def signed_session(self, session=None):
session = session or requests.Session()
# As usual from here.
2018-03-07 Version 0.4.27
+++++++++++++++++++++++++
**Features**
- Disable HTTP log by default (security), add `enable_http_log` to restore it #86
**BugFixes**
- Fix incorrect date parsing if ms precision is over 6 di