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

Python: Consider to remove pre-write actions #374

Closed
mikir opened this issue Feb 18, 2022 · 1 comment
Closed

Python: Consider to remove pre-write actions #374

mikir opened this issue Feb 18, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request python Python language generator
Milestone

Comments

@mikir
Copy link
Contributor

mikir commented Feb 18, 2022

Consider to remove pre-write actions in Python to have write() method without any side effect.

Consider as well to extend Python runtime library by serialize() to call method initializeOffsets() automatically before serialization similarly as C++ does. This issue is a Python clone of #342.

@mikir mikir added enhancement New feature or request python Python language generator labels Feb 18, 2022
@mikir mikir modified the milestones: 2.5, 2.6 Feb 18, 2022
@mikir mikir modified the milestones: 2.6, Priority Backlog Apr 25, 2022
@mikir mikir modified the milestones: Priority Backlog, 2.7 May 6, 2022
@mikir mikir modified the milestones: 2.7, 2.8 Jun 30, 2022
@mikir mikir modified the milestones: 2.8, 2.9 Oct 14, 2022
@mikir
Copy link
Contributor Author

mikir commented Nov 1, 2022

The following can help to understand possibly compatibility problems in user Python applications which can be caused by this issue:

  1. Everywhere where application calls zserio write() method or where application passes zserio objects to API for serialization (pubsub, service, SQL table), the application must call initialize_offsets() method explicitly.
  2. Method initialize_offsets() can be called without bitposition parameter. This parameter is by default 0 now.
  3. Python runtime functions serialize(), serialize_to_bytes() and serialize_to_file() call now initiliaze_offsets() automatically.
  4. Python runtime function deserialize_bytes() has been renamed to deserialize_from_bytes() to be consistent.

@mikir mikir changed the title Consider to remove pre-write actions in Python Python: Consider to remove pre-write actions Nov 1, 2022
@mikir mikir self-assigned this Nov 1, 2022
@mikir mikir closed this as completed Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Python language generator
Projects
None yet
Development

No branches or pull requests

1 participant