diff --git a/telebot/__init__.py b/telebot/__init__.py index 671c5631b..b154d04ca 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -20,7 +20,6 @@ # random module to generate random string import random import string -import copy import ssl @@ -8750,7 +8749,7 @@ def _run_middlewares_and_handler(self, message, handlers, middlewares, update_ty logger.error("It is not allowed to pass data and values inside data to the handler. Check your handler: {}".format(handler['function'])) return else: - data_copy = copy.deepcopy(data) + data_copy = data.copy() for key in list(data_copy): # remove data from data_copy if handler does not accept it if key not in params: