From 5b71dae6a54b7b9c844d1d30c12f5227dd4a7811 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 3 Jul 2025 16:04:10 +0100 Subject: [PATCH] Don't deprecate the entire oslo_service.wsgi module The aforementioned contains many utilities beyond the eventlet-based server, which are used across OpenStack. While these utilities should arguably have never been added to oslo.service and would be better placed in another service (e.g. an oslo.wsgi library), the reality is that they are here now and we're can't deprecate them until that move happens. Remove the module deprecation, and instead deprecate the class. Change-Id: I6e8e7b3a44ca06488cf87631de3a5526f7c8496c Signed-off-by: Stephen Finucane --- oslo_service/wsgi.py | 21 ++++++++----------- .../undeprecate-wsgi-7e5306403625b8c6.yaml | 6 ++++++ 2 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 releasenotes/notes/undeprecate-wsgi-7e5306403625b8c6.yaml diff --git a/oslo_service/wsgi.py b/oslo_service/wsgi.py index 9f3bc2bd..3f54b7da 100644 --- a/oslo_service/wsgi.py +++ b/oslo_service/wsgi.py @@ -37,18 +37,6 @@ from oslo_service import sslutils from debtcollector import removals -removals.removed_module( - __name__, - replacement="uwsgi", - removal_version="2026.2", - message=( - "The 'oslo_service.wsgi' module is deprecated and will be removed in " - "version 2026.2. We recommend transitioning to 'uwsgi' for serving " - "WSGI applications." - ) -) - - LOG = logging.getLogger(__name__) @@ -67,6 +55,15 @@ class InvalidInput(Exception): "Unexpected argument for periodic task creation: %(arg)s.") +@removals.removed_class( + 'Server', + removal_version="2026.2", + message=( + "The Server class utilises the eventlet service, and eventlet support " + "is deprecated for removal. You should remove use of eventlet servers " + "from your application and switch to deploying via WSGI." + ) +) class Server(service.ServiceBase): """Server class to manage a WSGI server, serving a WSGI application.""" diff --git a/releasenotes/notes/undeprecate-wsgi-7e5306403625b8c6.yaml b/releasenotes/notes/undeprecate-wsgi-7e5306403625b8c6.yaml new file mode 100644 index 00000000..69b979e5 --- /dev/null +++ b/releasenotes/notes/undeprecate-wsgi-7e5306403625b8c6.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The ``oslo_service.wsgi`` module has been undeprecated. It contains many + utilities besides the eventlet-based ``Server`` class. Instead, only the + ``Server`` class itself is now deprecated.