- better boot config name
- send sentry after - because frappe namespce doesn't exist if it starts
first
- remove import in app.py because __init__ is always imported so no
need.
- leave telemetry JS always present, this is used even when telemetry is
not enabled.
Inspired primarily from sentry's generic WSGI integration
Environment variable `FRAPPE_SENTRY_DSN` needs to be enabled as well
as explicit opt-in from the user's side in system sid telemetry
settings
Conditionally include telemetry JS bundles
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* feat: Add custom icons with the `app_include_icons` hook
These custom icons are available on the desk only. They can be picked in the `ControlIcon` picker.
Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>
* fix: skip conf for including icons
* test: Fix test_include_icons
---------
Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
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
changes:
- compact boot info in /app HTML
/app size went from 451kb to 393kb - ~13% less
Verified that regex applied on this JSON aren't affecting perf, infact
found them to be faster with compact JSON.
- Send json string instead of placing JSON literal in code using Jinja.
JS takes more time to pass object literal than parsing a plain JSON string.
Overall content transfer size remains roughly same (albeit slightly
lower) since double escaping ends up adding extra `\` around quotes.
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
Converted all possible usages of re.* that weren't compiling the regex
separately and re-using it. Separated out the compiled patterns as
global variables. Repetitive patterns could be made DRY-er.
Would be nicer to have all regexes in a single module so that we could
re-use better, keep track of outdated, and keep checks for possible
reDos' etc
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.
* 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
Python 3 interprets string literals as Unicode strings, and therefore your \< and \> are treated as an escaped Unicode character.
Declare your RegEx pattern as a raw string instead by prepending r