Граф коммитов

1907 Коммитов

Автор SHA1 Сообщение Дата
Félix Bourbonnais 37c4426660
Merge pull request #15 from Unity-Technologies/last-ditch-serialization
Last line of defense, best effort serialization

Also updates the base version of pythonnet.
2023-05-26 12:11:06 -04:00
Félix Bourbonnais 0cc7069e55 adjustment to make the tests pass
latest clr_loader version breaks the python tests otherwise
2023-05-26 11:56:10 -04:00
Félix Bourbonnais e09115faaf Merge remote-tracking branch 'unity/unity-custom' into last-ditch-serialization 2023-05-26 11:28:24 -04:00
Tim Gates 7ffad42406 docs: Fix a few typos
There are small typos in:
- pythonnet/__init__.py
- tests/test_import.py

Fixes:
- Should read `splitted` rather than `splited`.
- Should read `loaded` rather than `laoded`.

Signed-off-by: Tim Gates <tim.gates@iress.com>
2022-07-18 11:35:34 -04:00
Benedikt Reinartz e5546cb5ce Ensure that version.txt is always read from repo root
Allows the project to be referenced in other .NET projects without
adjusting its project file (#1853).
2022-07-18 11:35:34 -04:00
Victor Nova 34b7445c21 got rid of a few deprecation warnings that pollute GitHub code review 2022-07-18 11:35:34 -04:00
Félix Bourbonnais 1f9d221bb5 fixup! Workaround for mono attribute bug
don't try to derive from sealed types
2022-07-18 11:35:33 -04:00
Félix Bourbonnais d2f1ab6177 Workaround for mono attribute bug 2022-07-18 11:35:33 -04:00
Félix Bourbonnais 100210551c fixup! Add nested class support 2022-07-18 11:35:33 -04:00
Félix Bourbonnais b59e2bb23b Add nested class support
plus guard rails for private classes

and review fixes
2022-07-18 11:35:33 -04:00
Félix Bourbonnais c75ee46401 Last line of defense, best effort serialization
This commit adds a "last line of defense, best effort serialization"
to serialize types not marked as Serializable. Such objects are
deserialized as derived classes with all methods and properties
overriden to throw a "Not Serialized" Exception.
Fields are not initialized and may be null.

Sealed classes and implemented interface methods are still a problem to
be solved.
2022-07-18 11:35:33 -04:00
Victor a5e9b55bb0
Generate XML documentation on build and add to it NuGet package (#1878)
also fixed issues with xml docs in the code

implements https://github.com/pythonnet/pythonnet/issues/1876
2022-07-16 21:00:05 +02:00
Benedikt Reinartz 93631aff83 Bump release candidate version 2022-07-16 12:08:59 +02:00
Benedikt Reinartz 9bb8fe69ca
Merge pull request #1873 from losttech/bugs/ctor-leak
Fixed a leak in `NewReference.Move`
2022-07-14 21:48:20 +02:00
Victor Nova 469ec671fc fixed leak in NewReference.Move
fixes https://github.com/pythonnet/pythonnet/issues/1872
2022-07-14 11:40:59 -07:00
Victor Nova 59b1c51daa Finalizer.Instance.Collect() and Runtime.TryCollectingGarbage(...) are now callable from Python 2022-07-14 11:17:25 -07:00
Benedikt Reinartz 863397a231 Bump release candidate version 2022-07-11 17:15:23 +02:00
Benedikt Reinartz b79ae2f405
Fix missing docstring for types with custom constructors (#1865) 2022-07-11 17:13:54 +02:00
Benedikt Reinartz 60a719c1f5
Implement non-simple String constructors explicitly (#1862) 2022-07-11 16:55:02 +02:00
Benedikt Reinartz 332f8e79ef
Fix (U)IntPtr construction (#1861)
* Add unit tests for (U)IntPtr conversions
* Special-case construction of (U)IntPtr
* Check (U)IntPtr size explicitly
2022-07-11 14:38:54 +02:00
Benedikt Reinartz 25f21f99b2 Drop obsolete packages.config 2022-07-11 11:12:14 +02:00
Benedikt Reinartz d48479703e Use informational version as clr's __version__ attribute 2022-07-08 17:33:28 +02:00
Benedikt Reinartz 201637127f Make MANIFEST.in more explicit
- Only include src/runtime, no other .NET subproject
- In particular, tests are not contained anymore in the sdist
- Fix accidentally including obj and bin directories in the sdist
2022-07-06 08:52:42 +02:00
Benedikt Reinartz 4b6ac12463 Bump release candidate version 2022-07-05 23:10:42 +02:00
Benedikt Reinartz 2edd8000e4 Fix broken prefix and debug leftover
Additionally, fixes a type hint and makes sure that the new default
behaviour is to use the environment variable if given.
2022-07-05 23:09:36 +02:00
Victor Nova e84731f8e8 implemented dynamic equality and inequality for PyObject instances
fixed unhandled Python errors during comparison attempts

fixes https://github.com/pythonnet/pythonnet/issues/1848
2022-07-05 21:35:59 +02:00
Benedikt Reinartz 28a78ed6e9 Bump version to 3.0.0-rc1 2022-06-27 11:47:57 +02:00
Benedikt Reinartz a49f3a885f
Take GIL when checking if error occurred on shutdown (#1836) 2022-06-27 11:45:31 +02:00
Benedikt Reinartz 70e2e0a063
Merge pull request #1817 from filmor/env-config
Implement configuring clr from environment
2022-06-24 07:18:05 +02:00
Benedikt Reinartz 7da78892d7 Allow configuring .NET runtimes via environment variables 2022-06-24 07:11:55 +02:00
Benedikt Reinartz f5de0bf9eb Drop vendored find_libpython 2022-06-14 08:56:02 +02:00
Benedikt Reinartz 43d16404b2
Add test for simple enum int conversion (#1811) 2022-06-13 15:33:59 +02:00
Benedikt Reinartz 4d1e09a076
fixed ForbidPythonThreadsAttribute being ignored in certain scenarios (#1815)
Co-authored-by: Victor Nova <lost@losttech.software>
2022-06-13 14:15:35 +02:00
Benedikt Reinartz a6e435339b Fix remaining issues with wordpad demo 2022-06-09 07:14:16 +02:00
Benedikt Reinartz 5ee587dbba Fix demo scripts 2022-05-31 14:15:31 -07:00
Benedikt Reinartz 31b9c4e56d
Add necessary `Initialize()` call to the README 2022-05-31 14:47:29 +02:00
Benedikt Reinartz c1dab27120
Add explicit tests for vararg call (#1805) 2022-05-31 06:36:09 +02:00
Benedikt Reinartz 3cb2529386
Merge pull request #1799 from pythonnet/SupportedVersions
`Min`/`MaxSupportedVersion` and `IsSupportedVersion` on `PythonEngine`
2022-05-26 21:20:39 +02:00
Benedikt Reinartz 2e1652b8f8 Ensure that the RawProxyEncoder is removed again 2022-05-26 21:05:34 +02:00
Benedikt Reinartz 26d1039c97 Ensure that codecs are definitely clean in tests 2022-05-26 20:58:28 +02:00
Victor Nova 1492d7d7c6 expose Min/MaxSupportedVersion and IsSupportedVersion on PythonEngine
fixes https://github.com/pythonnet/pythonnet/discussions/1724
2022-05-25 14:39:48 -07:00
Benedikt Reinartz 987b2eec09
Move to modern setuptools with pyproject.toml (#1793)
* Move to modern setuptools with pyproject.toml

Also moves the version to a common ̀`version.txt` that is read by both
the .NET and Python builds.

* Allow explicitly overriding the version suffix for .NET builds
2022-05-23 21:54:35 +02:00
Benedikt Reinartz e258cee22b
Drop Python 3.6 support (#1795)
Fixes https://github.com/pythonnet/pythonnet/issues/1640

Co-authored-by: Victor Nova <lost@losttech.software>
2022-05-23 08:29:24 +02:00
Victor 87d4db92f6
Merge pull request #1786 from losttech/bugs/KeyCollection
Multiple fixes related to Dictionary.Keys bug
2022-05-19 17:15:26 -07:00
Victor Nova d8543321a3 a few collection mixins now properly handle private interface implementations
fixes https://github.com/pythonnet/pythonnet/issues/1785
2022-05-07 10:16:43 -07:00
Victor Nova 537ddf4b7f allow casting objects to generic .NET interfaces without specifying generic arguments as long as there is no ambiguity 2022-05-07 10:15:16 -07:00
Victor Nova f48d7a96f7 ClassGeneric.GetClass now returns BorrowedReference to indicate that the value should not be disposed 2022-05-07 10:05:36 -07:00
Victor Nova cf8823fa94 added regression test for "in Dictionary.Keys" check 2022-05-07 10:03:50 -07:00
Victor Nova 2910800eb6 type name generator ignored names of nested classes 2022-05-06 23:59:33 -07:00
Victor a80c685d19
disallow runtime shutdown when the Python error indicator is set, as it may lead to unpredictable behavior (#1780) 2022-05-04 20:11:13 +02:00