fix #1065 gevent-1.3.0 removes 'fast' wsgi implementation.
Signed-off-by: zhang-liang-pengkun <zhangliangpengkun@xfusion.com> (cherry picked from commit 440be8ab765ab43a51cde79b625856878f580bea)
This commit is contained in:
parent
89ce2a5923
commit
158f33f315
@ -0,0 +1,37 @@
|
||||
From 19a12f898b7343e16f0d08821de6aac169143752 Mon Sep 17 00:00:00 2001
|
||||
From: Marcel Hellkamp <marc@gsites.de>
|
||||
Date: Tue, 27 Nov 2018 19:27:54 +0100
|
||||
Subject: [PATCH] fix #1065 gevent-1.3.0 removes 'fast' wsgi implementation.
|
||||
|
||||
---
|
||||
bottle.py | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/bottle.py b/bottle.py
|
||||
index 3a51b38..cb46893 100644
|
||||
--- a/bottle.py
|
||||
+++ b/bottle.py
|
||||
@@ -2904,14 +2904,16 @@ class GeventServer(ServerAdapter):
|
||||
* See gevent.wsgi.WSGIServer() documentation for more options.
|
||||
"""
|
||||
def run(self, handler):
|
||||
- from gevent import wsgi, pywsgi, local
|
||||
+ from gevent import pywsgi, local
|
||||
if not isinstance(threading.local(), local.local):
|
||||
msg = "Bottle requires gevent.monkey.patch_all() (before import)"
|
||||
raise RuntimeError(msg)
|
||||
- if not self.options.pop('fast', None): wsgi = pywsgi
|
||||
- self.options['log'] = None if self.quiet else 'default'
|
||||
+ if self.options.pop('fast', None):
|
||||
+ depr('The "fast" option has been deprecated and removed by Gevent.')
|
||||
+ if self.quiet:
|
||||
+ self.options['log'] = None
|
||||
address = (self.host, self.port)
|
||||
- server = wsgi.WSGIServer(address, handler, **self.options)
|
||||
+ server = pywsgi.WSGIServer(address, handler, **self.options)
|
||||
if 'BOTTLE_CHILD' in os.environ:
|
||||
import signal
|
||||
signal.signal(signal.SIGINT, lambda s, f: server.stop())
|
||||
--
|
||||
2.39.0.windows.2
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: python-bottle
|
||||
Version: 0.12.13
|
||||
Release: 10
|
||||
Release: 11
|
||||
Summary: WSGI micro web-framework for Python.
|
||||
License: MIT
|
||||
URL: https://github.com/bottlepy/bottle
|
||||
@ -8,6 +8,7 @@ Source0: https://github.com/bottlepy/bottle/archive/%{version}/bottle-%{v
|
||||
Patch0000: CVE-2020-28473.patch
|
||||
#https://github.com/bottlepy/bottle/commit/e140e1b54da721a660f2eb9d58a106b7b3ff2f00
|
||||
Patch0001: CVE-2022-31799.patch
|
||||
Patch0002: 0001-fix-1065-gevent-1.3.0-removes-fast-wsgi-implementati.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-devel python3-setuptools
|
||||
|
||||
@ -45,6 +46,9 @@ sed -i '/^#!/d' bottle.py
|
||||
%exclude %{_bindir}/bottle.py
|
||||
|
||||
%changelog
|
||||
* Thu Nov 09 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-11
|
||||
- fix #1065 gevent-1.3.0 removes 'fast' wsgi implementation.
|
||||
|
||||
* Tue Jun 14 2022 yaoxin <yaoxin30@h-partners.com> - 0.12.13-10
|
||||
- Fix CVE-2022-31799
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user