GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use the BinaryFormatter only on .NET FW and Mono by filmor · Pull Request #2470 · pythonnet/pythonnet

Conversation

@filmor

@filmor filmor commented Oct 1, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Should fix #2469

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@filmor
filmor force-pushed the fix-binaryformatter-usage branch from b696f83 to 4ccde5b Compare October 27, 2024 12:46
lostmsu
lostmsu approved these changes Oct 28, 2024
View reviewed changes

@lostmsu lostmsu left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good, but I'd like NITs to be fixed and the commit squashed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/embed_tests/StateSerialization/MethodSerialization.cs
using var buf = new MemoryStream();
var formatter = RuntimeData.CreateFormatter();

if (formatter == null)

@lostmsu lostmsu Oct 28, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to make the whole test class [Obsolete] to prevent warnings

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@filmor filmor Oct 28, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, for the time being, we still by default support this functionality on .NET FW and Mono. Which warning are you referring to?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@lostmsu lostmsu Nov 5, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obsolete code warning that comes from using BinaryFormatter. You can see it on GitHub review page.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/runtime/StateSerialization/RuntimeData.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/runtime/StateSerialization/RuntimeData.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@filmor
filmor force-pushed the fix-binaryformatter-usage branch from 4ccde5b to 1c0afe6 Compare October 28, 2024 07:52
@filmor

filmor commented Oct 28, 2024

Copy link
Copy Markdown
Member Author

Well, without the stashing, Shutdown+Initialize cycles are broken. This is going to be a lot more work than anticipated.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lostmsu

lostmsu commented Oct 28, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

We could consider dropping the support for Shutdown/Initialize for .NET Core+. I don't know if there are any good scenarios for it. It is much safer to spawn a new process.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@filmor filmor mentioned this pull request Nov 8, 2024
Loading runtime in blender on macOS 15.1 causes MissingMethodException #2503
Closed
@filmor
Use the BinaryFormatter only on .NET FW and Mono
3cd685e
@filmor
filmor force-pushed the fix-binaryformatter-usage branch from 958dd30 to 3cd685e Compare February 20, 2025 16:29
lostmsu
lostmsu requested changes Apr 11, 2025
View reviewed changes
Comment thread src/runtime/StateSerialization/RuntimeData.cs

private static void RestoreRuntimeDataImpl()
{
IFormatter? formatter = CreateFormatter();

@lostmsu lostmsu Apr 11, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think coming here should be an error.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@filmor

filmor commented Oct 25, 2025

Copy link
Copy Markdown
Member Author

/close

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@filmor filmor closed this Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lostmsu lostmsu lostmsu requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

BinaryFormatter deprecation issue while using PythonEngine.Shutdown()

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@filmor @lostmsu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.