• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

msrest/H27-Jan-2021-6,3894,365

msrest.egg-info/H03-May-2022-771468

tests/H27-Jan-2021-8,3115,897

MANIFEST.inH A D27-Jan-202166 33

PKG-INFOH A D27-Jan-202126.2 KiB771468

README.rstH A D27-Jan-202119.5 KiB749447

setup.cfgH A D27-Jan-2021145 149

setup.pyH A D27-Jan-20212.7 KiB7042

README.rst

1AutoRest: Python Client Runtime
2===============================
3
4.. image:: https://travis-ci.org/Azure/msrest-for-python.svg?branch=master
5 :target: https://travis-ci.org/Azure/msrest-for-python
6
7.. image:: https://codecov.io/gh/azure/msrest-for-python/branch/master/graph/badge.svg
8 :target: https://codecov.io/gh/azure/msrest-for-python
9
10Installation
11------------
12
13To install:
14
15.. code-block:: bash
16
17    $ pip install msrest
18
19
20Release History
21---------------
22
232021-01-26 Version 0.6.21
24+++++++++++++++++++++++++
25
26**Bug Fixes**
27
28- Fixes `failsafe_deserialize` introduced in `0.6.20` #232
29
302021-01-25 Version 0.6.20
31+++++++++++++++++++++++++
32
33**Features**
34
35- Add `failsafe_deserialize` method to the `Deserializer` object. #232
36- Serialize `datetime`, `date`, `time`, `timedelta` and `Decimal` correctly when serializing `object` . #224
37
382020-09-08 Version 0.6.19
39+++++++++++++++++++++++++
40
41**Bugfixes**
42
43- Fix serialization of random Model object  #220
44- Fix serialization of unicode string in Py2 and object mode #221
45
46
472020-07-27 Version 0.6.18
48+++++++++++++++++++++++++
49
50**Features**
51
52- Add support for attributes/text in the same XML node  #218
53
54
552020-06-25 Version 0.6.17
56+++++++++++++++++++++++++
57
58**Bugfixes**
59
60- Fix XML and discriminator  #214
61
62
632020-06-09 Version 0.6.16
64+++++++++++++++++++++++++
65
66**Bugfixes**
67
68- Fix XML parsing with namespaces and attributes  #209
69
70**Features**
71
72- Add py.typed for mypy support
73
74
752020-06-04 Version 0.6.15
76+++++++++++++++++++++++++
77
78**Bugfixes**
79
80- Fix RFC regression introduced in 0.6.14 (RFC parse date are no longer pickable)  #208
81- Fix XML parsing with namespaces  #206
82
83Thanks to ivanst0 for the contribution
84
85
862020-05-18 Version 0.6.14
87+++++++++++++++++++++++++
88
89**Bugfixes**
90
91- Fix "from_dict" in some complex flattening scenario  #204
92- Fix RFC date parsing if machine locale is not English  #201
93
94
952020-04-07 Version 0.6.13
96+++++++++++++++++++++++++
97
98**Bugfixes**
99
100- Fix deserializer and flattening if intermediate node is None  #198
101- Fix validation exception message for minimum/maximum checks  #199
102
103
1042020-04-06 Version 0.6.12
105+++++++++++++++++++++++++
106
107**Features**
108
109- Add "time" serializer/deserializer  #196
110
1112020-01-30 Version 0.6.11
112+++++++++++++++++++++++++
113
114**Features**
115
116- XML mode can now be enabled even if the given Model has no XML metadata  #184
117- Add Kerberos Authentication  #186
118- Improve error message if expected type is dictionnary and something else is provided  #188
119
120**Bugfixes**
121
122- Fix comma separated serialization of array in query  #186
123- Fix validation of basic types in some complex scenario  #189
124
125Thanks to catatonicprime for the contribution
126
1272019-09-04 Version 0.6.10
128+++++++++++++++++++++++++
129
130**Features**
131
132- XML mode now supports OpenAPI additional properties  # 174
133
134**Bugfixes**
135
136- Accept "is_xml" kwargs to force XML serialization  #178
137- Disable XML deserialization if received element is not an ElementTree  #178
138- A "null" enum deserialize as None, and not "None" anymore  #173
139- Fix some UTF8 encoding issue in Python 2.7 and XML mode  #172
140
141
1422019-07-24 Version 0.6.9
143++++++++++++++++++++++++
144
145**Features**
146
147- Accept extensions of JSON mimetype as valid JSON  #167
148
1492019-06-24 Version 0.6.8
150++++++++++++++++++++++++
151
152**BugFixes**
153
154- Impossible to serialize XML if model contains UTF8 characters on Python 2.7  #165
155- Impossible to deserialize a HTTP response as XML if body contains UTF8 characters on Python 2.7  #165
156- Loading a serialized configuration fails with NameError on NoOptionError  #162
157
158Thanks to cclauss for the contribution
159
1602019-06-12 Version 0.6.7
161++++++++++++++++++++++++
162
163**Features**
164
165- Add DomainCredentials credentials for EventGrid
166
167Thanks to kalyanaj for the contribution
168
1692019-03-21 Version 0.6.6
170++++++++++++++++++++++++
171
172**Bugfixes**
173
174- Make 0.6.x series compatible with pyinstaller again
175- sdist now includes tests
176
177Thanks to dotlambda for the contribution
178
1792019-03-11 Version 0.6.5
180++++++++++++++++++++++++
181
182**Bugfixes**
183
184- Fix list of integers serialization if div is provided #151
185- Fix parsing of UTF8 with BOM #145
186
187Thanks to eduardomourar for the contribution
188
1892019-01-09 Version 0.6.4
190++++++++++++++++++++++++
191
192**Bugfixes**
193
194- Fix regression on credentials configuration if used outside of Autorest scope #135
195
1962019-01-08 Version 0.6.3
197++++++++++++++++++++++++
198
199**Features**
200
201- Updated **experimental** async support. Requires Autorest.Python 4.0.64.
202
2032018-11-19 Version 0.6.2
204++++++++++++++++++++++++
205
206**Bugfixes**
207
208- Fix circular dependency in TYPE_CHECKING mode #128
209
2102018-10-15 Version 0.6.1
211++++++++++++++++++++++++
212
213**Bugfixes**
214
215- Remove unecessary verbose "warnings" log #126
216
2172018-10-02 Version 0.6.0
218++++++++++++++++++++++++
219
220**Features**
221
222- The environment variable AZURE_HTTP_USER_AGENT, if present, is now injected part of the UserAgent
223- New **preview** msrest.universal_http module. Provide tools to generic HTTP management (sync/async, requests/aiohttp, etc.)
224- New **preview** msrest.pipeline implementation:
225
226  - A Pipeline is an ordered list of Policies than can process an HTTP request and response in a generic way.
227  - More details in the wiki page about Pipeline: https://github.com/Azure/msrest-for-python/wiki/msrest-0.6.0---Pipeline
228
229- Adding new attributes to Configuration instance:
230
231  - http_logger_policy - Policy to handle HTTP logging
232  - user_agent_policy - Policy to handle UserAgent
233  - pipeline - The current pipeline used by the SDK client
234  - async_pipeline - The current async pipeline used by the async SDK client
235
236- Installing "msrest[async]" now installs the **experimental** async support. Works ONLY for Autorest.Python 4.0.63.
237
238**Breaking changes**
239
240- The HTTPDriver API introduced in 0.5.0 has been replaced by the Pipeline implementation.
241
242- The following classes have been moved from "msrest.pipeline" to "msrest.universal_http":
243
244  - ClientRedirectPolicy
245  - ClientProxies
246  - ClientConnection
247
248- The following classes have been moved from "msrest.pipeline" to "msrest.universal_http.requests":
249
250  - ClientRetryPolicy
251
252**Bugfixes**
253
254- Fix "long" on Python 2 if used with the "object" type  #121
255
256Thanks to robgolding for the contribution
257
2582018-09-04 Version 0.5.5
259++++++++++++++++++++++++
260
261**Bugfixes**
262
263- Fix a serialization issue if additional_properties is declared, and "automatic model" syntax is used
264  ("automatic model" being the ability to pass a dict to command and have the model auto-created)  # 120
265
2662018-07-12 Version 0.5.4
267++++++++++++++++++++++++
268
269**Features**
270
271- Support additionalProperties and XML
272
273**BugFixes**
274
275- Better parse empty node and not string types
276- Improve "object" XML parsing
277
2782018-07-10 Version 0.5.3
279++++++++++++++++++++++++
280
281**BugFixes**
282
283- Fix some XML serialization subtle scenarios
284
2852018-07-09 Version 0.5.2
286++++++++++++++++++++++++
287
288**Features**
289
290- deserialize/from_dict now accepts a content-type parameter to parse XML strings
291
292**Bugfixes**
293
294- Fix some complex XML Swagger definitions.
295
296This release likely breaks already generated XML SDKs, that needs to be regenerated with autorest.python 3.0.58
297
2982018-06-21 Version 0.5.1
299++++++++++++++++++++++++
300
301**Bugfixes**
302
303- Lower Accept header overwrite logging message #110
304- Fix 'object' type and XML format
305
306Thanks to dharmab for the contribution
307
3082018-06-12 Version 0.5.0
309++++++++++++++++++++++++
310
311**Disclaimer**
312
313This released is designed to be backward compatible with 0.4.x, but there is too many internal refactoring
314and new features to continue with 0.4.x versionning
315
316**Features**
317
318- Add XML support
319- Add many type hints, and MyPY testing on CI.
320- HTTP calls are made through a HTTPDriver API. Only implementation is `requests` for now. This driver API is *not* considered stable
321  and you should pin your msrest version if you want to provide a personal implementation.
322
323**Bugfixes**
324
325- Incorrect milliseconds serialization for some datetime object #94
326
327**Deprecation**
328
329That will trigger a DeprecationWarning if an old Autorest generated code is used.
330
331- _client.add_header is deprecated, and config.headers should be used instead
332- _client.send_formdata is deprecated, and _client.put/get/delete/post + _client.send should be used instead
333
3342018-04-30 Version 0.4.29
335+++++++++++++++++++++++++
336
337**Bugfixes**
338
339- Improve `SDKClient.__exit__` to take exc_details as optional parameters and not required #93
340- refresh_session should also use the permanent HTTP session if available #91
341
3422018-04-18 Version 0.4.28
343+++++++++++++++++++++++++
344
345**Features**
346
347- msrest is now able to keep the "requests.Session" alive for performance. To activate this behavior:
348
349  - Use the final Client as a context manager (requires generation with Autorest.Python 3.0.50 at least)
350  - Use `client.config.keep_alive = True` and `client.close()` (requires generation with Autorest.Python 3.0.50 at least)
351  - Use `client.config.keep_alive = True` and client._client.close() (not recommended, but available in old releases of SDK)
352
353- All Authentication classes now define `signed_session` and `refresh_session` with an optional `session` parameter.
354  To take benefits of the session improvement, a subclass of Authentication *MUST* add this optional parameter
355  and use it if it's not `None`:
356
357     def signed_session(self, session=None):
358         session = session or requests.Session()
359
360         # As usual from here.
361
3622018-03-07 Version 0.4.27
363+++++++++++++++++++++++++
364
365**Features**
366
367- Disable HTTP log by default (security), add `enable_http_log` to restore it #86
368
369**BugFixes**
370
371- Fix incorrect date parsing if ms precision is over 6 digits #82
372
3732018-01-30 Version 0.4.26
374+++++++++++++++++++++++++
375
376**Features**
377
378- Add TopicCredentials for EventGrid client
379
380**Bugfixes**
381
382- Fix minimal dependency of isodate
383- Fix serialisation from dict if datetime provided
384
3852018-01-08 Version 0.4.25
386+++++++++++++++++++++++++
387
388**Features**
389
390- Add LROPoller class. This is a customizable LRO engine.
391  This is the poller engine of Autorest.Python 3.0, and is not used by code generated by previous Autorest version.
392
3932018-01-03 Version 0.4.24
394+++++++++++++++++++++++++
395
396**Bugfixes**
397
398- Date parsing is now compliant with Autorest / Swagger 2.0 specification (less lenient)
399
400**Internal optimisation**
401
402- Call that does not return a streamable object are now executed in requests stream mode False (was True whatever the type of the call).
403  This should reduce the number of leaked opened session and allow urllib3 to manage connection pooling more efficiently.
404  Only clients generated with Autorest.Python >= 2.1.31 (not impacted otherwise, fully backward compatible)
405
4062017-12-21 Version 0.4.23
407+++++++++++++++++++++++++
408
409**Bugfixes**
410
411- Accept to deserialize enum of different type if content string match #75
412- Stop failing on deserialization if enum string is unkwon. Return the string instead.
413
414**Features**
415
416- Model now accept kwargs in constructor for future kwargs models
417
4182017-12-15 Version 0.4.22
419+++++++++++++++++++++++++
420
421**Bugfixes**
422
423- Do not validate additional_properties #73
424- Improve validation error if expected type is dict, but actual type is not #73
425
4262017-12-14 Version 0.4.21
427+++++++++++++++++++++++++
428
429**Bugfixes**
430
431- Fix additional_properties if Swagger was flatten #72
432
4332017-12-13 Version 0.4.20
434+++++++++++++++++++++++++
435
436**Features**
437
438- Add support for additional_properties
439
440  - By default, all additional_properties are kept.
441  - Additional properties are sent to the server only if it was specified in the Swagger,
442    or if "enable_additional_properties_sending" is called on the model we want it.
443    This is a class method that enables it for all instance of this model.
444
4452017-11-20 Version 0.4.19
446+++++++++++++++++++++++++
447
448**Features**
449
450- The interpretation of Swagger 2.0 "discriminator" is now lenient. This means for these two scenarios:
451
452  - Discriminator value is missing from the received payload
453  - Discriminator value is not defined in the Swagger
454
455  Instead of failing with an exception, this now returns the base type for this "discriminator".
456
457  Note that this is not a contradiction of the Swagger 2.0 spec, that specifies
458  "validation SHOULD fail [...] there may exist valid reasons in particular circumstances to ignore a particular item,
459  but the full implications must be understood and carefully weighed before choosing a different course."
460
461  This cannot be configured for now and is the new default behvaior, but can be in the future if needed.
462
463**Bugfixes**
464
465- Optional formdata parameters were raising an exception (#65)
466- "application/x-www-form-urlencoded" form was sent using "multipart/form-data".
467  This causes problems if the server does not support "multipart/form-data" (#66)
468
4692017-10-26 Version 0.4.18
470+++++++++++++++++++++++++
471
472**Features**
473
474- Add ApiKeyCredentials class. This can be used to support OpenAPI ApiKey feature.
475- Add CognitiveServicesAuthentication class. Pre-declared ApiKeyCredentials class for Cognitive Services.
476
4772017-10-12 Version 0.4.17
478+++++++++++++++++++++++++
479
480**Features**
481
482This make Authentication classes more consistent:
483
484- OAuthTokenAuthentication is now a subclass of BasicTokenAuthentication (was Authentication)
485- BasicTokenAuthentication has now a "set_token" methods that does nothing.
486
487This allows test like "isintance(o, BasicTokenAuthentication)" to be guaranted that the following attributes exists:
488
489- token
490- set_token()
491- signed_session()
492
493This means for users of "msrestazure", that they are guaranted that all AD classes somehow inherits from "BasicTokenAuthentication"
494
4952017-10-05 Version 0.4.16
496+++++++++++++++++++++++++
497
498**Bugfixes**
499
500- Fix regression: accept "set<str>" as a valid "[str]" (#60)
501
5022017-09-28 Version 0.4.15
503+++++++++++++++++++++++++
504
505**Bugfixes**
506
507- Always log response body (#16)
508- Improved exception message if error JSON is Odata v4 (#55)
509- Refuse "str" as a valid "[str]" type (#41)
510- Better exception handling if input from server is not JSON valid
511
512**Features**
513
514- Add Configuration.session_configuration_callback to customize the requests.Session if necessary (#52)
515- Add a flag to Serializer to disable client-side-validation (#51)
516- Remove "import requests" from "exceptions.py" for apps that require fast loading time (#23)
517
518Thank you to jayden-at-arista for the contribution
519
5202017-08-23 Version 0.4.14
521+++++++++++++++++++++++++
522
523**Bugfixes**
524
525- Fix regression introduced in msrest 0.4.12 - dict syntax with enum modeled as string and enum used
526
5272017-08-22 Version 0.4.13
528+++++++++++++++++++++++++
529
530**Bugfixes**
531
532- Fix regression introduced in msrest 0.4.12 - dict syntax using isodate.Duration (#42)
533
5342017-08-21 Version 0.4.12
535+++++++++++++++++++++++++
536
537**Features**
538
539- Input is now more lenient
540- Model have a "validate" method to check content constraints
541- Model have now 4 new methods:
542
543  - "serialize" that gives the RestAPI that will be sent
544  - "as_dict" that returns a dict version of the Model. Callbacks are available.
545  - "deserialize" the parses the RestAPI JSON into a Model
546  - "from_dict" that parses several dict syntax into a Model. Callbacks are available.
547
548More details and examples in the Wiki article on Github:
549https://github.com/Azure/msrest-for-python/wiki/msrest-0.4.12---Serialization-change
550
551**Bugfixes**
552
553- Better Enum checking (#38)
554
5552017-06-21 Version 0.4.11
556+++++++++++++++++++++++++
557
558**Bugfixes**
559
560- Fix incorrect dependency to "requests" 2.14.x, instead of 2.x meant in 0.4.8
561
5622017-06-15 Version 0.4.10
563+++++++++++++++++++++++++
564
565**Features**
566
567- Add requests hooks to configuration
568
5692017-06-08 Version 0.4.9
570++++++++++++++++++++++++
571
572**Bugfixes**
573
574- Accept "null" value for paging array as an empty list and do not raise (#30)
575
5762017-05-22 Version 0.4.8
577++++++++++++++++++++++++
578
579**Bugfixes**
580
581- Fix random "pool is closed" error (#29)
582- Fix requests dependency to version 2.x, since version 3.x is annunced to be breaking.
583
5842017-04-04 Version 0.4.7
585++++++++++++++++++++++++
586
587**BugFixes**
588
589- Refactor paging #22:
590
591   - "next" is renamed "advance_page" and "next" returns only 1 element (Python 2 expected behavior)
592   - paging objects are now real generator and support the "next()" built-in function without need for "iter()"
593
594- Raise accurate DeserialisationError on incorrect RestAPI discriminator usage #27
595- Fix discriminator usage of the base class name #27
596- Remove default mutable arguments in Clients #20
597- Fix object comparison in some scenarios #24
598
5992017-03-06 Version 0.4.6
600++++++++++++++++++++++++
601
602**Bugfixes**
603
604- Allow Model sub-classes to be serialized if type is "object"
605
6062017-02-13 Version 0.4.5
607++++++++++++++++++++++++
608
609**Bugfixes**
610
611- Fix polymorphic deserialization #11
612- Fix regexp validation if '\\w' is used in Python 2.7 #13
613- Fix dict deserialization if keys are unicode in Python 2.7
614
615**Improvements**
616
617- Add polymorphic serialisation from dict objects
618- Remove chardet and use HTTP charset declaration (fallback to utf8)
619
6202016-09-14 Version 0.4.4
621++++++++++++++++++++++++
622
623**Bugfixes**
624
625- Remove paging URL validation, part of fix https://github.com/Azure/autorest/pull/1420
626
627**Disclaimer**
628
629In order to get paging fixes for impacted clients, you need this package and Autorest > 0.17.0 Nightly 20160913
630
6312016-09-01 Version 0.4.3
632++++++++++++++++++++++++
633
634**Bugfixes**
635
636- Better exception message (https://github.com/Azure/autorest/pull/1300)
637
6382016-08-15 Version 0.4.2
639++++++++++++++++++++++++
640
641**Bugfixes**
642
643- Fix serialization if "object" type contains None (https://github.com/Azure/autorest/issues/1353)
644
6452016-08-08 Version 0.4.1
646++++++++++++++++++++++++
647
648**Bugfixes**
649
650- Fix compatibility issues with requests 2.11.0 (https://github.com/Azure/autorest/issues/1337)
651- Allow url of ClientRequest to have parameters (https://github.com/Azure/autorest/issues/1217)
652
6532016-05-25 Version 0.4.0
654++++++++++++++++++++++++
655
656This version has no bug fixes, but implements new features of Autorest:
657- Base64 url type
658- unixtime type
659- x-ms-enum modelAsString flag
660
661**Behaviour changes**
662
663- Add Platform information in UserAgent
664- Needs Autorest > 0.17.0 Nightly 20160525
665
6662016-04-26 Version 0.3.0
667++++++++++++++++++++++++
668
669**Bugfixes**
670
671- Read only values are no longer in __init__ or sent to the server (https://github.com/Azure/autorest/pull/959)
672- Useless kwarg removed
673
674**Behaviour changes**
675
676- Needs Autorest > 0.16.0 Nightly 20160426
677
678
6792016-03-25 Version 0.2.0
680++++++++++++++++++++++++
681
682**Bugfixes**
683
684- Manage integer enum values (https://github.com/Azure/autorest/pull/879)
685- Add missing application/json Accept HTTP header (https://github.com/Azure/azure-sdk-for-python/issues/553)
686
687**Behaviour changes**
688
689- Needs Autorest > 0.16.0 Nightly 20160324
690
691
6922016-03-21 Version 0.1.3
693++++++++++++++++++++++++
694
695**Bugfixes**
696
697- Deserialisation of generic resource if null in JSON (https://github.com/Azure/azure-sdk-for-python/issues/544)
698
699
7002016-03-14 Version 0.1.2
701++++++++++++++++++++++++
702
703**Bugfixes**
704
705- urllib3 side effect (https://github.com/Azure/autorest/issues/824)
706
707
7082016-03-04 Version 0.1.1
709++++++++++++++++++++++++
710
711**Bugfixes**
712
713- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/799)
714
7152016-03-04 Version 0.1.0
716+++++++++++++++++++++++++
717
718**Behavioural Changes**
719
720- Removed custom logging set up and configuration. All loggers are now children of the root logger 'msrest' with no pre-defined configurations.
721- Replaced _required attribute in Model class with more extensive _validation dict.
722
723**Improvement**
724
725- Removed hierarchy scanning for attribute maps from base Model class - relies on generator to populate attribute
726  maps according to hierarchy.
727- Base class Paged now inherits from collections.Iterable.
728- Data validation during serialization using custom parameters (e.g. max, min etc).
729- Added ValidationError to be raised if invalid data encountered during serialization.
730
7312016-02-29 Version 0.0.3
732++++++++++++++++++++++++
733
734**Bugfixes**
735
736- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/718)
737
7382016-02-19 Version 0.0.2
739++++++++++++++++++++++++
740
741**Bugfixes**
742
743- Fixed bug in exception logging before logger configured.
744
7452016-02-19 Version 0.0.1
746++++++++++++++++++++++++
747
748- Initial release.
749