Skip to content

Require at least .NET 4.7.1 #897

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

Closed
filmor opened this issue Jun 26, 2019 · 4 comments
Closed

Require at least .NET 4.7.1 #897

filmor opened this issue Jun 26, 2019 · 4 comments

Comments

@filmor
Copy link
Member

filmor commented Jun 26, 2019

For future .NET Standard compatibility and access to some nice simplifications in getting the platform (https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture?view=netstandard-1.4 and https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.osplatform?view=netstandard-1.4 instead of getting the respective information via Python) it would be good to raise our .NET requirement to 4.7.1 or 4.7.2.

Would this pose serious problems for anyone? Upgrading the runtime should usually always be possible and we already require at least 4.0, I think in some cases even 4.5.

@filmor filmor added the rfc label Jun 26, 2019
@Cronan
Copy link
Contributor

Cronan commented Jun 26, 2019

I think this is a really good idea - I'm trying to target 4.7.2 in general because of this - https://docs.microsoft.com/en-us/dotnet/standard/net-standard

@amos402
Copy link
Member

amos402 commented Jun 26, 2019

I'd like to upgrade to 4.7, so as we can improve some interface's performance simply.
For example GetManagedString

                IntPtr p = PyUnicode_AsUnicode(op);
                int length = (int)PyUnicode_GetSize(op);
#if NET46 || NET_4_6
                unsafe
                {
                    return PyEncoding.GetString((byte*)p, length * _UCS);
                }
#else
                int size = length * _UCS;
                var buffer = new byte[size];
                Marshal.Copy(p, buffer, 0, size);
                return PyEncoding.GetString(buffer, 0, size);
#endif

That make avoiding a memory copy.

@benoithudson
Copy link
Contributor

Should we make a decision on this next meeting, so people have a deadline to object?

I'm in favour.

@filmor
Copy link
Member Author

filmor commented Jun 10, 2020

This is decided, we will use .NET Standard 2.0 (so at least .NET Framework 4.7.2) in version 3.

@filmor filmor closed this as completed Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants