Skip to content

Require at least .NET 4.7.1 #897

Closed
Closed

Description

@filmor

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.

Activity

  1. Cronan commented on Jun 26, 2019

    @Cronan
    Contributor

    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

  2. amos402 commented on Jun 26, 2019

    @amos402
    Member

    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.

  3. benoithudson commented on Dec 13, 2019

    @benoithudson
    Contributor

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

    I'm in favour.

  4. filmor commented on Jun 10, 2020

    @filmor
    MemberAuthor

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions