Fixes an error with pydyf
```
File "env/lib/python3.11/site-packages/weasyprint/document.py", line 399, in write_pdf
pdf = generate_pdf(self, target, zoom, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/weasyprint/pdf/__init__.py", line 120, in generate_pdf
pdf = pydyf.PDF((version or '1.7'), identifier)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: PDF.__init__() takes 1 positional argument but 3 were given
```
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Breaks console sometimes, don't see as much value TBH
```
Traceback (most recent call last):
File "/Users/mihirkandoi/Developer/frappe-develop/apps/frappe/frappe/utils/bench_helper.py", line 48, in invoke
return super().invoke(ctx)
~~~~~~~~~~~~~~^^^^^
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/mihirkandoi/Developer/frappe-develop/apps/frappe/frappe/commands/__init__.py", line 28, in _func
ret = f(ctx.obj, *args, **kwargs)
File "/Users/mihirkandoi/Developer/frappe-develop/apps/frappe/frappe/commands/utils.py", line 646, in console
from IPython.terminal.embed import InteractiveShellEmbed
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/IPython/__init__.py", line 53, in <module>
from .core.application import Application
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/IPython/core/application.py", line 26, in <module>
from IPython.core import release, crashhandler
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/IPython/core/crashhandler.py", line 27, in <module>
from IPython.core import ultratb
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/IPython/core/ultratb.py", line 111, in <module>
from IPython.core import debugger
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/IPython/core/debugger.py", line 122, in <module>
from pdb import Pdb as OldPdb
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/_pdbpp_path_hack/pdb.py", line 5, in <module>
exec(compile(f.read(), pdb_path, 'exec'))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mihirkandoi/Developer/frappe-develop/env/lib/python3.13/site-packages/pdb.py", line 28, in <module>
__version__ = fancycompleter.LazyVersion('pdbpp')
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'fancycompleter' has no attribute 'LazyVersion'
module 'fancycompleter' has no attribute 'LazyVersion'
```
* fix: Skip rollback if no DB
* fix: drop proctitle from dependency
- While it improves our own processes, it makes gunicorn process titles worse
- It also crashes on mac because of some unknown reason related to fork-safety.
Best to not use this.
* feat: mysqlclient
* fix: update error attrs
* fix: decode mogrified query to unicode
* fix: do some cleanup
* chore: disable cleanup for now
* fix: remove unnecessary call to as_unicode
* test: skip perf test for now
* fix: fallback to empty str
* fix: unbuffered cursor support
* fix: update converters and other changes
* fix: add cleanup back
* perf: improve timedelta converter
* fix: dont attempt to run query when explain flag is set
* test: cleanup tests
* chore: remove commented code
* perf: store conf as local var
* chore: ensure sequence
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
The phonenumber library was updated from version 8.13.13 to 8.13.55 to address an issue where new Guyanese (GY) phone numbers starting with +592 7 were being incorrectly marked as invalid. Previously, only numbers starting with +592 6 were recognized. This change ensures that users can now correctly submit phone numbers with the updated format in forms.
* perf: faster `LocalProxy`
* refactor: use callable style local
* test: add some tests for local proxy override
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
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