setup.py is maintained so that there is no hard dependency on bench
v5.11.0 and people get enough time to update their CLI. Hope the TODO
adds a subtle reminder for the future ;)
A field like 'count(`tabBOM Update Log`.name) as total_count' split by
whitespace loses it's meaning. Tried splitting it meaningfully but
didn't get the point of this tbh and stopped. I'm not sure what the code
before was trying to do and with what set of inputs.
Imagine the following fields: [count(`tabBOM Update Log`.name) as
total_count, `tabBOM Update Log`.name as update_name, `tabBOM Update
Log`.name, `tabBOM Update as Log`.name, tabBOM.name, name], I couldn't
see what the previous check was trying to protect - hence, didn't add
any equivalent functionality.
There was an attempt to switch to declarative setup, which was to use
setup.cfg. However, we've made more progress in the "world of packaging"
since. Also, given we're using a pyproject file already to govern
certain aspects of our project maintenance, it's probably a good time to
bring these things together. bye-bye to clutter and confusion in
maintaining multiple files and formats.
We've used setuptools to package frappe for the longest time. Maybe
since the first editable installation. Howver setuptools doesn't support
PEP 660 yet which supports editable installs via pyproject file.
So why now? Primarily because I wanted to start tracking system
dependencies for Frappe. Doing so through pyproject file made the most
sense. This change seemed to be the obvious pre-requisite for the
upcoming changes to our packaging systems.
Sys deps tracking: https://github.com/frappe/frappe/issues/13811
Flit docs: https://flit.pypa.io/en/latest/pyproject_toml.html
Previous attempt: https://github.com/frappe/frappe/pull/10773
Which build tool: https://stackoverflow.com/a/69711730/10309266
PEP 660: https://peps.python.org/pep-0660/
* Cast single's values as their fieldtypes before returning
* Support previously dead debug parameter
* Consider single with no meta as non-existent; skip query
Decided to go ahead with the breaking change given the nature of the
existing usages of get_singles_dict :crie:
Improves performance 3x - from 0.047s to 0.017s
* Use frappe.get_*_settings to query table once
* Use cached LDAP Settings' document via get_ldap_client_settings
* Use single get_all to query all Social Login providers and related
data
* Skip provider if client_secret doesn't exist