Commit graph

136 commits

Author SHA1 Message Date
David Arnold
fef569e284
refactor: simplify bencher (#28694)
* chore: flatten bencher class layout

* chore: rename bencher to clarify

* docs: add file level docstrings
2024-12-07 14:10:03 +00:00
David Arnold
3d71f594d8
refactor: bench class inauguration (#28158)
* 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
2024-12-06 19:07:34 +01:00
David Arnold
75377aaaf5
refactor(typing): type filters (#28218)
* 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
2024-12-04 23:18:53 +00:00
David Arnold
d3cbd2d4be
fix: type narrowing (#28673) 2024-12-04 16:58:37 +00:00
Akhil Narang
a390992408
chore: python3.13 support (#28624)
* 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>
2024-12-04 15:35:06 +00:00
Akhil Narang
df584ab891
chore: bump ruff
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-04 13:17:59 +05:30
David Arnold
e2a8c7fed3
test: fix universal type checker based on downstream use and more testing (#28619)
* 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
2024-11-28 23:35:32 +01:00
David Arnold
9edd44de01
ci: this adds universal runtime typechecking during tests to test runners (#28554)
* ci: this adds universal runtime typechecking during tests to test runners

* ci: add configuration options for test-time type checking
2024-11-28 15:11:30 +00:00
David Arnold
9ed08706a2
ci: make db-migration arifact part of the workflow inputs (#28604)
* ci: make db-migration arifact part of the workflow inputs

* ci: chore cleanup

* ci: introduce
2024-11-27 21:18:20 +01:00
David Arnold
894c7d871c
ci: prepare shared action for concrete downstream use (#28572)
* ci: cleanup setup action

* ci: make migration & setup downstream-ready

* ci: replace obscure bench remove-app with an equivalent rm -rf
2024-11-26 17:11:08 +00:00
Akhil Narang
076cefc09a
chore(deps): bump Pillow
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-11-22 16:24:02 +05:30
Akhil Narang
e4b7c89910
chore(deps): bump redis and hiredis
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-11-22 16:14:14 +05:30
David Arnold
46a0814287
chore: start with type checking (#28190) 2024-10-24 21:56:25 +00:00
David Arnold
8d6f8bce01
chore(typing): add some more typing to frappe.__init__ (#28215) 2024-10-21 11:30:11 +00:00
David Arnold
93d25424b8
build: pin node version to release-tested version 20 (#28201) 2024-10-20 18:24:39 +00:00
David Arnold
085d2b7803
feat: declare system dependencies for frappix (#28197) 2024-10-20 16:34:04 +00:00
David
f2b42b6d5c
chore: also improve the pdb test mode 2024-09-13 17:07:04 +02:00
Akhil Narang
4eac35081c
Merge pull request #26395 from barredterra/address-autocomplete
feat: address autocomplete dialog
2024-09-06 15:04:01 +05:30
Akhil Narang
6a7302e594
chore(deps): bump cryptography
(and `pyOpenSSL` to go along with it)

`pip-audit` is complaining about this
Resolves https://github.com/advisories/GHSA-h4gh-qq45-vh27

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-09-04 17:02:05 +05:30
Raffael Meyer
81b8b84b64
chore: bump pycountry to v24.6.1 2024-08-28 16:48:01 +02:00
Raffael Meyer
594b0a2536
Merge branch 'develop' into address-autocomplete 2024-08-28 11:14:43 +02:00
Rushabh Mehta
398657c7fa fix(minor): test 2024-08-14 16:13:57 +05:30
Rushabh Mehta
1d678146a9 fix(styles): cleaner sidebars for list and form 2024-08-14 16:13:57 +05:30
Raffael Meyer
e57ca79783
feat: flesh out boilerplate for script report (#27301) 2024-08-08 11:32:56 +02:00
Akhil Narang
7ffe82956d
chore(deps): pin pydyf to 0.10.0
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>
2024-07-17 14:14:05 +05:30
Raffael Meyer
55e71031e6
chore: bump boto3 to 1.34.143 (#27094) 2024-07-12 19:18:11 +02:00
barredterra
f6c4c94f70 feat: add HERE as geolocation provider 2024-06-22 15:40:11 +02:00
barredterra
b53203e14c feat: download Contact as vCard 2024-06-16 17:49:16 +02:00
Ankush Menat
148b3f771d
build: bump RQ to latest (#26576)
* 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.
2024-05-27 13:54:34 +00:00
Ankush Menat
433e7281f7 feat: make running scheduler with worker optional 2024-05-27 12:14:15 +05:30
dependabot[bot]
ba199f8e4b
--- (#26520)
updated-dependencies:
- dependency-name: pymysql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 12:06:04 +05:30
Ankush Menat
1b025c76da
build: Bump requests (#26501)
Minor security issue, not really used by us this way afaik.
2024-05-21 07:59:18 +00:00
Ankush Menat
5ca14bb171 feat: FC specific update notifications 2024-05-04 15:08:34 +05:30
Ankush Menat
723e557da7
build: bump gunicorn (#25980)
https://github.com/benoitc/gunicorn/releases/tag/22.0.0
2024-04-17 10:44:53 +05:30
barredterra
708e10552c chore: bump sql_metadata to 2.11.0 2024-04-16 17:11:03 +02:00
barredterra
733a7fe6f8 chore: bump sqlparse to v0.5.0 2024-04-16 16:56:54 +02:00
barredterra
53bd1a85d1 chore: bump pydantic to v2.7.0 2024-04-16 16:53:41 +02:00
Ankush Menat
e055d2742a
build(deps): bump pillow again (#25827)
GHSA-44wm-f244-xhp3
2024-04-06 12:49:06 +00:00
Ankush Menat
6c79a13641 feat: UUID naming support 2024-03-29 19:02:28 +05:30
marination
5dbcbbb915 fix: Use CssParser to correctly pass options to wkhtmltopdf
- 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
2024-03-26 10:33:35 +01:00
Ankush Menat
ea193ecd48 Revert "Revert "fix: search_link fails when txt contains parentheses (#22892)""
This reverts commit c0cf13b8e8.
2024-03-20 12:29:57 +05:30
barredterra
031d227542 chore: specify typing models for ruff
Resolves #25313
2024-03-10 20:41:05 +01:00
Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
Akhil Narang
fbb0e44791
ci: switch to ruff for linting
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 16:38:41 +05:30
Akhil Narang
679287a4fd
chore(deps): bump pyopenssl to match
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-06 10:35:53 +05:30
Akhil Narang
ddcf654423
chore(deps): bump cryptography
https://github.com/advisories/GHSA-3ww4-gg4f-jr7f

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-06 10:29:53 +05:30
Ankush Menat
b418dba7ae ci: migrate from isort to ruff 2024-02-05 18:53:33 +05:30
Ankush Menat
2cdbf54e8d ci: migrate from forked black to ruff-format 2024-02-05 18:35:55 +05:30
Ankush Menat
7504ccaca8 fix: Pin pypika
We've multiple monkey patched changes, we can't rely on loose pinning.
2024-02-05 16:45:48 +05:30
jll-02
12a246d697
chore(deps): removes unused cariocffi dependency 2024-02-01 08:15:00 +01:00