Commit Graph

83 Commits

Author SHA1 Message Date
Scoder12 82fca56318 Fix bug with auth.signed_in
If header doesn't exist, name will be None, which is not equal to an empty string making signed_in pass. Changed to bool because None and empty string are both falsey
2020-08-10 19:00:01 -07:00
Scoder12 7fd3a49f09 Add back duplicate sync code
For performance and my sanity, its actually easier to just have duplicate code rather than try fancy async stuff
2020-08-10 18:58:06 -07:00
Scoder12 b1d525b015 Add do_raise to AsyncJSONKey __slots__ 2020-08-10 15:10:03 -07:00
Scoder12 1c4c7c069f Fix _async2sync to pass a correct self value
Initialize a _super variable in __init__ which is an instance of the async base class and is used as the self argument to async methods so that the class can await internal methods
2020-08-10 15:09:40 -07:00
Scoder12 764804fb6b Fix issue #6 2020-08-07 14:53:23 -07:00
Scoder12 128eef516f Add new raises sections in docstring 2020-08-05 19:23:58 -07:00
Scoder12 dc05f16058 Merge branch 'master' of https://github.com/replit/replit-py into dev 2020-08-05 18:37:40 -07:00
Scoder12 3a40311844 Add new raises kwarg in JSONKey 2020-08-05 18:37:28 -07:00
Scoder12 6b7af69e7e Merge branch 'master' into dev 2020-08-05 18:36:45 -07:00
Scoder12 ea8301205e Don't unasync JSONKey internal methods because they are awaited 2020-08-05 15:58:16 -07:00
Scoder12 7d6f45be6c Pass async db to async to synced JSONKey which expects it 2020-08-05 15:51:35 -07:00
Scoder12 ab79581905 Use nest_asyncio to fix async to sync function 2020-08-05 15:48:37 -07:00
Scoder12 69832079d6 Make ReplitDb a subclass of AsyncReplitDb 2020-08-05 15:31:46 -07:00
Scoder12 75f09b90f5 Add async conversions for all coroutines 2020-08-05 14:12:49 -07:00
Scoder12 b60a027225 Switch regular string to fstring, reorder imports 2020-08-04 16:44:56 -07:00
Scoder12 9cf5c102ca Overhaul async and sync code
Add new _async2sync function to copy async code into a sync class
2020-08-04 16:30:26 -07:00
Scoder12 b0bce695cd Initial code for switch to async 2020-08-04 13:25:26 -07:00
Scoder12 47ccdb8f77 Use new sign_in over old signin util 2020-08-04 12:39:58 -07:00
Scoder12 7674192f1f Put imports in correct order 2020-08-04 12:39:29 -07:00
Scoder12 8ce9d9903e Import new utils functions in maqpy init 2020-08-04 12:36:23 -07:00
Scoder12 7854e5e2c1 Add authed ratelimit 2020-08-03 18:01:41 -07:00
Codemonkey51 ab597c4ec3 fix liniting
fix as much lining as i can
2020-08-03 17:50:18 -07:00
Scoder12 6f590fdf12 Bugfix: Use signin() for needs_sign_in default
Without this, sign in button was created in page head making it invisible
2020-08-03 17:35:43 -07:00
Scoder12 0a33fd77f7 Rename signin to sign_in 2020-08-03 17:33:38 -07:00
Scoder12 e805667fc2 Merge codermonkey 'dev' branch 2020-08-03 17:05:56 -07:00
Codemonkey51 a6c4d7aad0 one other commit 2020-08-03 16:59:58 -07:00
Codemonkey51 b90db79f96 added async :D 2020-08-03 16:59:36 -07:00
Scoder12 ac43d0e3e3 Move local_redirect to utils 2020-08-03 15:38:08 -07:00
Scoder12 ba08aff346 Add flask proxies and local_redirect function 2020-08-03 15:34:21 -07:00
Scoder12 850e3aa29b Change make_response to Response to fix bug 2020-07-30 13:00:22 -07:00
Scoder12 9beecd1311 Pass missing args to view function
Used by static files
2020-07-29 12:52:57 -07:00
Scoder12 f45c760d83 Don't pass unexpected args to loginwall handler 2020-07-29 12:42:30 -07:00
Scoder12 a05dc35e0d Use request.args instead of non-existant request.query 2020-07-29 11:39:04 -07:00
Scoder12 e1e9a77d25 Handle src paramater correctly 2020-07-29 11:37:27 -07:00
Scoder12 2ad93fed96 Add default for needs_params src 2020-07-29 11:26:38 -07:00
Scoder12 936bf12db9 Add src paramater to needs_params 2020-07-29 11:22:23 -07:00
Scoder12 7da2a97832 Fix bad annotation 2020-07-29 11:09:45 -07:00
Scoder12 f175159e97 Import needs_params in maqpy init 2020-07-29 11:06:44 -07:00
Scoder12 d1cadd7f37 Add code for needs_params 2020-07-29 10:57:57 -07:00
Scoder12 f595fa94ba Remove unused import 2020-07-28 17:46:18 -07:00
Scoder12 3d4bf9fb98 Remove call referencing old class 2020-07-28 17:40:05 -07:00
Scoder12 5cba0a7517 Delete FileCache in favor of simple dict 2020-07-28 17:38:35 -07:00
Scoder12 b67d1d4e27 Fix type annotations in needs_params again 2020-07-28 17:37:21 -07:00
Scoder12 8e8da86391 Fix type annotations in needs_params 2020-07-28 17:36:24 -07:00
Scoder12 0cdea584d8 Fix file load bug 2020-07-28 17:30:35 -07:00
Scoder12 04cb0f6d23 Remove trailing whitespace 2020-07-28 17:16:35 -07:00
Scoder12 6bab22c596 Import files module 2020-07-28 17:16:18 -07:00
Scoder12 e2d5e55ca3 Initial code for needs_params 2020-07-28 17:11:39 -07:00
Scoder12 9249c4f2b5 Finish rename and rearrange imports 2020-07-28 16:59:04 -07:00
Scoder12 c08b64d3ec Fix bug in decorator: actually return handler 2020-07-28 16:33:13 -07:00