← Winnitude! Search  ·  Reader Mode (4014 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 72 LINKS

Expose serialization api by BadSingleton · Pull Request #2336 · pythonnet/pythonnet

Repository navigation

Expose serialization api - #2336


Merged
lostmsu merged 6 commits into pythonnet:master from BadSingleton:expose-serialization-api May 10, 2024
Merged

Expose serialization api #2336 lostmsu merged 6 commits into pythonnet:master from BadSingleton:expose-serialization-api

Conversation

BadSingleton commented Mar 7, 2024 · edited Loading



Copy link Copy Markdown
Contributor

Adds post-serialization and pre-deserialization hooks for additional customization.

What does this implement/fix? Explain your changes.

This PR supersedes #1892 , offer another workaround for issues #2335 #2221 #2282 , possibly others.

Does this close any currently open issues?

This addresses @lostmsu 's comments of exposing an API instead of adding functionality

Any other comments?

According to Unity dev answers on the Unity forums, they will implement a ring-link architecture as a replacement for domain load/unload. I have added no tests yet in this PR considering that domain load/unload is deprecated from a .NEt perspective.
https://forum.unity.com/threads/unity-future-net-development-status.1092205/page-34#post-8918231

This PR is made in my own name, I am no longer working at the company that signed the CLA for me.

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Ensure you have signed the .NET Foundation CLA
  • Add yourself to AUTHORS
  • Updated the CHANGELOG
BadSingleton added 2 commits February 6, 2024 15:47 Expose an API for users to specify their own formatter d7f31bf
Adds post-serialization and pre-deserialization hooks for additional
customization.
Add API for capsuling data when serializing aa37f89
* And revert the breaking change of the FormatterType removal
* Add CHANGELOG entry
BadSingleton mentioned this pull request Mar 7, 2024 Best effort serialization #1892 Closed 3 of 5 tasks filmor reviewed Mar 7, 2024
View reviewed changes

filmor commented Mar 12, 2024



Copy link Copy Markdown
Member

@lostmsu any notes?

lostmsu reviewed Mar 12, 2024
View reviewed changes

lostmsu commented Mar 12, 2024



Copy link Copy Markdown
Member

Add some tests.

BadSingleton added 2 commits March 17, 2024 11:05 Part one of review fixes 647c75c Adds tests for custom serialization 02158f3 BadSingleton commented Mar 29, 2024
View reviewed changes

lostmsu commented Mar 29, 2024 · edited Loading



Copy link Copy Markdown
Member

BTW, what's your interest in this functionality working?

Cause if there's none, I think we should consider just bumping version to 4.x and dropping domain reload support altogether.

Do you know anyone in Unity who stills works on it? There's been no communication for a while.

BadSingleton commented Mar 29, 2024 · edited Loading



Copy link Copy Markdown
Contributor

Author

BTW, what's your interest in this functionality working

Superseding/closing the previous PR. At this point, considering Unity's public plans, it's not unreasonable to drop this. Unity has their own fork with what was in the previous PR anyway.

Do you know anyone in Unity who stills works on it?

I think so. Last I knew of, another team had assumed maintaintership of the package. I'll be sending a few messages see if they are still at Unity/on those projects

Add NoopFormatter and fall back to it if BinaryFormatter is not avail... a058900
...able

filmor commented Apr 26, 2024 · edited Loading



Copy link Copy Markdown
Member

@lostmsu Any more comments? I took the liberty to implement your comments on the formatter factory.

P.S.: The current build failures are due to macos-14, I'll adjust the CI in another PR.

BadSingleton commented Apr 26, 2024



Copy link Copy Markdown
Contributor

Author

I'll be sending a few messages see if they are still at Unity/on those projects

To close the loop on this, the people I could get in touch with are no longer at Unity.

lostmsu requested changes Apr 28, 2024
View reviewed changes
Comment thread src/runtime/StateSerialization/RuntimeData.cs
Outdated
/// <param name="stream">A MemoryStream that contains the data to be placed in the capsule</param>
public static void StashSerializationData(string key, MemoryStream stream)
{
var data = stream.GetBuffer();
Use TryGetBuffer instead of GetBuffer 6e37568 lostmsu merged commit 32051cb into pythonnet : master May 10, 2024 dependabot
Bot
mentioned this pull request Jan 16, 2026 Bump pythonnet from 3.0.3 to 3.0.5 mattemangia/Deep3DStudio#99 Closed Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

4 participants