You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.
Adding a metaclass causes partial properties to fail due to not passing all
arguments to property using the partial. Same functionality without even a
dummy metaclass works.
In the attached file contains a metaclass which controls which attributes are
available. Normally read from an external configuration file thus the use of
metaclasses to enforce the property list.
In the attached code uncommenting line 18 will cause it to fail with the
following error which basically indicates that the function is called but some
of the parameters were not passed along. Works fine in CPython 2.5,2.7,3.3
(with proper metaclass).
Its not clear if it is the property or partial which is the problem. Will try
to further isolate the issue.
Traceback (most recent call last):
File "test5.py", line 37, in <module>
TypeError: set_basic_attribute() takes exactly 3 non-keyword arguments (1 given)
Work Item Details
Original CodePlex Issue:Issue 34968 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Feb 10 at 4:08 AM Reported by: tfigment Updated on: Apr 29 at 11:11 PM Updated by: jdhardy
The issue seems to be related to how IronPython is trying to call the partial.Call method. The binding code path for builtin methods (partial is in C#) is complicated and difficult to trace. Why it's different with a metaclass than without I'm not sure.
When running in Debug mode it hits an Assert on L74 of Runtime\Microsoft.Dynamic\Actions\Calls\DefaultOverloadResolver.cs because there aren't the right number of arguments. Eventually it reaches partial.Call with arguments missing.
Adding a metaclass causes partial properties to fail due to not passing all
arguments to property using the partial. Same functionality without even a
dummy metaclass works.
In the attached file contains a metaclass which controls which attributes are
available. Normally read from an external configuration file thus the use of
metaclasses to enforce the property list.
In the attached code uncommenting line 18 will cause it to fail with the
following error which basically indicates that the function is called but some
of the parameters were not passed along. Works fine in CPython 2.5,2.7,3.3
(with proper metaclass).
Its not clear if it is the property or partial which is the problem. Will try
to further isolate the issue.
Work Item Details
Original CodePlex Issue: Issue 34968
Status: Active
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Feb 10 at 4:08 AM
Reported by: tfigment
Updated on: Apr 29 at 11:11 PM
Updated by: jdhardy
Plaintext Attachments
CodePlex Issue #34968 Plain Text Attachments
The text was updated successfully, but these errors were encountered: