You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "chaokunyang (via GitHub)" <gi...@apache.org> on 2025/06/03 02:05:48 UTC
[I] [Python] unifiy ComplexObjectSerializer and DataClassSerializer [fury]
chaokunyang opened a new issue, #2283:
URL: https://github.com/apache/fury/issues/2283
### Feature Request
unifiy ComplexObjectSerializer and DataClassSerializer:
- remove ComplexObjectSerializer
- Make DataClassSerializer support both python native and xlang serializaiton
### Is your feature request related to a problem? Please describe
_No response_
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Python] unifiy ComplexObjectSerializer and DataClassSerializer [fory]
Posted by "esafak (via GitHub)" <gi...@apache.org>.
esafak commented on issue #2283:
URL: https://github.com/apache/fory/issues/2283#issuecomment-3055542330
Does it not already use codegen via [#509](https://github.com/apache/fory/pull/509)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] [Python] unifiy ComplexObjectSerializer and DataClassSerializer [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #2283:
URL: https://github.com/apache/fory/issues/2283#issuecomment-3055306583
We still needs to support codegen for DataClassSerializer, other parts are implemented now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] [Python] unifiy ComplexObjectSerializer and DataClassSerializer [fory]
Posted by "esafak (via GitHub)" <gi...@apache.org>.
esafak commented on issue #2283:
URL: https://github.com/apache/fory/issues/2283#issuecomment-3054041998
I think this is implemented by #2389 and #2395
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] [Python] unifiy ComplexObjectSerializer and DataClassSerializer [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #2283: [Python] unifiy ComplexObjectSerializer and DataClassSerializer
URL: https://github.com/apache/fory/issues/2283
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] [Python] unifiy ComplexObjectSerializer and DataClassSerializer [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #2283:
URL: https://github.com/apache/fory/issues/2283#issuecomment-3055745043
no, it didn't use codegen for xlang:
```python
if self._xlang:
self._serializers = [None] * len(self._field_names)
visitor = ComplexTypeVisitor(fory)
for index, key in enumerate(self._field_names):
# Changed from self.fory.infer_field to infer_field
serializer = infer_field(key, self._type_hints[key], visitor, types_path=[])
self._serializers[index] = serializer
self._serializers, self._field_names = _sort_fields(fory.type_resolver, self._field_names, self._serializers)
self._hash = 0 # Will be computed on first xwrite/xread
if self.fory.language == Language.PYTHON:
import logging # Import here to avoid circular dependency
logger = logging.getLogger(__name__)
logger.warning(
"Type of class %s shouldn't be serialized using cross-language serializer",
clz,
)
else:
# TODO compute hash for non-xlang mode more robustly
self._hash = len(self._field_names)
self._generated_write_method = self._gen_write_method()
self._generated_read_method = self._gen_read_method()
if _ENABLE_FORY_PYTHON_JIT:
# don't use `__slots__`, which will make instance method readonly
self.write = self._generated_write_method
self.read = self._generated_read_method
```
Xlang mode doesn't invoke `_gen_write_method/_gen_read_method`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org