gavin
0fe764c9b8
fix: Depend on replica details being there for Replica ConnectionPool
...
This logic mirror how replica connections are handled
2022-05-24 19:19:53 +05:30
gavin
aaef732581
fix!: Remove frappe.db.create_help_table
...
Help table has been deprecated for a while. It's safe to get rid of the
API too.
2022-05-24 19:19:53 +05:30
gavin
f021250308
refactor: Move connection & pool management out, inherit instead
2022-05-24 19:19:53 +05:30
gavin
993b935097
fix: Separate pool for replica setup
...
_SITE_POOLS[frappe.local.site].read_only will hold ConnectionPool for
replica database connections. _SITE_POOLS[frappe.local.site].default
will hold pool for connections that allow read+writes
2022-05-24 19:19:53 +05:30
gavin
363708d7f2
fix: frappe.conf.disable_database_connection_pooling
...
For the times you don't want to use pooling ;) Calling
get_connection/connect will close all pooled connections
for the current process / worker!
2022-05-24 19:19:53 +05:30
gavin
dae57d0de2
fix(db)!: Base methods should throw NotImplementedError
2022-05-24 19:19:53 +05:30
gavin
0d80f6ac52
feat: mariadb connection pooling
...
Start initial pool of 4 (_POOL_SIZE) connections for a given site. When
the pool is exhausted, generate new connections upon request and add
them to the pool. Max allowed size for each pool is 64 (_MAX_POOL_SIZE)
connections. However, you may have more than 64 active connections, just
that they won't be pooled but destroyed upon job completion/end of
request/similar cycle.
2022-05-24 19:19:53 +05:30
gavin
a17c978065
refactor!: frappe.db.get_database_list
...
* Drop mandatory unused arg in method call
* Use pluck instead of list comprehension + subscripting
2022-05-24 19:19:53 +05:30
gavin
756e385362
refactor: Move exception detection & abstraction in separate class
...
This change has only been done to separate and club only like methods /
utils together
2022-05-24 19:19:53 +05:30
gavin
1fe3624c43
fix: DB error detection API usage
...
* Make all methods static
* Add typing hints
* Don't safe fetch attribute value for errno - MariaDB exceptions if
raised will have errno attr in them. If the class doesn't have one,
it's not meant to be passed in these methods.
2022-05-24 19:19:53 +05:30
gavin
cac25f1229
feat(minor): Add support for for_update in get_last_doc
2022-05-24 19:19:53 +05:30
gavin
d3900485a6
refactor: Use mariadb client for creating connections
...
Move to use MariaDB's official Python client written in C instead of
the PyMySQL library. This change doesn't rid Frappe of the PyMySQL
library. Instead, it continues to utilize it for the ER module and
converter methods until the MariaDB library adds support for the same.
Ticket: https://jira.mariadb.org/projects/CONPY/issues/CONPY-203
2022-05-24 19:19:53 +05:30
Shariq Ansari
b44235587f
test: fixed failing UI test ( #16958 )
2022-05-24 13:17:21 +05:30
Ankush Menat
bfda3869a6
fix: delete email queue first ( #16968 )
...
email queue takes a long time and during that previously deleted tables
remain locked. Activity/Error logs are relatively faster to delete so
should moved last
2022-05-24 12:50:37 +05:30
gavin
026258360d
Merge pull request #16962 from alyf-de/german-translations-2022-05-23
...
feat: Add german translations
2022-05-24 11:24:57 +05:30
Florian HENRY
e41bad6066
feat: if only on email per user the preselect it in email form
2022-05-23 17:20:25 +02:00
barredterra
d83251ad47
feat: Add german translations
2022-05-23 16:51:12 +02:00
barredterra
88f65cdefb
feat: Add german translations
2022-05-23 16:01:42 +02:00
gavin
15af545acf
chore: Update typing + noqa - flake8 failures
2022-05-23 18:55:55 +05:30
Ankush Menat
c09d61f15f
fix: return found items from duplicate btn check ( #16959 )
...
Co-Authored-By: Suraj Shetty <surajshetty3416@gmail.com>
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2022-05-23 18:25:23 +05:30
gavin
6dedf899ff
Merge pull request #16899 from ChillarAnand/imports
...
refactor: Removed unused imports & added flake8 check in CI
2022-05-23 15:53:18 +05:30
Vladislav
65d96963ba
chore: update ru translate ( #16948 )
2022-05-23 13:18:40 +05:30
Sagar Vora
97df77f954
perf(translation): improve if condition to return all values except None ( #16953 )
2022-05-23 12:58:42 +05:30
Ankush Menat
fe8520a2bd
fix: duplicate buttons on desk ( #16941 )
2022-05-23 12:39:01 +05:30
Ankush Menat
d90d6536ef
perf: dont rebuild same translation dict
2022-05-22 22:54:23 +05:30
Shariq Ansari
d26b78dad6
fix: UI fixes ( #16946 )
2022-05-21 15:10:50 +05:30
chillaranand
6afe4809f2
refactor: Clean up setup file
2022-05-21 08:27:04 +05:30
Ankush Menat
6e53c3d339
fix: use reference to form instead of global var ( #16942 )
2022-05-20 15:11:01 +05:30
Suraj Shetty
bb91907fd0
fix(form): Use actual doctype of link intead of parent doctype
...
Due to this wrong doctype, Link Preview popover was not working as expected.
2022-05-20 11:02:28 +05:30
Ron Ulitsky
65b1474cad
Update importer.py
...
fixed bug that returned incorrect extensions for file paths with directories containing full stops
2022-05-19 14:29:36 -05:00
Ankush Menat
d667f169df
fix: Dashboard charts not loading ( #16921 )
...
* fix: field undefined in chart widget
* fix: check if email signature was returned
arrays are truthy empty array wont fail first check but fail with "can't
read signature of undefined"
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2022-05-19 18:11:13 +05:30
gavin
fcef38b185
Merge pull request #16932 from gavindsouza/db.query++
...
refactor: frappe.db.query
2022-05-19 18:07:01 +05:30
gavin
a20800ee2b
fix: mport module from line N shadowed by loop variable
...
Flake8 F402 reported by sider
2022-05-19 17:45:22 +05:30
gavin
db11af2a5c
feat(wip): Custom filters in db.query engine
...
* Added provision for semi-implemneted version
* Hard to fix it completely given it's broken on develop / desk
* Added TODO for adding nestedset related filters
2022-05-19 17:31:35 +05:30
Ankush Menat
e8657d52ed
fix: remove old test runner doc ( #16929 )
...
Not sure from where this ever came but on some old site it's present and
causes installation issue.
closes https://github.com/frappe/frappe/issues/16917
2022-05-19 15:50:33 +05:30
chillaranand
25f82e966c
refactor: Remove unused imports & code
2022-05-19 15:34:35 +05:30
chillaranand
1d763a6659
refactor: Fix flake8 issues
2022-05-19 15:34:35 +05:30
Shariq Ansari
70fae0b725
Merge branch 'develop' into quick-list-fix
2022-05-19 15:04:15 +05:30
Ankush Menat
fcb9597f88
fix: make error log reference fields read only
2022-05-19 15:02:43 +05:30
Shariq Ansari
3a2cd2650e
test: fixed failing UI test
2022-05-19 15:00:54 +05:30
Shariq Ansari
da999a9727
chore: used variable for better code visibility
2022-05-19 13:07:47 +05:30
Shariq Ansari
58df70fc00
fix(minor): ui tweaks & override workflow status
2022-05-19 12:53:41 +05:30
Suraj Shetty
e9e839af01
fix: Use duration field and update fieldname for reset password link expiry
2022-05-19 10:30:02 +05:30
Suraj Shetty
eb70f0aa9a
Merge branch 'develop' into develop
2022-05-19 09:25:00 +05:30
Ritwik Puri
20d73cae24
fix: allow guests/users without desk access to upload text files ( #16920 )
...
* fix: allow guests/users without desk access to upload text files
* chore: update error message
Co-authored-by: Shariq Ansari <30859809+shariquerik@users.noreply.github.com>
2022-05-18 17:39:44 +05:30
gavin
72ad582b8a
fix(db.query): Casefold key to match operators
2022-05-18 16:59:53 +05:30
gavin
5ebaf42468
feat(db.query): Add support for timespan operator
2022-05-18 16:59:10 +05:30
gavin
7c77bedbf2
refactor: Simplify logic + Add typing hints
2022-05-18 16:57:54 +05:30
Shariq Ansari
176518ed2c
fix: Mandatory field bad UX ( #16919 )
...
Mandatory fields are highlighted red on page load. It should only highlight if we save the document.
**Before:** Form
https://user-images.githubusercontent.com/30859809/168791201-049c1de2-b7f5-4dff-bf40-093ff96d4510.mov
**After:** Form
https://user-images.githubusercontent.com/30859809/168791164-45e2289b-2d2c-4ebb-8b4d-cd2932140572.mov
**Before:** Dialog
https://user-images.githubusercontent.com/30859809/168791207-800ba9e5-b4eb-419f-8a99-f94916c21c79.mov
**After:** Dialog
https://user-images.githubusercontent.com/30859809/168791210-f2761d23-3a60-40c2-8aff-2d2cebbd77fa.mov
Resolves https://github.com/frappe/frappe/issues/16866
2022-05-18 09:57:49 +00:00
Suraj Shetty
31d6b0a513
fix: Check if email account exists before picking signature
...
(cherry picked from commit 2e5bd71d95c1ab2d5d089945da6065b1a059ae59)
2022-05-18 09:43:35 +00:00