From 7e9edff45648be8c9f0222ee0e6f7888b06bd044 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Mon, 24 Oct 2022 09:34:06 +0200 Subject: [PATCH 1/2] ci: force installing sinatra 2 Which still runs on ruby 2.5.0. Fix #2497 --- tests/gh-shared.sh | 2 +- tests/travis.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/gh-shared.sh b/tests/gh-shared.sh index 368afaaee..bad6dd043 100755 --- a/tests/gh-shared.sh +++ b/tests/gh-shared.sh @@ -88,7 +88,7 @@ test_rack() { # the code assumes that ruby environment is activated by `rvm use` echo -e "${bldyel}================== TESTING $1 $2 =====================${txtrst}" echo -e "${bldyel}>>> Installing sinatra gem using gem${txtrst}" - sudo gem install sinatra || die + sudo gem install sinatra -v 2.2.2 || die echo -e "${bldyel}>>> Spawning uWSGI rack app${txtrst}" echo -en "${bldred}" ./uwsgi --master --plugin 0:$1 --http :8080 --exit-on-reload --touch-reload reload.txt --rack $2 --daemonize uwsgi.log diff --git a/tests/travis.sh b/tests/travis.sh index af5df9fa8..7b1eebb09 100755 --- a/tests/travis.sh +++ b/tests/travis.sh @@ -98,7 +98,7 @@ test_rack() { # the code assumes that ruby environment is activated by `rvm use` echo -e "${bldyel}================== TESTING $1 $2 =====================${txtrst}" echo -e "${bldyel}>>> Installing sinatra gem using gem${txtrst}" - sudo gem install sinatra || die + sudo gem install sinatra -v 2.2.2 || die echo -e "${bldyel}>>> Spawning uWSGI rack app${txtrst}" echo -en "${bldred}" ./uwsgi --master --plugin 0:$1 --http :8080 --exit-on-reload --touch-reload reload.txt --rack $2 --daemonize uwsgi.log From e6c2674d0184e1b3139a76f71deb74c59b9b661b Mon Sep 17 00:00:00 2001 From: eleksir Date: Sat, 22 Oct 2022 21:46:45 +0300 Subject: [PATCH 2/2] Use parentheses in print() statement. In py3 print is not a keyword, it is function, so it must be called with parentheses. This fix compatible with py2 as it does not denies using print as print(). --- plugins/coroae/uwsgiplugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/coroae/uwsgiplugin.py b/plugins/coroae/uwsgiplugin.py index 6d35564e1..cf594ee8a 100644 --- a/plugins/coroae/uwsgiplugin.py +++ b/plugins/coroae/uwsgiplugin.py @@ -9,7 +9,7 @@ coroapi = p if not coroapi: - print "unable to find the Coro perl module !!!" + print("unable to find the Coro perl module !!!") sys.exit(1) NAME='coroae'