You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "urlyy (via GitHub)" <gi...@apache.org> on 2025/06/02 07:52:47 UTC

[PR] feat(python): support xlang metashare [fury]

urlyy opened a new pull request, #2278:
URL: https://github.com/apache/fury/pull/2278

   ## What does this PR do?
   Prepare to implement xlang metashare encode&decode in pyfory. Now finish `field_info` and `type_info(TypeDef)`. And I will continue to finish type_resolver for registry.
   
   other small change:
   - Add `Buffer::write_uint8` for writing 1 byte header.
   - Add metastring encoding options for field_name and namespace metastring encode.
   
   ## Some Question
   - Still confused about naming. For me, I want to change all `class_` prefix to `type_`, like `class_info -> type_info`, `class_resolver -> type_resolver`. So it will be unified. 
   - There is not `writeVarUint32Small7` in pyfury cython. Now I use `write_varuint32`. Should I add this function?
   - Now I just finish the xlang TypeDefMeta specification. As the java version is too complex to imitate, I use my way to implement this: not use outer Encoder/Decoder/Resolver class, just implement the  `xread/xwrite` logic in `type_info/field_info` class. If this is not good, I will rewrite this part.
   
   
   ## Related issues
   #2160
   
   
   ## Does this PR introduce any user-facing change?
   WIP
   
   - [ ] Does this PR introduce any public API change?
   - [ ] Does this PR introduce any binary protocol compatibility change?
   
   ## Benchmark
   
   TODO


-- 
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

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: [PR] feat(python): support xlang metashare (WIP) [fory]

Posted by "pandalee99 (via GitHub)" <gi...@apache.org>.
pandalee99 commented on PR #2278:
URL: https://github.com/apache/fory/pull/2278#issuecomment-3175146383

   @urlyy Hi, are you considering continuing to implement this PR?


-- 
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: [PR] feat(python): support xlang metashare (WIP) [fury]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on code in PR #2278:
URL: https://github.com/apache/fury/pull/2278#discussion_r2123150501


##########
python/pyfory/meta/meta_share.py:
##########
@@ -0,0 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from enum import IntEnum
+
+class CompatibleMode(IntEnum):
+    SCHEMA_CONSISTENT = 1
+    COMPATIBLE = 2
+
+class MetaContext:

Review Comment:
   We'd better to put this class in _serialization.pyx for better performance



-- 
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

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: [PR] feat(python): support xlang metashare (WIP) [fury]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on PR #2278:
URL: https://github.com/apache/fury/pull/2278#issuecomment-2934175550

   It would be great if we could change all class_ prefix to type_, like class_info -> type_info, class_resolver -> type_resolver. This will make the code more clean. How about opening another PR for this? After that PR is merged, we could merge from main branch again to resovle the conflicts


-- 
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

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: [PR] feat(python): support xlang metashare (WIP) [fury]

Posted by "urlyy (via GitHub)" <gi...@apache.org>.
urlyy commented on PR #2278:
URL: https://github.com/apache/fury/pull/2278#issuecomment-2934316097

   > It would be great if we could change all class_ prefix to type_, like class_info -> type_info, class_resolver -> type_resolver. This will make the code more clean. How about opening another PR for this? After that PR is merged, we could merge from main branch again to resovle the conflicts
   
   ok


-- 
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

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: [PR] feat(python): support xlang metashare (WIP) [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed pull request #2278: feat(python): support xlang metashare (WIP)
URL: https://github.com/apache/fory/pull/2278


-- 
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: [PR] feat(python): support xlang metashare (WIP) [fory]

Posted by "urlyy (via GitHub)" <gi...@apache.org>.
urlyy commented on PR #2278:
URL: https://github.com/apache/fory/pull/2278#issuecomment-3176237534

   > @urlyy Hi, are you considering continuing to implement this PR?
   
   Sorry😢, I've been a bit busy these days, and the PR is a bit troublesome for me. I don't think I'll continue working on this PR.


-- 
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