Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

items as property or method #44

Closed
mauritsvanrees opened this issue May 4, 2016 · 0 comments
Closed

items as property or method #44

mauritsvanrees opened this issue May 4, 2016 · 0 comments

Comments

@mauritsvanrees
Copy link
Member

When I update the z3c.form version in Plone 5.1 (development) from 3.2.9 to 3.2.10, I get errors like this:

.../Products/CMFPlone/controlpanel/browser/syndication.py", line 43, in forceCheckboxValue
    for item in widget.items:
TypeError: 'instancemethod' object is not iterable

and this:

.../plone/app/contenttypes/migration/browser.py", line 402, in updateWidgets
    if not len(widget.items):
TypeError: object of type 'instancemethod' has no len()

This is caused by dd40f6f.

Before this change, the select browser view was the only one with items as method.
After this change, the orderedselect browser view is the only one with items as property.

It would be nicer if all were the same, but it's not clear which one it should be...
Can we compromise and update the changed radio and checkbox browser view to use their new methods but add an @property?

mauritsvanrees added a commit that referenced this issue Sep 16, 2016
For the select widget it was a method since 2.9.0.
For the radio and checkbox widgets it was a method since 3.2.10.
For orderedselect and multi it was always a property.

Fixes #44
mauritsvanrees added a commit that referenced this issue Sep 16, 2016
For the select widget it was a method since 2.9.0.
For the radio and checkbox widgets it was a method since 3.2.10.
For orderedselect and multi it was always a property.

Fixes #44
mauritsvanrees added a commit to plone/plone.app.z3cform that referenced this issue Sep 29, 2016
mauritsvanrees added a commit to plone/plone.app.z3cform that referenced this issue Sep 29, 2016
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 29, 2016
Branch: refs/heads/master
Date: 2016-09-29T13:14:41+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.z3cform@8251e0e

In select widget, accept items as property or method.

This avoids breaking on some z3c.form versions.
See zopefoundation/z3c.form#44

Files changed:
M CHANGES.rst
M plone/app/z3cform/widget.py
Repository: plone.app.z3cform
Branch: refs/heads/master
Date: 2016-09-29T16:06:14+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.z3cform@bb403e0

Merge pull request #49 from plone/select-widget-items-callable-master

In select widget, accept items as property or method.

Files changed:
M CHANGES.rst
M plone/app/z3cform/widget.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 29, 2016
Branch: refs/heads/1.x
Date: 2016-09-29T13:18:16+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.z3cform@3ed66a1

In select widget, accept items as property or method.

This avoids breaking on some z3c.form versions.
See zopefoundation/z3c.form#44

Files changed:
M CHANGES.rst
M plone/app/z3cform/widget.py
Repository: plone.app.z3cform
Branch: refs/heads/1.x
Date: 2016-09-29T16:06:41+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.z3cform@4ae827f

Merge pull request #50 from plone/select-widget-items-callable-1x

In select widget, accept items as property or method. [1.x]

Files changed:
M CHANGES.rst
M plone/app/z3cform/widget.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant