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 — Non-breaking workaround for BinaryFormatter deprecation, issue #2469 by Legion-ale · Pull Request #2621 · pythonnet/pythonnet

Conversation

@Legion-ale

@Legion-ale Legion-ale commented Sep 23, 2025

Copy link
Copy Markdown

What does this implement/fix? Explain your changes.

non-breaking change that fix BinaryFormatter deprecation on .Net9.0 and higher

Does this close any currently open issues?

yes #2469

Any other comments?

Considering that NoopFormatter exists in the code you're probably working on it, that are my 2 cents.

Sorry, something went wrong.

Uh oh!

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

All reactions
Legion-ale added 2 commits September 23, 2025 15:53
@Legion-ale
Non-breaking workaround for BinaryFormatter deprecation, issue python…
50752e8
…net#2469
@Legion-ale
Update RuntimeData.cs
f144d37
Missing ;
Legion-ale
Legion-ale commented Sep 30, 2025
View reviewed changes

@Legion-ale Legion-ale left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
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.

; wrongly deleted when celaning function. Now build correctly

Sorry, something went wrong.

Uh oh!

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

All reactions
@Legion-ale

Legion-ale commented Sep 30, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Author

I see that the errors are:

/Users/runner/.nuget/packages/microsoft.net.test.sdk/17.14.1/build/netcoreapp2.0/Microsoft.NET.Test.Sdk.targets(4,5): error : Microsoft.NET.Test.Sdk doesn't support net6.0 and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set true in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk. [/Users/runner/work/pythonnet/pythonnet/src/embed_tests/Python.EmbeddingTest.csproj::TargetFramework=net6.0]

Is not something I Implemented... so i didn't commit my changes at the .csproj, but i think is enought to edit Python.EmbeddingTest.csproj tag:

<PropertyGroup>
    <TargetFrameworks>net472;net6.0</TargetFrameworks>
  </PropertyGroup>

to latest .NET LTS:

<PropertyGroup>
    <TargetFrameworks>net472;net8.0</TargetFrameworks>
  </PropertyGroup>

Link to MS versioning:

https://dotnet.microsoft.com/en-us/platform/support/policy

Am I missing something?

Can i commit the project edit?

All reactions

Sorry, something went wrong.

Uh oh!

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

@filmor

filmor commented Oct 1, 2025

Copy link
Copy Markdown
Member

Sorry for the mess with the build. It's not quite as simple, I'm looking into updating our CI to use .NET 8 and uv, see #2612 and #2520. Once these are through, I'll revisit your PR.

Legion-ale reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@filmor

filmor commented Oct 21, 2025

Copy link
Copy Markdown
Member

#2639 should do this without trying to parse the version. Thank you for your effort!

All reactions

Sorry, something went wrong.

Uh oh!

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

@filmor filmor closed this Oct 21, 2025
@Legion-ale

Legion-ale commented Oct 22, 2025

Copy link
Copy Markdown
Author

Ok, i see the #2639 commit and it should work.
Just another cent:
MemoryStream() is disposable, i think is better to dispose of it after use to avoid memleak before returning BinaryFormatter()

All reactions

Sorry, something went wrong.

Uh oh!

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

@filmor

filmor commented Oct 22, 2025

Copy link
Copy Markdown
Member

Thanks, I'll change it accordingly. For MemoryStream in particular, Dispose effectively only "closes" it via a boolean, but it's still better style to do that here.

Legion-ale reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

Uh oh!

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

2 participants

@Legion-ale @filmor
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 01402503 — 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.