* 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
db_host != the hostname part after @, hmm. so instead we'll pass
no-mariadb-socket flag to setup_database where we'll drop and create
users with host set to the TCP/IP socket instead of the UNIX socket.
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* perf: Cache db columns to avoid redundant database calls
* fix: Move cache clearing code from doctype to schema.py
* fix: self.table_name instead of self.name
* fix: Cache columns in "table_columns" key
`table_columns` was cached in meta but columns were also getting accessed
directly using frappe.db.get_table_columns. Now, it is cached at
`frappe.db` layer
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
* Fixed setup_db.py to support MariaDB version 10.3. Added function for calculating versions, per MariaDB documentation.
* Major rewrite of setup_db.py. Reduced number of functions. Made fully compatible with MariaDB 10.3+. Removed references to client parameters in my.cnf that cannot be queried. Applied PEP8 rules to python code.
* Adding missing print statement in setup_db.py
* Replaced 4-spaces with tabs, per ERPNext standards.
* Fixed broken test by substituing 'check_database_settings()'
Fixed the test in convert_to_barracuda_and_utf8mb4.py by calling the new function 'check_database_settings()'
* Cleaned up setup.py, to match latest version of Frappe develop