* Rename conditions kwarg to filters. Handle conditions kwarg if passed
* Re-added exc raise for no filters...to risky. Thinking of having an
extra kwarg like `force` or something...undecided
* Added Python type hints
* Accept and pass kwargs to frappe.db.sql...Now pass any kwarg db.sql
accepts
* Pass debug from fn def if someone is still using it as a positional
arg :thonk:
* 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
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
* fix: tags patch
* fix: auto_commit_on_many_writes
* fix: check if tag exists
* fix: check if tag or tag link exists
* fix: check if column exists
* fix: set autocommit false
* fix: use ignore in insert query for bulk insert
* fix: add option to ignore duplicates
* 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>