1. It's severly outdated and free version isn't that accurate to begin
with.
2. I replaced country detection using timezone a long time ago: c8ec528aa7/frappe/desk/page/setup_wizard/setup_wizard.js (L664-L676)
This is good enough for setup wizard for most popular countries. Use
IP-API if you need better guarantees (we have a license).
This adds request timeouts for gthread workers.
`gunicorn` repo isn't that active and this issue has been brought up
multiple times so I don't think it's gonna get fixed upstream. This is
our last resort.
RESP3 has PUSH support which is useful for implementing client side
caching. Enabling this before I work on that to test if anything breaks
with this.
No need to do this for background jobs instance just yet, infrequent
accesses and performance doesn't matter as much.
* feat: Add bench layout classes and configuration handler
Bench layout: (`frappe.bench`)
- Layout by env variable, e.g. FRAPPE_BENCH_PATH, FRAPPE_SITES_PATH, etc
- Detecting modules and apps by the presence of a sentinel .frappe file
- Site is scoped by frappe.local.site_name (thread safe)
Config handler: (`frappe.bench.sites{,.site}.config`)
- Optional config registry for better discovery; warning if not specced
- Env variable overload with `FRAPPE_` prefix
* chore: type frappe.config
* chore: type frappe.bencher
* chore: py310 compat
* chore(typing): type filters
* chore(typing): type filters for get_list et al
* fix: dashboard chart filter expression
* test: fix case with new-style right hand object to equality check
* chore: place new typed filter under typing verification
* chore: remove debug print statment
* chore: inverse logic of type guard
* fix: add float to filter value types
* chore: clarify value naming
* chore: python3.13 support
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* chore: bump pydantic
```
error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
= help: please check if an updated version of PyO3 is available. Current version: 0.21.2
= help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
```
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* chore: bump uuid-utils
https://katb.in/ahaqabugefo
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* chore: bump RestrictedPython
7.4 has support for py3.13
https://restrictedpython.readthedocs.io/en/latest/changes.html#id1
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* fix(deprecation_dumpster): import functools uncondtionally
Used here: 60f0b1d5c7/frappe/deprecation_dumpster.py (L177C10-L177C19)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* chore(docref): improve error message
* fix: error on unability to hash; TypeError expected
* fix: migrate from 3.10 onwards
---------
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: David <dgx.arnold@gmail.com>
* test: fix universal type checker based on downstream use and more testing
* fix: type validation error reporting
* fix: types; various
* chore: switch off test-time type checking
still too many errors
weasyprint had a loose requirement of >=0.6.0 earlier
pydyf changed their constructor in 0.11.0
Later versions of weasyprint would work (they did pin their
dependencies, but there's still a conflict due to `bleach[css]`
The conflict is caused by:
weasyprint 62.3 depends on tinycss2>=1.3.0
bleach[css] 6.0.0 depends on tinycss2<1.2 and >=1.1.0; extra == "css"
For now, pinning this is the simplest solution until we upgrade other
packages as well
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* build: Bump RQ
Latest version simplifies workerpool extension a bit
* fix: Disable RQ's scheduler
It's now enabled by default with no easy way to disable it except
upstream change or overriding the run_worker method. So better to
disable it with custom worker class.
- Regex incorrectly fetches .print-format's child styles and also extracts the wrong attribute value
- A CssParser is more maintainable and more readable as well as less prone to errors while extracting values
- Method: We extract style tag contents out of the html and tokenize them. We then filter the styles for the right selector and extract the attributes we want from them.
- This way we make sure that the right value is extracted and only the ones applicable to .print-format directly