Commit graph

234 commits

Author SHA1 Message Date
Sambasiva Suda
642e9f4ec1
fix: search_link fails when txt contains parentheses (#22892)
* fix: search_link fails when txt contains parentheses

* fix: updating regex to replace number params also

* chore: replacing regex with sqlparse

* chore: not including fields like count(1) in asterisk_fields

* fix: owner/module not identified as column

* chore: lint fix and removing exception

* refactor: better function name

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-01-16 21:36:45 +05:30
Ankush Menat
d5b27061ad perf: avoid duplicate copies of result set
When as_list, as_dict is done we hold on to original result set until
next query is performed. This can be HUGE for large queries.
2024-01-15 12:32:07 +05:30
barredterra
504654e73f Merge remote-tracking branch 'upstream/develop' into drop-giturlparse 2024-01-14 16:49:01 +01:00
barredterra
a6d0969ebd chore: drop git-url-parse dependency 2024-01-14 16:47:25 +01:00
barredterra
cfae292d3e chore: bump dropbox 2024-01-14 15:41:37 +01:00
Ankush Menat
00f20f43c6
build: add setproctitle as dependency (#24007)
* build: add setproctitle as dependency

RQ and other tools use it to automatically set a useful proc title

* ci: print all bench logs after running tests

This can help reveal failures from background jobs etc
2023-12-28 20:50:27 +05:30
Akhil Narang
9a0a5468c5 feat: setup sentry integration
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>
2023-11-30 17:13:41 +05:30
Ankush Menat
21e8abf899
build: python 3.12 support (#22706)
* ci: use python 3.12

We'll use minimum versions on stable branch CI configs.

* build(deps): bump dependencies

- Some for v12 support
- some just for new stuff
2023-11-23 11:42:51 +05:30
David Arnold
0ff08e4e0f
build(python): restricted python goes up to 3.11 only (#23229) 2023-11-15 18:23:42 +05:30
Bernd Oliver Sünderhauf
888fc5fc55
build(deps): Update PyPDF to v3.17.0 (#23060) 2023-11-02 19:46:28 +05:30
Sagar Vora
c4cabbb11a
chore: bump werkzeug to 3.0.1 (#22945) 2023-10-27 16:47:26 +05:30
Ankush Menat
05d6f5cc8a test: Add cold start tests 2023-10-18 17:55:48 +05:30
Ankush Menat
1a563164d7
chore: bump gitpython again 2023-09-07 11:32:07 +05:30
Ankush Menat
cbc5f0b8db
build(deps): update python dependencies (#22294)
* build!: Remove pycryptodome dependencies

This is added for payments app, shouldn't be added here.

ref: https://github.com/frappe/frappe/pull/9955/

* build(deps): update many python dependencies
2023-09-02 12:10:13 +00:00
Ankush Menat
9e2a0384e0
build: bump gitpython (#22290) 2023-09-02 15:29:14 +05:30
Ankush Menat
cef0399fa3 build(deps): update RestrictedPython to latest version 2023-08-31 10:51:06 +05:30
Ankush Menat
4649c8dacf
build(deps): Bump gunicorn to latest version (#22086) 2023-08-17 11:11:01 +05:30
Ankush Menat
02e1311b3a build: pin typing_extensions to major version 2023-08-11 11:54:09 +05:30
Gavin D'souza
84f134a683
fix: Add "better" typing hints 2023-08-11 11:45:47 +05:30
Sagar Vora
b4629d8c02
chore: strictly pin responses to 0.23.1 to avoid pip conflicts (#21816) 2023-07-27 10:41:20 +05:30
Smit Vora
89b9b64a55
fix: installation error, cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (#21810)
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-07-26 15:00:04 +05:30
Suraj Shetty
6c509f6dd1
Merge pull request #21782 from blaggacao/bump-bleach 2023-07-25 18:21:31 +05:30
David Arnold
cf8a603dac
build(deps): update premailer 3.8.0 -> 3.10.0 (#21783) 2023-07-24 16:26:27 +05:30
David Arnold
8ff913b8ad
build(deps): update bleach 3.3.0 -> 6.0.0 2023-07-23 20:00:28 -05:00
Ankush Menat
03a582d7cd
build(deps): update pyyaml to 6.0.1 (#21728) 2023-07-19 11:41:17 +05:30
gavin
58fc6a2b94
build: Bump to stable Pydantic v2 2023-06-30 22:18:45 +05:30
gavin
faab26ce4f
Merge branch 'develop' into bump-pydantic-v2 2023-06-26 13:12:24 +05:30
Ankush Menat
0e84fdaa6c build: bump RQ 2023-06-25 17:43:11 +05:30
Ankush Menat
cbe8a41cff
build: Add responses as developer dependency (#21440)
Useful for mocking HTTP responses in tests
2023-06-20 19:50:51 +05:30
Ankush Menat
828490e01a chore: bump many more old packages 2023-06-10 20:47:27 +05:30
Ankush Menat
18e791a353 build(deps): PyPDF2 -> pypdf
closes https://github.com/frappe/frappe/issues/19861
2023-06-10 20:47:27 +05:30
Ankush Menat
8485ac5d62 build(deps): bump many dependencies
test: change code to adapt to new werkzeug client

fix: avoid setting charset

utf8 is default and assumed now by werkzeug, setting this manually is
deprecated.

fix: use string instead of bytes for setting headers

DeprecationWarning: Passing bytes as a header value is deprecated and will not be supported in Werkzeug 3.0.
12:23:34 web.1         |   response.headers["X-Page-Name"] = path.encode("ascii", errors="xmlcharrefreplace")
2023-06-10 20:47:27 +05:30
Raffael Meyer
ed3b764db9
build(deps): bump cryptography and pyOpenSSL (#21307)
cryptography to 41.0.1, pyOpenSSL to 23.2.0
2023-06-10 11:23:15 +05:30
Gavin D'souza
1a7b7a589b
build(deps): Bump Pydantic from v1 to v2 2023-06-07 17:03:59 +05:30
Sagar Vora
6065179080
chore: bump requests, chardet, and dropbox to latest versions (#21080)
* chore: bump `requests` and `chardet`

* chore: bump `dropbox` to `11.36.0`, ignore `GHSA-4xqq-73wg-5mjp` during pip-audit
2023-05-24 15:05:50 +05:30
Ankush Menat
f63c420798 feat: add python posthog library 2023-04-25 13:10:14 +05:30
Ankush Menat
0cab0b830d
refactor: replace imghdr with filetype (#20680)
* refactor: replace `imaghdr` with `filetype`

```
11:52:06 worker.1      | /home/ankush/benches/develop/apps/frappe/frappe/core/doctype/file/utils.py:2: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13
```

* feat: improved extension guessing using filecontent
2023-04-13 12:19:08 +05:30
Ankush Menat
c509983ca4 build: bump redis version
https://github.com/redis/redis-py/releases
2023-03-31 13:37:55 +05:30
Ankush Menat
024faff025
build: bump pymysql (#20478)
Actual fix for this bandaid fix: https://github.com/frappe/frappe/pull/20475

Keeping pymysql hard pinned until we have better way to get last full
query.
2023-03-28 13:04:27 +05:30
Ankush Menat
229dcb3c91
fix: pin pymysql to avoid breaking behaviour (#20475)
```
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 920, in get_default
    d = self.get_defaults(key, parent)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 936, in get_defaults
    defaults = frappe.defaults.get_defaults_for(parent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/defaults.py", line 222, in get_defaults_for
    .run(as_dict=True)
     ^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/query_builder/utils.py", line 85, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 264, in sql
    self.log_query(query, values, debug, explain)
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/mariadb/database.py", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?
```
2023-03-28 12:07:13 +05:30
Ankush Menat
48f63f53ab feat: configurable rounding methods 2023-03-08 10:44:44 +05:30
MouSoeng
a093f7d4b6
chore(py): upgrade babel 2.9.0 -> 2.12.1 (#20251) 2023-03-07 14:27:10 +05:30
Raffael Meyer
9f73b94a74
build(deps): bump cryptography to 39.0.1 (#20042)
Security fix: https://cryptography.io/en/latest/changelog/#v39-0-1
2023-02-15 14:59:36 +05:30
barredterra
3f528dac75 build(deps): bump ipython to 8.10.0
Minor security fix: https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#ipython-8-10
2023-02-15 00:44:37 +01:00
barredterra
92e684d4fc fix: use new source for zxcvbn 2023-01-24 14:07:34 +01:00
barredterra
8aa8ea0ee2 feat: bump zxcvbn version
zxcvbn 4.4.28 no longer crashes on long, random passwords.
2023-01-24 13:46:57 +01:00
Sagar Vora
0e40dff4d7
chore: bump gitpython to 3.1.30 (#19446) 2023-01-01 16:00:11 +05:30
Ankush Menat
ee9bfed4ec
Merge pull request #19029 from gavindsouza/runtime-type-checks-api
feat(whitelisted): Runtime typing hints validation
2022-12-19 15:46:49 +05:30
Ankush Menat
e0688f25a8
chore: pin markupsafe (#19348)
We depend on it for escaping. Currently this works because of indirect
dependencies:

```
λ pipdeptree -p MarkupSafe --reverse
MarkupSafe==2.1.1
  - Jinja2==3.1.2 [requires: MarkupSafe>=2.0]
    - frappe==15.0.0.dev0 [requires: Jinja2~=3.1.2]
  - Werkzeug==2.2.2 [requires: MarkupSafe>=2.1.1]
    - frappe==15.0.0.dev0 [requires: Werkzeug~=2.2.2]
```

[skip ci]
2022-12-19 15:37:28 +05:30
gavin
2c498910ba
Merge branch 'develop' into runtime-type-checks-api 2022-12-19 15:12:06 +05:30