Skip to content

Commit 9221fcf

Browse files
committed
Stop using deprecated log.warn()
1 parent 27f939a commit 9221fcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kafka/consumer/fetcher.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ def _handle_offset_response(self, future, response):
610610
future.failure(error_type(partition))
611611
return
612612
elif error_type is Errors.UnknownTopicOrPartitionError:
613-
log.warn("Received unknown topic or partition error in ListOffset "
613+
log.warning("Received unknown topic or partition error in ListOffset "
614614
"request for partition %s. The topic/partition " +
615615
"may not exist or the user may not have Describe access "
616616
"to it.", partition)
@@ -821,10 +821,10 @@ def _parse_fetched_data(self, completed_fetch):
821821
raise Errors.OffsetOutOfRangeError({tp: fetch_offset})
822822

823823
elif error_type is Errors.TopicAuthorizationFailedError:
824-
log.warn("Not authorized to read from topic %s.", tp.topic)
824+
log.warning("Not authorized to read from topic %s.", tp.topic)
825825
raise Errors.TopicAuthorizationFailedError(set(tp.topic))
826826
elif error_type is Errors.UnknownError:
827-
log.warn("Unknown error fetching data for topic-partition %s", tp)
827+
log.warning("Unknown error fetching data for topic-partition %s", tp)
828828
else:
829829
raise error_type('Unexpected error while fetching data')
830830

0 commit comments

Comments
 (0)