From 984591a582d6ea7206ff1fd29bfaa333881ced34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D1=80=D0=B8=D1=81=20=D0=92=D0=B5=D1=80=D1=85?= =?UTF-8?q?=D0=BE=D0=B2=D1=81=D0=BA=D0=B8=D0=B9?= Date: Fri, 29 Jan 2021 11:27:51 -0500 Subject: [PATCH 1/3] Redirect all 2.7 files removed in Python 3 --- salt/docs/config/nginx.docs-backend.conf | 105 ++++++++++++++++++++++- 1 file changed, 102 insertions(+), 3 deletions(-) diff --git a/salt/docs/config/nginx.docs-backend.conf b/salt/docs/config/nginx.docs-backend.conf index f2d6b45c..3362345d 100644 --- a/salt/docs/config/nginx.docs-backend.conf +++ b/salt/docs/config/nginx.docs-backend.conf @@ -36,12 +36,111 @@ server { } # Smooth the switch between versions by mapping old files to their new location - location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8)/library/sets.html$ { - return 301 https://$host/$1$2/library/stdtypes.html#set-types-set-frozenset; - } location ~ ^/([a-z-]*/)?(3|3.6|3.7|3.8)/library/email.util.html$ { return 301 https://$host/$1$2/library/email.utils.html; } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/c-api/(class|cobject|int|string).html$ { + return 301 https://$host/$1$2/; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/howto/(doanddont|webservers).html$ { + return 301 https://$host/$1$2/; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/(aepack|aetools|aetypes|al|autogil|bastion|bsddb|carbon|cd|colorpicker|commands|compiler|dbhash|dircache|dl|dummy_thread|easydialogs|fl|fm|fpectl|fpformat|framework|future_builtins|gensuitemodule|gl|hotshot|htmllib|ic|imageop|imgfile|imputil|jpeg|mac|macos|macosa|macostools|macpath|md5|mhlib|mimetools|mimewriter|mimify|miniaeframe|multifile|mutex|new|popen2|posixfile|restricted|rexec|rfc822|sgi|sgmllib|sha|someos|statvfs|sun|sunaudio|user).html$ { + return 301 https://$host/$1$2/; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/strings.html$ { + return 301 https://$host/$1$2/library/text.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/stringio.html$ { + return 301 https://$host/$1$2/library/io.html#io.StringIO; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/sets.html$ { + return 301 https://$host/$1$2/library/stdtypes.html#set-types-set-frozenset; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/userdict.html$ { + return 301 https://$host/$1$2/library/collections.html#userdict-objects; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/repr.html$ { + return 301 https://$host/$1$2/library/reprlib.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/copy_reg.html$ { + return 301 https://$host/$1$2/library/copyreg.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/anydbm.html$ { + return 301 https://$host/$1$2/library/dbm.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/whichdb.html$ { + return 301 https://$host/$1$2/library/dbm.html#dbm.whichdb; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/dumbdbm.html$ { + return 301 https://$host/$1$2/library/dbm.html#module-dbm.dumb; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/dbm.html$ { + return 301 https://$host/$1$2/library/dbm.html#module-dbm.ndbm; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/gdbm.html$ { + return 301 https://$host/$1$2/library/dbm.html#module-dbm.gnu; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/robotparser.html$ { + return 301 https://$host/$1$2/library/urllib.robotparser.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/thread.html$ { + return 301 https://$host/$1$2/library/_thread.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/email-examples.html$ { + return 301 https://$host/$1$2/library/email.examples.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/htmlparser.html$ { + return 301 https://$host/$1$2/library/html.parser.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/urllib2.html$ { + return 301 https://$host/$1$2/library/urllib.request.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/httplib.html$ { + return 301 https://$host/$1$2/library/http.client.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/urlparse.html$ { + return 301 https://$host/$1$2/library/urllib.parse.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/basehttpserver.html$ { + return 301 https://$host/$1$2/library/http.server.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/simplehttpserver.html$ { + return 301 https://$host/$1$2/library/http.server.html#http.server.SimpleHTTPRequestHandler; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/cgihttpserver.html$ { + return 301 https://$host/$1$2/library/http.server.html#http.server.CGIHTTPRequestHandler; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/cookielib.html$ { + return 301 https://$host/$1$2/library/http.cookiejar.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/cookie.html$ { + return 301 https://$host/$1$2/library/http.cookies.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/xmlrpclib.html$ { + return 301 https://$host/$1$2/library/xmlrpc.client.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/simplexmlrpcserver.html$ { + return 301 https://$host/$1$2/library/xmlrpc.server.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/docxmlrpcserver.html$ { + return 301 https://$host/$1$2/library/xmlrpc.server.html#documenting-xmlrpc-server; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/ttk.html$ { + return 301 https://$host/$1$2/library/tkinter.ttk.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/tix.html$ { + return 301 https://$host/$1$2/library/tkinter.tix.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/scrolledtext.html$ { + return 301 https://$host/$1$2/library/tkinter.scrolledtext.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/__builtin__.html$ { + return 301 https://$host/$1$2/library/builtins.html; + } + location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/_winreg.html$ { + return 301 https://$host/$1$2/library/winreg.html; + } # Map /documenting to the devguide. location ~ ^/devguide/(.*)$ { From 84a95c36c7d164f792819062cf64c424af8013b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D1=80=D0=B8=D1=81=20=D0=92=D0=B5=D1=80=D1=85?= =?UTF-8?q?=D0=BE=D0=B2=D1=81=D0=BA=D0=B8=D0=B9?= Date: Fri, 29 Jan 2021 11:38:40 -0500 Subject: [PATCH 2/3] List supported Python versions explicitly it doesn't make sense to redirect 3.42 --- salt/docs/config/nginx.docs-backend.conf | 68 ++++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/salt/docs/config/nginx.docs-backend.conf b/salt/docs/config/nginx.docs-backend.conf index 3362345d..253c4e07 100644 --- a/salt/docs/config/nginx.docs-backend.conf +++ b/salt/docs/config/nginx.docs-backend.conf @@ -39,106 +39,106 @@ server { location ~ ^/([a-z-]*/)?(3|3.6|3.7|3.8)/library/email.util.html$ { return 301 https://$host/$1$2/library/email.utils.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/c-api/(class|cobject|int|string).html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/c-api/(class|cobject|int|string).html$ { return 301 https://$host/$1$2/; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/howto/(doanddont|webservers).html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/howto/(doanddont|webservers).html$ { return 301 https://$host/$1$2/; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/(aepack|aetools|aetypes|al|autogil|bastion|bsddb|carbon|cd|colorpicker|commands|compiler|dbhash|dircache|dl|dummy_thread|easydialogs|fl|fm|fpectl|fpformat|framework|future_builtins|gensuitemodule|gl|hotshot|htmllib|ic|imageop|imgfile|imputil|jpeg|mac|macos|macosa|macostools|macpath|md5|mhlib|mimetools|mimewriter|mimify|miniaeframe|multifile|mutex|new|popen2|posixfile|restricted|rexec|rfc822|sgi|sgmllib|sha|someos|statvfs|sun|sunaudio|user).html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/(aepack|aetools|aetypes|al|autogil|bastion|bsddb|carbon|cd|colorpicker|commands|compiler|dbhash|dircache|dl|dummy_thread|easydialogs|fl|fm|fpectl|fpformat|framework|future_builtins|gensuitemodule|gl|hotshot|htmllib|ic|imageop|imgfile|imputil|jpeg|mac|macos|macosa|macostools|macpath|md5|mhlib|mimetools|mimewriter|mimify|miniaeframe|multifile|mutex|new|popen2|posixfile|restricted|rexec|rfc822|sgi|sgmllib|sha|someos|statvfs|sun|sunaudio|user).html$ { return 301 https://$host/$1$2/; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/strings.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/strings.html$ { return 301 https://$host/$1$2/library/text.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/stringio.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/stringio.html$ { return 301 https://$host/$1$2/library/io.html#io.StringIO; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/sets.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/sets.html$ { return 301 https://$host/$1$2/library/stdtypes.html#set-types-set-frozenset; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/userdict.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/userdict.html$ { return 301 https://$host/$1$2/library/collections.html#userdict-objects; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/repr.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/repr.html$ { return 301 https://$host/$1$2/library/reprlib.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/copy_reg.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/copy_reg.html$ { return 301 https://$host/$1$2/library/copyreg.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/anydbm.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/anydbm.html$ { return 301 https://$host/$1$2/library/dbm.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/whichdb.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/whichdb.html$ { return 301 https://$host/$1$2/library/dbm.html#dbm.whichdb; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/dumbdbm.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/dumbdbm.html$ { return 301 https://$host/$1$2/library/dbm.html#module-dbm.dumb; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/dbm.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/dbm.html$ { return 301 https://$host/$1$2/library/dbm.html#module-dbm.ndbm; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/gdbm.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/gdbm.html$ { return 301 https://$host/$1$2/library/dbm.html#module-dbm.gnu; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/robotparser.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/robotparser.html$ { return 301 https://$host/$1$2/library/urllib.robotparser.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/thread.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/thread.html$ { return 301 https://$host/$1$2/library/_thread.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/email-examples.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/email-examples.html$ { return 301 https://$host/$1$2/library/email.examples.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/htmlparser.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/htmlparser.html$ { return 301 https://$host/$1$2/library/html.parser.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/urllib2.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/urllib2.html$ { return 301 https://$host/$1$2/library/urllib.request.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/httplib.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/httplib.html$ { return 301 https://$host/$1$2/library/http.client.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/urlparse.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/urlparse.html$ { return 301 https://$host/$1$2/library/urllib.parse.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/basehttpserver.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/basehttpserver.html$ { return 301 https://$host/$1$2/library/http.server.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/simplehttpserver.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/simplehttpserver.html$ { return 301 https://$host/$1$2/library/http.server.html#http.server.SimpleHTTPRequestHandler; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/cgihttpserver.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/cgihttpserver.html$ { return 301 https://$host/$1$2/library/http.server.html#http.server.CGIHTTPRequestHandler; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/cookielib.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/cookielib.html$ { return 301 https://$host/$1$2/library/http.cookiejar.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/cookie.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/cookie.html$ { return 301 https://$host/$1$2/library/http.cookies.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/xmlrpclib.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/xmlrpclib.html$ { return 301 https://$host/$1$2/library/xmlrpc.client.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/simplexmlrpcserver.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/simplexmlrpcserver.html$ { return 301 https://$host/$1$2/library/xmlrpc.server.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/docxmlrpcserver.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/docxmlrpcserver.html$ { return 301 https://$host/$1$2/library/xmlrpc.server.html#documenting-xmlrpc-server; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/ttk.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/ttk.html$ { return 301 https://$host/$1$2/library/tkinter.ttk.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/tix.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/tix.html$ { return 301 https://$host/$1$2/library/tkinter.tix.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/scrolledtext.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/scrolledtext.html$ { return 301 https://$host/$1$2/library/tkinter.scrolledtext.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/__builtin__.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/__builtin__.html$ { return 301 https://$host/$1$2/library/builtins.html; } - location ~ ^/([a-z-]*/)?(3(.[0-9]*)?)/library/_winreg.html$ { + location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/_winreg.html$ { return 301 https://$host/$1$2/library/winreg.html; } From 46b807e5e4bc434c65f7d983d7ff2d8f3692150e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D1=80=D0=B8=D1=81=20=D0=92=D0=B5=D1=80=D1=85?= =?UTF-8?q?=D0=BE=D0=B2=D1=81=D0=BA=D0=B8=D0=B9?= Date: Tue, 2 Feb 2021 08:50:24 -0500 Subject: [PATCH 3/3] Update salt/docs/config/nginx.docs-backend.conf Co-authored-by: Julien Palard --- salt/docs/config/nginx.docs-backend.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/docs/config/nginx.docs-backend.conf b/salt/docs/config/nginx.docs-backend.conf index 253c4e07..b9f16e4b 100644 --- a/salt/docs/config/nginx.docs-backend.conf +++ b/salt/docs/config/nginx.docs-backend.conf @@ -40,7 +40,7 @@ server { return 301 https://$host/$1$2/library/email.utils.html; } location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/c-api/(class|cobject|int|string).html$ { - return 301 https://$host/$1$2/; + return 301 https://$host/$1$2/c-api/; } location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/howto/(doanddont|webservers).html$ { return 301 https://$host/$1$2/;