8000 Support weakref for CLR types by amos402 · Pull Request #5 · amos402/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

Support weakref for CLR types #5

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

Open
wants to merge 143 commits into
base: soft-shutdown
Choose a base branch
from
Open

Conversation

amos402
Copy link
Owner
@amos402 amos402 commented Sep 24, 2020

What does this implement/fix? Explain your changes.

...

Does this close any currently open issues?

...

Any other comments?

...

Checklist

Check all those that are applicable and complete.

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

@codecov-commenter
Copy link
codecov-commenter commented Sep 24, 2020

Codecov Report

Merging #5 into soft-shutdown will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##           soft-shutdown       #5   +/-   ##
==============================================
  Coverage          86.25%   86.25%           
==============================================
  Files                  1        1           
  Lines                291      291           
==============================================
  Hits                 251      251           
  Misses                40       40           
Flag Coverage Δ
#setup_linux 64.94% <ø> (ø)
#setup_windows 72.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12c0206...d6c9716. Read the comment docs.

@codecov-io
Copy link
codecov-io commented Oct 22, 2020

Codecov Report

Merging #5 (d6c9716) into soft-shutdown (8d00e4c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##           soft-shutdown       #5   +/-   ##
==============================================
  Coverage          86.25%   86.25%           
==============================================
  Files                  1        1           
  Lines                291      291           
==============================================
  Hits                 251      251           
  Misses                40       40           
Flag Coverage Δ
setup_linux 64.94% <ø> (ø)
setup_windows 72.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d00e4c...f474039. Read the comment docs.

vivainio and others added 16 commits November 2, 2020 22:33
PyIdentifier will have pointers to common Python strings (e.g. `__class__`, `__doc__`, etc) to avoid allocation and conversion.

`InternString.GetManagedString` provides cache for similar conversion from Python to .NET
* Add Python 3.9 to CI
* Update AppVeyor image and always install all requirements
* Add Python 3.9 interop file
* Fix geninterop script and regenerate interop39.cs
    - Only record structs when they are defined, not when they are declared
    - If a struct was only declared when a typedef was created, it won't
      contain its member declarations. Those have to be drawn from the
      recorded structs instead.
   - Rename internal members of AstParser to make it easier to debug
Legacy behavior:
`import Company.Product.Namespace` would search for
`Company.Product.Namespace.dll` .NET assmebly, load it, and import the
namespace.

New behavior:
User must always explicitly add assembly reference using
`clr.AddReference` to `Company.Product.Namespace` prior to attempting
import
Fix function resolution when calling overloads with keyword arguments

Co-authored-by: Benedikt Reinartz <filmor@gmail.com>
Instead, for each supported Python version a separate class is generated (e.g. TypeOffset36). Then the Runtime picks the correct class using reflection, and copies only the necessary TypeOffset members over from it.

ManagedDataOffsets.Magic is now also read at runtime from tp_basicsize of PyType
…ed in addition to the regular method return value (unless they are passed with `ref` or `out` keyword). (pythonnet#1308)
filmor and others added 30 commits January 29, 2021 07:50
Fix exception stacktrace formatting

Ensure that the stacktrace list is joined into a single string and
adjust the formatting slightly such that the .NET stacktrace is
separated from the one from Python. The Python traceback
is also reversed to match the order used in .NET.

Fixes pythonnet#1359.
…et#1375)

This occured in trying to use F# code from Python. As the `.Name` property
returns `null`, `ContainsKey` fails.

Related documentation:
https://docs.microsoft.com/en-us/dotnet/api/system.reflection.parameterinfo.name
clr_loader is based on CFFI and allows loading pythonnet on different
.NET runtime implementations, currently .NET Framework, .NET Core and
Mono. Apart from dropping the respective old code, this requires the following
changes:
- Move libpython discovery into Python by vendoring and adjusting
   `find_libpython`
- Adjust the GIL handling in the startup code as CFFI releases the GIL when
   calling the external function
- Remove the intermittent `configure` command as it is not required
   anymore
- Adjust a few test-cases
- Remove `_AtExit`

Due to issues with the reference counts, the `atexit` callback is
currently essentially a no-op until these are fixed.
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.

0