py4web version 20250915.1 is OUT

71 views
Skip to first unread message

Massimo DiPierro

unread,
Sep 16, 2025, 1:25:01 AM (13 days ago) Sep 16
to py4web
It contains mostly bug fixes.
Thanks dgmanns and laundomo and Lucas for your tests and suggestions.

Jacinto Parga

unread,
Sep 19, 2025, 6:56:45 AM (10 days ago) Sep 19
to py4web
This version gives me bugs with widgets. No backward compatibility

Tom Clerckx

unread,
Sep 19, 2025, 8:32:11 AM (10 days ago) Sep 19
to py4web
Some things seem broken. I was also testing a few things concerning widgets.

First error: clone() function fails
MyStyle = FormStyleDefault.clone()
Error: TypeError: cannot pickle '_thread._local' object

Second error:
I tried the widget functionality. 
Since MyStyle = FormStyleDefault.clone() gave me the above error, I just use the class itself.

@action("index")
@action.uses("index.html", auth, T)
def index():
table=db.thing
grid=Grid(table)
MyStyle = FormStyleDefault
MyStyle.widgets['name'] = MyCustomWidget
return dict(grid=grid, form_style=MyStyle)

Error:
  File "/home/tclerckx/.pyenv/versions/3.12.3/envs/3.12.3-py4web-test/lib/python3.12/site-packages/py4web/utils/form.py", line 777, in __call__
    wrapped, html = widget.form_html(readonly=is_readonly)
TypeError: Widget.form_html() missing 1 required positional argument: 'self'

Massimo DiPierro

unread,
Sep 19, 2025, 10:44:42 AM (10 days ago) Sep 19
to Jacinto Parga, py4web
Thanks for reporting. Will look into this asap and will fix it 

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/py4web/d2ec9223-02cd-4aea-863e-4798b471518an%40googlegroups.com.

Massimo DiPierro

unread,
Sep 21, 2025, 2:39:10 AM (8 days ago) Sep 21
to py4web
Unfortunately we have no tests about custom widgets. It would help a lot to see see more examples that break with custom widgets

Massimo DiPierro

unread,
Sep 21, 2025, 2:41:08 AM (8 days ago) Sep 21
to py4web
The backward incompatible change is this commit b2e7174c0a7e4ff17d65cb93aa48e57251d8228b. Need some transition rules or partially revert for backward compatibility. 

Massimo DiPierro

unread,
Sep 22, 2025, 2:51:37 AM (7 days ago) Sep 22
to py4web
I posted version 1.20250921.1 which reverts the incompatible widgets change b2e7174c0a7e4ff17d65cb93aa48e57251d8228b We can discuss this on a different thread

laundmo

unread,
Sep 22, 2025, 8:41:54 AM (7 days ago) Sep 22
to py4web
Hello everyone, mainly Jacinto Parga and Tom Clerckx

I'm the author of the widgets change which caused you issues. Could you please share the details of the issues it caused for you over in this new thread: https://groups.google.com/g/py4web/c/Y-1cN-d48eY

laundmo

unread,
Sep 22, 2025, 9:10:09 AM (7 days ago) Sep 22
to py4web
I've looked into the issues you, Tom Clerckx,  were having 

Regarding: Error: TypeError: cannot pickle '_thread._local' object
This error is likely some form of issue with your own usage of FormStyleDefault. My widgets refactor, which is what Massimo reverted, did not change the implementation of FormStyleDefault.clone() at all, and it works without issue in a app which does not modify FormStyleDefault.
Is it possible you updated it in some way which adds a _thread._local object? I cannot reproduce this error when testing on 1.20250915.1

Regarding: TypeError: Widget.form_html() missing 1 required positional argument: 'self'
This is an oversight in my widgets refactor: i forgot to update a part of the code dealing with those kinds of field-specific widgets to instantiate the widget.
My intention was that you pass a class if it's a new Widget subclass, and an instance for backwards compatibility with the older widgets.

Unless Jacinto Parga has some other errors, i'll fix this and re-do the PR.
Reply all
Reply to author
Forward
0 new messages