Skip to content

Commit ee13fa7

Browse files
authored
Replace deprecated logging.warn with logging.warning (#140)
1 parent aa3683a commit ee13fa7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ def block_fallback(props):
222222
type_ = props['block']['type']
223223

224224
if type_ == 'example-discard':
225-
logging.warn(f'Missing config for "{type_}". Discarding block, keeping content.')
225+
logging.warning(f'Missing config for "{type_}". Discarding block, keeping content.')
226226
# Directly return the block's children to keep its content.
227227
return props['children']
228228
elif type_ == 'example-delete':
229229
logging.error(f'Missing config for "{type_}". Deleting block.')
230230
# Return None to not render anything, removing the whole block.
231231
return None
232232
else:
233-
logging.warn(f'Missing config for "{type_}". Using div instead.')
233+
logging.warning(f'Missing config for "{type_}". Using div instead.')
234234
# Provide a fallback.
235235
return DOM.create_element('div', {}, props['children'])
236236
```

benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def link(props):
2929
def block_fallback(props):
3030
type_ = props["block"]["type"]
3131

32-
logging.warn(f'Missing config for "{type_}".')
32+
logging.warning(f'Missing config for "{type_}".')
3333
return DOM.create_element("div", {}, props["children"])
3434

3535

0 commit comments

Comments
 (0)