10000 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
Changes from 1 commit
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
d6c9716
Support weakref for CLR types
amos402 Sep 24, 2020
2972f49
Merge pull request #958 from amos402/soft-shutdown
lostmsu Oct 8, 2020
8000
7f4f77b
Fixed dllLocal not being initialized. (#1252)
benoithudson Oct 9, 2020
6d59aea
Return interface objects when iterating over interface collections
danabr Oct 12, 2020
21f11db
Make `len` work for `ICollection<>` interface objects
danabr Oct 6, 2020
64a6909
Fix typo
danabr Oct 9, 2020
db30b87
enable source link and symbol package generation during build
lostmsu Oct 12, 2020
f506d65
Fixed polyfill for TypeBuilder.CreateType (#1261)
lostmsu Oct 13, 2020
de7c7c2
Fix Appveyor configuration
filmor Oct 14, 2020
5d57e5a
Merge branch 'master' into weakref-support
amos402 Oct 22, 2020
f08813c
Apply unified mechanism for `GetManagedObjectType`
amos402 Oct 22, 2020
84e2735
fix wrongly cased Microsoft.CSHARP.Targets
vivainio Nov 2, 2020
d0c588b
Add intern string and PyIdentifier (#1254)
amos402 Nov 6, 2020
36bdb98
use .NET Core 3.1 LTS for tests (instead of 2.0)
lostmsu Nov 11, 2020
6be3636
Python 3.9 (#1264)
filmor Nov 13, 2020
6dd40dc
minor improvement to debugging experience
lostmsu Nov 11, 2020
2e6d12f
Remove deprecated implicit assembly loading
lostmsu Nov 11, 2020
7870a9f
Ensure methods of Object are also available on interface objects (#1284)
danabr Nov 17, 2020
c81c3c3
Fix kwarg func resolution (#1136)
jmlidbetter Nov 18, 2020
182faed
allow creating new .NET arrays from Python using Array[T](dim1, dim2,…
lostmsu Nov 24, 2020
67c6d11
detect the size of wchar_t (aka Runtime.UCS) at runtime using PyUnico…
lostmsu Nov 30, 2020
4831b83
TypeOffset class no longer depends on target Python version
lostmsu Nov 24, 2020
125c818
implemented NativeTypeOffset for installation with setup.py
lostmsu Nov 24, 2020
d623d2f
fixed missing ITypeOffset members np_inplace_*
lostmsu Nov 25, 2020
ab97b02
revert slot-related parts of 1b466df0 to avoid conditional compilation
lostmsu Nov 30, 2020
57f4a80
Create main.yml
lostmsu Dec 8, 2020
5b09ba6
Parameters marked with `ParameterAttributes.Out` are no longer return…
lostmsu Dec 8, 2020
f8c27a1
Added github actions workflow to replace travis (#1307)
lostmsu Dec 9, 2020
f811e51
Convert projects to SDK style
filmor Nov 7, 2020
5607205
Drop CLSCompliant attributes to get rid of warnings
filmor Nov 14, 2020
fabe401
Add pyparser dependency to pyproject.toml
filmor Dec 9, 2020
6f97bdd
Adjust clr loading and merge Mono code into one file
filmor Dec 9, 2020
ee990b7
Adjust workflows
filmor Dec 9, 2020
640b497
Ignore test failing on Mono for now
filmor Dec 9, 2020
d75cdcc
Always run configure step if dotnet modules are present
filmor Dec 10, 2020
6cb3fd9
Add solution items back
filmor Dec 10, 2020
deaf97b
Remove outdated comment
filmor Dec 10, 2020
916b26a
Run AppVeyor tests without coverage for now
filmor Dec 10, 2020
3ae7026
Split build_dotnet into its own command
filmor Dec 10, 2020
e3f8c20
Do the clr import later to not interfere with other test imports
filmor Dec 10, 2020
f5c76b0
Merge pull request #1209 from filmor/sdk-style
filmor Dec 10, 2020
c692491
Test other Operating Systems than Linux via Github Actions (#1310)
filmor Dec 10, 2020
24c5af3
Remove accidentally merged change
filmor Dec 10, 2020
4133927
Ensure that param-array matching works correctly (#1304)
filmor Dec 10, 2020
b014ce1
Merge branch 'master' into weakref-support
filmor Dec 10, 2020
ce76f2e
Adjust shields in README
filmor Dec 10, 2020
d888244
fixed CollectBasicObject by ensuring MakeAGarbage is not keeping temp…
lostmsu Dec 10, 2020
ff86507
reworked Finalizer to only store raw python object handles instead of…
lostmsu Dec 11, 2020
ca96444
fixed domain reload test, that tries to call static method from objec…
lostmsu Dec 11, 2020
9934cc8
Remove API warnings as these will be stabilised for 3.0
filmor Dec 11, 2020
c23958e
Replace custom platform handling by RuntimeInformation
filmor Dec 11, 2020
6bc85ff
Merge pull request #1313 from losttech/bugs/1309
filmor Dec 12, 2020
ffbbf17
Implement inplace building and develop (#1317)
filmor Dec 12, 2020
d2685a1
Drop the long-deprecated CLR.* alias
filmor Dec 12, 2020
bd264cf
Fix or disable warnings in Python.Runtime (#1318)
filmor Dec 12, 2020
44a36dc
Update ISSUE_TEMPLATE.md
filmor Dec 17, 2020
08ea6f3
refactoring in CreateSubType
lostmsu Dec 17, 2020
9682dc6
allocate space for GCHandle in instances of CLR Metatype (which are t…
lostmsu Dec 18, 2020
38b3f01
classderived: handle tp_dealloc called after tp_clear
lostmsu Dec 18, 2020
039b3ca
a few extra assertions
lostmsu Dec 18, 2020
7e73b0d
Merge pull request #1330 from losttech/bugs/1327
filmor Dec 18, 2020
e2ab3ae
fixed crash in finalizer of CLR types defined in Python, that survive…
lostmsu Dec 18, 2020
6a5c3a4
Add test-case for non-ASCII method name
filmor Dec 16, 2020
139dc87
Ensure that all *String C-API functions are used with UTF8
filmor Dec 18, 2020
9307bb3
Fix illegal delegate usage (#1328)
BadSingleton Dec 18, 2020
7a03b61
Ensure that the DLL locations exist for clean checkouts
filmor Dec 18, 2020
7149d5e
PyIter: do not force dispose previous object upon moving to the next …
lostmsu Dec 18, 2020
d9e15a7
Incorrectly using a non-generic type with type parameters now produce…
tminka Dec 18, 2020
e7f97a9
Merge branch 'master' into weakref-support
amos402 Dec 21, 2020
b68f0a4
* Remove magic offset
amos402 Dec 21, 2020
b4b1cff
Merge branch 'master' into weakref-support
amos402 Dec 21, 2020
a0d1a3d
Call PyErr_NormalizeException for exceptions (#1265)
slide Dec 21, 2020
1f40564
TestPythonEngineProperties.SetPythonPath avoids corrupting the module…
tminka Dec 22, 2020
cac82a6
ABI.Initialize gives a helpful message when the TypeOffset interop cl…
tminka Jan 4, 2021
107c8b9
PyObject.AsManagedObject gives a better error message
tminka Jan 4, 2021
5bb2566
Python tests can now be debugged by running them as embedded tests wi…
tminka Dec 31, 2020
0ccc443
ImportHook preserves the original exception message when an import fails
tminka Jan 4, 2021
0a88f27
Use PythonException.Restore
tminka Jan 5, 2021
4ac44fe
Updated CHANGELOG
tminka Jan 5, 2021
96cc739
Merge pull request #1341 from tminka/TestPythonTest
lostmsu Jan 5, 2021
9f01ebb
Operator overloads support (#1324)
christabella Jan 5, 2021
0c41273
time limit GitHub actions to 5 min
lostmsu Jan 7, 2021
d6c0081
Support changes to CLR code when domain reloads
BadSingleton Jan 7, 2021
ed6763c
Add more more tests for in, out and ref parameters
BadSingleton Jan 6, 2021
e44aa46
Support comparison operators (#1347)
christabella Jan 12, 2021
0f33f71
disable implicit conversion from PyFloat to .NET integer types (fixes…
lostmsu Dec 31, 2020
5fd77b1
Add PythonEngine.Interrupt (#1337)
gpetrou Jan 21, 2021
7e7cbca
Disable implicit conversion from PyFloat to uint64 (#1362)
tminka Jan 21, 2021
32fdc9c
Disable implicit conversion from PyFloat to array index (#1363)
tminka Jan 21, 2021
92932fd
Better error messages for method argument mismatch and others (#1361)
tminka Jan 27, 2021
063a674
Added the ability to implement delegates with `ref` and `out` paramet…
tminka Jan 28, 2021
909ed1f
dropped net40 target from modern projects
lostmsu Nov 30, 2020
47e926e
use .NET Standard 2.0 platform detection features
lostmsu Dec 2, 2020
21683b3
drop NativeCodePage alltogether
lostmsu Dec 2, 2020
972c41d
WIP: use C# 9 function pointers for PInvoke
lostmsu Dec 4, 2020
51e5184
allow setting PythonDLL
lostmsu Dec 10, 2020
2498d47
always explicitly specify the way strings are marshaled
lostmsu Jan 22, 2021
70fc803
CI: figure out DLL name from environment
lostmsu Jan 22, 2021
28a5dab
use Roslyn preview in CI
lostmsu Jan 22, 2021
c75229a
fixed Linux and Mac DLL loaders breaking dll path
lostmsu Jan 22, 2021
a0a1dc1
correctly detect DLL on *nix when running from Python
lostmsu Jan 22, 2021
1b88783
Windows library loader: add support for hModule == 0
lostmsu Jan 22, 2021
2c1aaef
fix dll loading in tests
lostmsu Jan 22, 2021
39e41d0
mentiond PythonDLL in changelog
lostmsu Jan 22, 2021
17040fe
set PYDLL in AppVeyor
lostmsu Jan 22, 2021
b7410b6
revert automatically added 'm' suffix for *nix default dll name
lostmsu Jan 22, 2021
275cae9
specify full DLL name instead of PYVER in GH Actions
lostmsu Jan 22, 2021
b4cb37e
use Microsoft.Net.Compilers.Toolset instead of Microsoft.Net.Compilers
lostmsu Jan 23, 2021
f68e581
in CI MacOS python DLL has 'm' suffix
lostmsu Jan 23, 2021
cda604a
only set PYTHONNET_PYDLL for test runs from .NET
lostmsu Jan 23, 2021
3982892
workaround for pytest/clr module not preloading python C API library
lostmsu Jan 23, 2021
a6cbe20
addressed a few code comments
lostmsu Jan 26, 2021
9e5887c
Merge pull request #1365 from losttech/features/VersionIndependent
lostmsu Jan 28, 2021
1afae4c
Fix exception string (#1360)
filmor Jan 29, 2021
d86bf3c
ParameterInfo.Name needs to be checked for null before usage (#1375)
filmor Feb 4, 2021
ff35e6d
Merge branch 'master' into weakref-support
amos402 Feb 10, 2021
6b2347a
monthly NuGet release previews (#1381)
lostmsu Feb 12, 2021
4da1954
Sign Runtime DLL with a strong name (#1382)
gpetrou Feb 13, 2021
b92d929
Replace clr module by loading through clr_loader
filmor Feb 13, 2021
fdb7144
Add Changelog entry
filmor Feb 14, 2021
f01a78c
Fix domain reload tests and activate them on macOS
filmor Feb 13, 2021
0d7e43a
Run tests on .NET Core
filmor Feb 13, 2021
67032ea
Vendor System.Drawing.Point for testing on .NET Core
filmor Feb 14, 2021
8bc458b
Use approximate comparison for single max/min value comparison
filmor Feb 14, 2021
d46fa1e
Adjust the import tests to use only commonly available deps
filmor Feb 14, 2021
f0011a5
Fix PythonTestRunner to work with new pytest setup
filmor Feb 14, 2021
c1a01b7
Drop references to the obsolete call
filmor Feb 14, 2021
6510ff7
Merge pull request #1373 from filmor/clr-loader
filmor Feb 14, 2021
fb083bb
Adjust setup.py for wheel building
filmor Feb 14, 2021
4c05417
enable manual preview release
lostmsu Feb 17, 2021
132b666
rename nuget preview release workflow
lostmsu Feb 17, 2021
0f5e781
NuGet Preview pipeline changes missed in https://github.com/pythonnet…
lostmsu Feb 17, 2021
1ab9cb1
simplify PyScope by delegating ownership to PyObject instance
lostmsu Jan 23, 2021
707ef36
Lossless encoders for IList<T>, IEnumerable<T> and ICollection<T> (#1…
koubaa Feb 18, 2021
ea3d47a
Merge branch 'master' into weakref-support
amos402 Feb 19, 2021
958a8eb
Fix Shutdown crash
amos402 Feb 19, 2021
53ad8d9
Use PyTypeType.tp_basicsize as size of PyHeapTypeObject directly inst…
amos402 Feb 19, 2021
d0d7616
ensure interned strings can not be referenced after InternString.Shut…
lostmsu Feb 21, 2021
83328d2
made InterruptTest more robust
lostmsu Feb 21, 2021
6db4373
added NuGet shields to README
lostmsu Feb 21, 2021
6f1219f
mentioned PythonDLL in README
lostmsu Feb 21, 2021
647bc8a
Merge branch 'master' into weakref-support
amos402 Feb 21, 2021
f474039
* Use C# 9.0 for Python.EmbeddingTest.csproj
amos402 Feb 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust setup.py for wheel building
  • Loading branch information
filmor committed Feb 14, 2021
commit fb083bbe0e4fdc5ca6033ee9a83877b70d56c4fe
14 changes: 12 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def run(self):
# Add build_dotnet to the build tasks:
from distutils.command.build import build as _build
from setuptools.command.develop import develop as _develop
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
from setuptools import Distribution
import setuptools

Expand All @@ -111,13 +112,22 @@ def install_for_development(self):
return super().install_for_development()


class bdist_wheel(_bdist_wheel):
def finalize_options(self):
# Monkey patch bdist_wheel to think the package is pure even though we
# include DLLs
super().finalize_options()
self.root_is_pure = True


# Monkey-patch Distribution s.t. it supports the dotnet_libs attribute
Distribution.dotnet_libs = None

cmdclass = {
"build": build,
"build_dotnet": build_dotnet,
"develop": develop,
"bdist_wheel": bdist_wheel,
}


Expand All @@ -142,9 +152,8 @@ def install_for_development(self):
author="The Contributors of the Python.NET Project",
author_email="pythonnet@python.org",
packages=["pythonnet", "pythonnet.find_libpython"],
install_requires=["pycparser", "clr_loader"],
install_requires=["clr_loader"],
long_description=long_description,
# data_files=[("{install_platlib}", ["{build_lib}/pythonnet"])],
py_modules=["clr"],
dotnet_libs=dotnet_libs,
classifiers=[
Expand All @@ -156,6 +165,7 @@ def install_for_development(self):
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
Expand Down
0