Commit 8c0c618df8df9077a4a4dbf29b9cf42c967d08e1

Authored by Miguel Barão
1 parent 0d5211b6
Exists in dev

update tornado to >=6.3

perguntations/__init__.py
@@ -32,10 +32,10 @@ proof of submission and for review. @@ -32,10 +32,10 @@ proof of submission and for review.
32 ''' 32 '''
33 33
34 APP_NAME = 'perguntations' 34 APP_NAME = 'perguntations'
35 -APP_VERSION = '2022.04.dev1' 35 +APP_VERSION = '2024.06.dev1'
36 APP_DESCRIPTION = str(__doc__) 36 APP_DESCRIPTION = str(__doc__)
37 37
38 __author__ = 'Miguel Barão' 38 __author__ = 'Miguel Barão'
39 -__copyright__ = 'Copyright 2022, Miguel Barão' 39 +__copyright__ = 'Copyright 2024, Miguel Barão'
40 __license__ = 'MIT license' 40 __license__ = 'MIT license'
41 __version__ = APP_VERSION 41 __version__ = APP_VERSION
perguntations/serve.py
@@ -21,9 +21,7 @@ from typing import Dict, Tuple @@ -21,9 +21,7 @@ from typing import Dict, Tuple
21 import uuid 21 import uuid
22 22
23 # user installed libraries 23 # user installed libraries
24 -import tornado.ioloop  
25 -import tornado.web  
26 -import tornado.httpserver 24 +import tornado
27 25
28 # this project 26 # this project
29 from .parser_markdown import md_to_html 27 from .parser_markdown import md_to_html
@@ -103,7 +101,7 @@ class BaseHandler(tornado.web.RequestHandler): @@ -103,7 +101,7 @@ class BaseHandler(tornado.web.RequestHandler):
103 Since HTTP is stateless, a cookie is used to identify the user. 101 Since HTTP is stateless, a cookie is used to identify the user.
104 This function returns the cookie for the current user. 102 This function returns the cookie for the current user.
105 ''' 103 '''
106 - cookie = self.get_secure_cookie('perguntations_user') 104 + cookie = self.get_signed_cookie('perguntations_user')
107 if cookie: 105 if cookie:
108 return cookie.decode('utf-8') 106 return cookie.decode('utf-8')
109 return None 107 return None
@@ -140,7 +138,7 @@ class LoginHandler(BaseHandler): @@ -140,7 +138,7 @@ class LoginHandler(BaseHandler):
140 await asyncio.sleep(3) # delay to avoid spamming the server... 138 await asyncio.sleep(3) # delay to avoid spamming the server...
141 self.render('login.html', error=self._error_msg[error]) 139 self.render('login.html', error=self._error_msg[error])
142 else: 140 else:
143 - self.set_secure_cookie('perguntations_user', str(uid)) 141 + self.set_signed_cookie('perguntations_user', str(uid))
144 self.redirect('/') 142 self.redirect('/')
145 143
146 144
@@ -30,7 +30,7 @@ setup( @@ -30,7 +30,7 @@ setup(
30 'pygments', 30 'pygments',
31 'schema>=0.7.5', 31 'schema>=0.7.5',
32 'sqlalchemy>=1.4', 32 'sqlalchemy>=1.4',
33 - 'tornado>=6.1', 33 + 'tornado>=6.3',
34 ], 34 ],
35 entry_points={ 35 entry_points={
36 'console_scripts': [ 36 'console_scripts': [