Open
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
latest commit 3d3dde
Component(s)
Python
Minimal reproduce step
-
Run the Java test case
testEnumField
inorg.apache.fury.CrossLanguageTest
-
The test attempts to execute the Python counterpart using:
python -m pyfury.tests.test_cross_language test_enum_field [path]
- The Java side fails with an assertion error, and the Python side fails with an AttributeError.
What did you expect to see?
The cross-language enum field serialization test should pass successfully, with the Java side correctly validating that the serialized data matches the expected result.
What did you see instead?
- Java test failure:
[ERROR] testEnumField(org.apache.fury.CrossLanguageTest) Time elapsed: 0.655 s <<< FAILURE!
java.lang.AssertionError: expected [true] but found [false]
at org.apache.fury.CrossLanguageTest.structRoundBack(CrossLanguageTest.java:534)
at org.apache.fury.CrossLanguageTest.testEnumField(CrossLanguageTest.java:793)
- Python error:
AttributeError: 'pyfury._serialization.ClassInfo' object has no attribute 'namespace'
The error occurs in the Python deserializer when processing enum fields. The specific error path is:
File "D:\projects\fury_dev\fury\python\pyfury\_struct.py", line 263, in visit_customized
classinfo.namespace + classinfo.typename
^^^^^^^^^^^^^^^^^^^
AttributeError: 'pyfury._serialization.ClassInfo' object has no attribute 'namespace'
This suggests that the ClassInfo
object in the Python implementation is missing the namespace
attribute that is being referenced in the code, causing cross-language enum field serialization to fail.
Anything Else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!