* reafctor: force ipv4 localhost
Replacing "localhost" with "127.0.0.1" in the codebase; sometimes the name localhost force-resolves to ipv6
* revert: leave localhost usage in oauth tests
Change not required.
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix: checkpoint the supported schemes for connectivity
This PR implements a gateway + error that clearly hints the operator at
a misconfigured system during runtime.
Particularity, against the multiple library-provided ways of configuring
redis connection strings (in python), this hard stops if an unsupported
one is chosen by accident.
* fix: remove unknown protocol
---------
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
- realtime communication uses pub-sub and no storage. So using same
redis server for both should be just fine.
- This is how FC works since quite a lot of time. We haven't seen any
problem so far.
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
shows message before migrate if the database or redis service is not running
instead of trying to migrate and then failing.
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>