* Made code DRY-er by using obscure frappe.db.is_data_too_long
* Python would run psycopg import line which would check if postgres is
installed. Sites just wanting to chill w MariaDB would also need
Postgres to be installed to get Frappe running. Fixes https://github.com/frappe/frappe/issues/14193
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
These modules were imported from the ERPNext codebase into Frappe.
License header was overlooked at that point. These were contributed
initially by Frappe Technologies Pvt Ltd under GPLv3 (ERPNext's license) and now
we, as Frappe Technologies Pvt Ltd converting them to MIT to comply with
Frappe's license.
This is sort of a breaking change? Because if an int/dict/list/tuple was
passed instead of a str, object doesnt have .startswith (AttributeError)
would be raised instead of just returning None.
get_timedelta returns None in case of invalid or imparsable inputs. This
behaviour is consistent wrt other utils. The util, to_timedelta tries to
convert to timedelta objects only if str object is passed. It returns
the same object if not string, which is absurd...given its called
`to_timedelta`.
If ConnectionError or BusyLoadingError occurs, try every second for
up-to 10 times.
Why: `bench start` exits just as i run it at times. This happens when
the worker's processes each try to fetch a redis conn but redis isnt up
yet. The 3 workeer processes exit with 1 and our procman gives up too.
Cast the value to the Python native object of the Frappe fieldtype provided. If value is None, the first/lowest value of the `fieldtype` will be returned.
Mapping of Python types => Frappe types:
* float => ("Currency", "Float", "Percent")
* int => ("Int", "Check")
* datetime.datetime => ("Datetime",)
* datetime.date => ("Date",)
* datetime.time => ("Time",)
Deprecate frappe.utils.data.cast_fieldtype in favour of new util cast
which handles types "better"
Previously start was being type casted with int. That was reverted by refactoring query to use new Query Builder
This bug was introduced via ee3c84beef
Removed because causes unnecessary confusion. A queue called
"background" never existed it was commited by mistake while developing a
feature but that feature ended up not using it.
reference commit: e6adf91029
reference PR: https://github.com/frappe/erpnext/pull/26701
Due to previous logic, only tables under DocType table were allowed to
take partial backups. This change allows backup to be taken for
deprecated doctypes too.