Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Modernization stage1 #1117

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
wants to merge 5 commits into from
Closed

Conversation

koubaa
Copy link
Contributor

@koubaa koubaa commented Apr 17, 2020

What does this implement/fix? Explain your changes.

pulls out a first stage from this PR:
https://github.com/pythonnet/pythonnet/pull/1109/files
...

Does this close any currently open issues?

no
...

Any other comments?

...

Checklist

Check all those that are applicable and complete.

  • [N/A] Make sure to include one or more tests for your change
  • [N/A] If an enhancement PR, please create docs and at best an example
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

filmor and others added 4 commits April 16, 2020 21:16
Contrary to what I said before, I don't think trying to provide
a single DLL for Python 2 and 3. We will in the future default
to Python 3, and if someone really wants Python 2, for a while
we will support a separate compile configuration for that.
@koubaa
Copy link
Contributor Author

koubaa commented Apr 17, 2020

@filmor this is the first stage I described (although I couldn't figure out what you mean by custom IncRef and DecRef)

@koubaa koubaa mentioned this pull request Apr 17, 2020
4 tasks
Copy link
Member

@lostmsu lostmsu left a comment

Choose a reason for hiding this comment

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

Seems fine to me, but must fix CI.

@lostmsu
Copy link
Member

lostmsu commented May 1, 2020

@filmor if this is targeting Python.NET 3+, I think we should just drop Python 2 support altogether with all related code.

Keeping those #ifs, but not making newly added code Python 2 compatible, and not running CI tests won't help people trying to backport, and will only get in our way.

We can just remove all Python 2-related code in a single commit, including the CI checks. Whoever needs it then can just revert it and try to work from there (which I doubt will ever happen).

@koubaa @filmor in my branch I simply use a static check using RuntimeInformation.IsOSPlatform to decide between UCS2 and UCS4, then just cache boolean flag. I don't think it has any significant impact on performance as opposed to using #ifs.

@koubaa
Copy link
Contributor Author

koubaa commented May 1, 2020

@lostmsu @filmor this changeset is targeting the 2.x branch. I totally agree with dropping python2 support in the 3.x branch.

@koubaa koubaa closed this Jun 23, 2020
@koubaa koubaa deleted the modernization-stage1 branch June 23, 2020 14:19
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

Successfully merging this pull request may close these issues.

3 participants