Skip to content

Commit

Permalink
switch logging level for failsafe deserialize (#1419)
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft authored Aug 31, 2022
1 parent 12b8f51 commit 0315787
Show file tree
Hide file tree
Showing 160 changed files with 170 additions and 169 deletions.
3 changes: 2 additions & 1 deletion packages/autorest.python/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

### 2022-08-XX - 6.1.4
### 2022-08-31 - 6.1.4

| Library | Min Version |
| ----------------------------------------------------------------------- | ----------- |
Expand All @@ -15,6 +15,7 @@

- Fix generation failure for `format: password` #1404
- Fix `content_type` error when paging with body #1407
- Fix excessive warning level logging in vendored `failsafe_deserialize` #1419

**Other Changes**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ class Deserializer(object):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization",
exc_info=True
)
Expand Down Expand Up @@ -2003,4 +2003,4 @@ class Deserializer(object):
msg = "Cannot deserialize to unix datetime object."
raise_with_traceback(DeserializationError, msg, err)
else:
return date_obj
return date_obj
2 changes: 1 addition & 1 deletion packages/autorest.python/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/python",
"version": "6.1.3",
"version": "6.1.4",
"description": "The Python extension for generators in AutoRest.",
"scripts": {
"prepare": "node run-python3.js prepare.py",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization",
exc_info=True
)
Expand Down Expand Up @@ -2003,4 +2003,4 @@ def deserialize_unix(attr):
msg = "Cannot deserialize to unix datetime object."
raise_with_traceback(DeserializationError, msg, err)
else:
return date_obj
return date_obj
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
try:
return self(target_obj, data, content_type=content_type)
except:
_LOGGER.warning(
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None
Expand Down
Loading

0 comments on commit 0315787

Please sign in to comment.