diff --git a/locust/util/deprecation.py b/locust/util/deprecation.py
index cd974678..95a8e312 100644
--- a/locust/util/deprecation.py
+++ b/locust/util/deprecation.py
@@ -20,7 +20,7 @@ def deprecated_locust_meta_class(deprecation_message):
             if classname in ["DeprecatedLocustClass", "DeprecatedHttpLocustClass", "DeprecatedFastHttpLocustClass"]:
                 return super().__new__(mcs, classname, bases, class_dict)
             else:
-                raise ImportError(deprecation_message)
+                raise DeprecationWarning(deprecation_message)
     return MetaClass
 
 class DeprecatedLocustClass(metaclass=deprecated_locust_meta_class(
diff --git a/setup.py b/setup.py
index 80716c5a..26f4eec5 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ setup(
     version=version,
     install_requires=[
         "gevent>=1.5.0",
-        "flask>=0.10.1", 
+        "flask>=1.1.2", 
         "requests>=2.9.1", 
         "msgpack>=0.6.2", 
         "pyzmq>=16.0.2", 

Update flask version
Our minimum required flask version is too old (saw at least one person having an issue https://stackoverflow.com/questions/61969924/typeerror-when-i-run-a-locustfile-py)

https://flask.palletsprojects.com/en/1.1.x/changelog/#version-0-12-5 is a minimum, but we should probably go to 1.x right away.

I can do the PR
diff --git a/locust/test/test_locust_class.py b/locust/test/test_locust_class.py
index 8ac03776..dbf58d43 100644
--- a/locust/test/test_locust_class.py
+++ b/locust/test/test_locust_class.py
@@ -545,18 +545,10 @@ class TestLocustClass(LocustTestCase):
             from locust.contrib.fasthttp import FastHttpLocust
             class FastLocust(FastHttpLocust):
                 pass
-        
-        def assert_importing_locust_class_raises(func):
-            try:
-                func()
-            except ImportError as e:
-                self.assertIn("Locust class has been renamed to", e.args[0], "ImportError was raised, but with the wrong error message")
-            else:
-                self.fail("ImportError was not raised")
-
-        assert_importing_locust_class_raises(test_locust)
-        assert_importing_locust_class_raises(test_http_locust)
-        assert_importing_locust_class_raises(test_fast_http_locust)
+
+        self.assertRaises(DeprecationWarning, test_locust)
+        self.assertRaises(DeprecationWarning, test_http_locust)
+        self.assertRaises(DeprecationWarning, test_fast_http_locust)
 
 
 class TestWebLocustClass(WebserverTestCase):

pip install -e .
parse_log_pytest
pytest
pytest flake8 mock pyquery cryptography
apt-get update apt-get install -y gcc
3.8
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
blinker==1.8.2
Brotli==1.1.0
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
click==8.1.8
ConfigArgParse==1.7
cryptography==44.0.2
cssselect==1.2.0
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
flake8==7.1.2
Flask==3.0.3
Flask-BasicAuth==0.2.0
gevent==24.2.1
geventhttpclient==2.0.12
greenlet==3.1.1
idna==3.10
importlib_metadata==8.5.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
itsdangerous==2.2.0
Jinja2==3.1.6
-e git+https://github.com/locustio/locust.git@c4bdbd30a52273498a400c19c2ef3672f9fd46ed#egg=locust
lxml==5.3.1
MarkupSafe==2.1.5
mccabe==0.7.0
mock==5.2.0
msgpack==1.1.0
packaging @ file:///croot/packaging_1720101850331/work
pluggy @ file:///tmp/build/80754af9/pluggy_1648042571233/work
psutil==7.0.0
pycodestyle==2.12.1
pycparser==2.22
pyflakes==3.2.0
pyquery==2.0.1
pytest @ file:///croot/pytest_1717793244625/work
pyzmq==26.3.0
requests==2.32.3
six==1.17.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
urllib3==2.2.3
Werkzeug==3.0.6
zipp==3.20.2
zope.event==5.0
zope.interface==7.2

name: locust
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py38h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.1=py38h06a4308_0
  - pip=24.2=py38h06a4308_0
  - pluggy=1.0.0=py38h06a4308_1
  - pytest=7.4.4=py38h06a4308_0
  - python=3.8.20=he870216_0
  - readline=8.2=h5eee18b_0
  - setuptools=75.1.0=py38h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py38h06a4308_0
  - wheel=0.44.0=py38h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - blinker==1.8.2
      - brotli==1.1.0
      - certifi==2025.1.31
      - cffi==1.17.1
      - charset-normalizer==3.4.1
      - click==8.1.8
      - configargparse==1.7
      - cryptography==44.0.2
      - cssselect==1.2.0
      - flake8==7.1.2
      - flask==3.0.3
      - flask-basicauth==0.2.0
      - gevent==24.2.1
      - geventhttpclient==2.0.12
      - greenlet==3.1.1
      - idna==3.10
      - importlib-metadata==8.5.0
      - itsdangerous==2.2.0
      - jinja2==3.1.6
      - lxml==5.3.1
      - markupsafe==2.1.5
      - mccabe==0.7.0
      - mock==5.2.0
      - msgpack==1.1.0
      - psutil==7.0.0
      - pycodestyle==2.12.1
      - pycparser==2.22
      - pyflakes==3.2.0
      - pyquery==2.0.1
      - pyzmq==26.3.0
      - requests==2.32.3
      - six==1.17.0
      - urllib3==2.2.3
      - werkzeug==3.0.6
      - zipp==3.20.2
      - zope-event==5.0
      - zope-interface==7.2
prefix: /opt/conda/envs/locust

locust/test/test_locust_class.py::TestLocustClass::test_deprecated_locust_class
locust/test/test_locust_class.py::TestTaskSet::test_on_start locust/test/test_locust_class.py::TestTaskSet::test_on_start_interrupt locust/test/test_locust_class.py::TestTaskSet::test_on_stop_interrupt locust/test/test_locust_class.py::TestTaskSet::test_on_stop_interrupt_reschedule locust/test/test_locust_class.py::TestTaskSet::test_on_stop_when_locust_stops locust/test/test_locust_class.py::TestTaskSet::test_parent_attribute locust/test/test_locust_class.py::TestTaskSet::test_schedule_task locust/test/test_locust_class.py::TestTaskSet::test_schedule_task_bound_method locust/test/test_locust_class.py::TestTaskSet::test_sub_taskset locust/test/test_locust_class.py::TestTaskSet::test_sub_taskset_tasks_decorator locust/test/test_locust_class.py::TestTaskSet::test_task_decorator_on_taskset locust/test/test_locust_class.py::TestTaskSet::test_task_decorator_ratio locust/test/test_locust_class.py::TestTaskSet::test_task_decorator_with_or_without_argument locust/test/test_locust_class.py::TestTaskSet::test_task_ratio locust/test/test_locust_class.py::TestTaskSet::test_tasks_missing_gives_user_friendly_exception locust/test/test_locust_class.py::TestTaskSet::test_tasks_on_abstract_locust locust/test/test_locust_class.py::TestTaskSet::test_tasks_on_locust locust/test/test_locust_class.py::TestTaskSet::test_taskset_inheritance locust/test/test_locust_class.py::TestTaskSet::test_taskset_on_abstract_locust locust/test/test_locust_class.py::TestTaskSet::test_user_is_read_only locust/test/test_locust_class.py::TestTaskSet::test_wait_function locust/test/test_locust_class.py::TestLocustClass::test_locust_forced_stop locust/test/test_locust_class.py::TestLocustClass::test_locust_graceful_stop locust/test/test_locust_class.py::TestLocustClass::test_locust_on_start locust/test/test_locust_class.py::TestLocustClass::test_locust_on_stop locust/test/test_locust_class.py::TestLocustClass::test_locust_start locust/test/test_locust_class.py::TestLocustClass::test_locust_wait locust/test/test_locust_class.py::TestWebLocustClass::test_client_basic_auth locust/test/test_locust_class.py::TestWebLocustClass::test_client_delete locust/test/test_locust_class.py::TestWebLocustClass::test_client_get locust/test/test_locust_class.py::TestWebLocustClass::test_client_get_absolute_url locust/test/test_locust_class.py::TestWebLocustClass::test_client_head locust/test/test_locust_class.py::TestWebLocustClass::test_client_post locust/test/test_locust_class.py::TestWebLocustClass::test_client_put locust/test/test_locust_class.py::TestWebLocustClass::test_client_request_headers locust/test/test_locust_class.py::TestWebLocustClass::test_get_request locust/test/test_locust_class.py::TestWebLocustClass::test_locust_client_error locust/test/test_locust_class.py::TestWebLocustClass::test_log_request_name_argument locust/test/test_locust_class.py::TestWebLocustClass::test_redirect_url_original_path_as_name locust/test/test_locust_class.py::TestCatchResponse::test_catch_response locust/test/test_locust_class.py::TestCatchResponse::test_catch_response_allow_404 locust/test/test_locust_class.py::TestCatchResponse::test_catch_response_connection_error_fail locust/test/test_locust_class.py::TestCatchResponse::test_catch_response_connection_error_success locust/test/test_locust_class.py::TestCatchResponse::test_catch_response_http_fail locust/test/test_locust_class.py::TestCatchResponse::test_catch_response_http_manual_fail locust/test/test_locust_class.py::TestCatchResponse::test_catch_response_http_manual_success locust/test/test_locust_class.py::TestCatchResponse::test_interrupt_taskset_with_catch_response
setup.py locust/util/deprecation.py
setup.py locust/util/deprecation.py