patched/pythonnet.git
2 years agoDon't mask exceptions in managed constructors master
Alexey Borzenkov [Thu, 17 Dec 2009 06:34:23 +0000]
Don't mask exceptions in managed constructors

3 years agoBuild Python.Net with Python 2.6
Alexey Borzenkov [Tue, 16 Dec 2008 09:08:31 +0000]
Build Python.Net with Python 2.6

3 years agoFixed PythonDotNET for Python 2.6 svn
tiran [Fri, 30 May 2008 22:48:04 +0000]
Fixed PythonDotNET for Python 2.6
PythonDotNET does *not* support several new features like the backported buffer protocol, bytearray and version tags (yet)

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@100 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years ago-fix for binding to certain overloaded methods while running under mono (thanks to...
jfrayne [Fri, 25 Apr 2008 20:20:49 +0000]
-fix for binding to certain overloaded methods while running under mono (thanks to Geoff Norton at Novell.)

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@99 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoAdded fixes to get Python.NET working under Mono 1.9 on Mac OS X.
jfrayne [Thu, 17 Apr 2008 01:23:12 +0000]
Added fixes to get Python.NET working under Mono 1.9 on Mac OS X.

-added workaround to clrmod.c for mono error: "Symbol not found: _environ" (a fix has been added to Mono SVN, according to Geoff Norton at Novell.)

-changed ordering of mono_config_parse(NULL) call in pynetinit.c, to handle latest changes to mono embedding interface (a fix has been added to Mono SVN, according to Geoff Norton.)

-fixed TypeManager static constructor to properly handle .NET exceptions (thanks to Geoff Norton.)

-added to pynetinit.c to make clr.so search the site-packages folder of the currently running python to find the Python.Runtime.dll, instead of just the cwd (thanks to Peter Shinners and Wei Qiao at Blizzard Entertainment.)

-updated one of the Python.Runtime.dll.config to map to .dylib instead of .so (thanks to Wei Qiao.) This should be looked at further, as there are a few of these files floating around...

-changed the Makefile to be self-contained and create the clr.so (thanks to Wei Qiao.) This should be looked at further, as running setup.py currently builds the clr.so, but gives an error afterwards.

-updated README.txt a bit more.

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@98 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoJust a fake commit to make a note in history that revision 95 is from Joe Frayne.
johnburnett [Wed, 27 Feb 2008 19:45:53 +0000]
Just a fake commit to make a note in history that revision 95 is from Joe Frayne.

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@97 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoFixes for a bad merge in the last couple of patches...
johnburnett [Wed, 27 Feb 2008 01:59:14 +0000]
Fixes for a bad merge in the last couple of patches...

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@96 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years ago1. In cases where the generic parameters do not match the arguments on overloaded...
johnburnett [Wed, 27 Feb 2008 01:45:08 +0000]
1. In cases where the generic parameters do not match the arguments on overloaded methods, the method binder often picked the wrong method. This is because it picks the method when it looks at the generic parameters, before it knows what the arguments are. Now when it gets to evaluating the arguments, it uses the generic parameters in the picked method AND the arguments to try to re-bind to the proper method. This works with calls like this:

foo = bar.GetValue[str](int arg1, int arg2, str arg3)

...but I did NOT implement a fix for using the __overloads__ syntax. It is still broken (I'm not quite clear on when it is ever even necessary.)

2. Added unit tests for the above.

3. Added some text to the monoclr README.txt to describe how to compile the clr.so that is needed for MacOS X -- I still haven't been able to get everything working myself, so I'm not 100% on it, but the file was blank before, so I figure something is better that nothing.)

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@95 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoAdding support for conversion from python float to object... patch #1801233 from...
johnburnett [Wed, 27 Feb 2008 01:39:42 +0000]
Adding support for conversion from python float to object... patch #1801233 from anonymous

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@94 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoUnder cpython 2.5.1 and Microsoft .NET 2.x, CodeGenerator's ctor was causing an excep...
johnburnett [Wed, 27 Feb 2008 01:35:22 +0000]
Under cpython 2.5.1 and Microsoft .NET 2.x, CodeGenerator's ctor was causing an exception when calling Thread.GetDomain().DefineDynamicAssembly. A "fix" for this seems to be to make this call happen before Python.Runtime.Runtime.Initialize(). To do this, CodeGenerator is no longer a static class (along with the classes that use it). DelegateManager (the owner of the only CodeGenerator instance) is then created in PythonEngine.Initialize, ahead of the Runtime.Initialize() call. This "fix" is probably masking some bad mojo happening somewhere down in Runtime.Initialize().

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@93 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years ago64-bit support on Windows. Note I didn't update anything to do with "mdp" files or...
johnburnett [Wed, 27 Feb 2008 01:34:13 +0000]
64-bit support on Windows. Note I didn't update anything to do with "mdp" files or makefile, as I don't know anything about those. These changes purely update the Visual Studio files to have an option to build 64bit (the x64 solution platform).

clrmodule.il:
- Rewrote entirely to be more human readable/writable. Heavily commented with C# equivalents. Added #ifdef'd debug prints.
- Supports loading out of PYTHONPATH (based on idea by Maksim Kozyarchuk). Default behavior is the same, and only falls back to PYTHONPATH if Python.Runtime can't be found. Note that the ".assembly extern Python.Runtime" block is removed now, as we're no longer binding to it at compile time.
- If/when Python.Runtime.dll gets a solid version and/or strong name, clrmodule can be set to bind more closely with that build by using the USE_PYTHON_RUNTIME_VERSION and USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN defines. See comments for details.
- Updated mscorlib reference to 2.0 (required for 64-bit compat).
- Removed ".corflags 0x00000002" (Not compatible with 64 bit version, and no longer needed for 32 bit version when using ilasm v2).

Other files:
- And added "runtime\x86\clrmodule-platform.il" and "runtime\x64\clrmodule-platform.il" subdirectories. 32/64 bit specific IL code is in there, and included into "runtime\clrmodule.il". Clunky, but since ilasm doesn't support command-line #defines, I think this is the best to be done to get the machine-specific stuff out of clrmodule.il.
- Deleted oldmodule.il (seems to be left over drit that was basically the same as clrmodule.il anyway, casing notwithstanding).
- Added an x64 platform target for the solution and Python.Runtime project. The platform is passed into the newly added buildclrmodule.bat, which builds the appropriate clr.pyd.
- Removed Console.csproj.user, and put its Debug build StartArguments into Console.csproj, so it's no longer necessary to keep the .user file around in source control.
- All projects are responsible for copying only their specific output (i.e. console no longer delets/builds/copies clr.pyd). Project dependencies should make sure things work still.

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@92 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agotestStrOfException was depending on implementation detail that was half-way through...
johnburnett [Wed, 27 Feb 2008 01:26:41 +0000]
testStrOfException was depending on implementation detail that was half-way through an Exception.StackTrace. The detail changed in Windows .NET 2.0+, so now it checks the base of the trace ("System.Convert.ToDateTime").

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@91 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoAdded setup.py to release files
tiran [Sun, 18 Nov 2007 19:59:36 +0000]
Added setup.py to release files
Added Python.Runtime.dll.config

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@90 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoImproved PyLong so it actually supports int64.
hardcoded [Fri, 19 Oct 2007 11:50:43 +0000]
Improved PyLong so it actually supports int64.

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@89 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoFixed bug in UCS2/UCS4 detection. Thx to Sanghyeon Seo
tiran [Thu, 18 Oct 2007 20:05:57 +0000]
Fixed bug in UCS2/UCS4 detection. Thx to Sanghyeon Seo

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@88 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoUpdated Makefile
tiran [Wed, 17 Oct 2007 12:14:19 +0000]
Updated Makefile
Bumped version of clrmodule.il
Added Python.Runtime.dll.config

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@87 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoChanged the PythonException.Message value so it displays the name of the exception...
hardcoded [Sun, 12 Aug 2007 22:20:52 +0000]
Changed the PythonException.Message value so it displays the name of the exception class instead ("Exception") instead of its representation ("<type 'exceptions.Exception'>").

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@86 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoErr, somehow the unit test fix for clr.get/setPreload got lost ...
tiran [Fri, 3 Aug 2007 12:12:48 +0000]
Err, somehow the unit test fix for clr.get/setPreload got lost ...

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@85 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoUpdated readme.html
tiran [Fri, 3 Aug 2007 11:58:36 +0000]
Updated readme.html
Added code for Python 2.3 (not officially supported)
Changed clr.preload to clr.setPreload() and clr.getPreload(). I know that setters and getters are old school but even Python doesn't support module properties :(

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@84 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoFixed mono_config.txt
tiran [Wed, 1 Aug 2007 08:43:36 +0000]
Fixed mono_config.txt
Some fixes and enhancements for the Makefile under Windows and for make dist
Fixed PyObject_TYPE for Py_DEBUG builds
Fixed an issue with implicit calls of generic methods

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@83 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoThe mono based clr module now raises an import error when it can't load the assembly...
tiran [Tue, 31 Jul 2007 17:20:35 +0000]
The mono based clr module now raises an import error when it can't load the assembly or initialize PythonNet
Mono exceptions are dumped as well.

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@82 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoDefault to Python 2.5
tiran [Mon, 30 Jul 2007 16:17:22 +0000]
Default to Python 2.5
Renamed solution file to pythonnet.sln. It's not Python 2.5 specific
Enhanced make dist. It builds a signed assemblies for 2.4 and 2.5 for both UCS 2 and 4 with GPG keys, md5 and sha256 sum

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@81 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoFixed new Makefile for Windows
tiran [Sun, 29 Jul 2007 00:40:46 +0000]
Fixed new Makefile for Windows
Updated changes.txt

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@80 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoCode cleanup: Replaced \t with 8 spaces in all *.cs files
tiran [Sun, 29 Jul 2007 00:25:03 +0000]
Code cleanup: Replaced \t with 8 spaces in all *.cs files

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@79 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoRemoved old makefiles
tiran [Sun, 29 Jul 2007 00:22:49 +0000]
Removed old makefiles
Added a one size fits all Makefile for Windows and Mono including support for autodetection of UCS 2/3 and Python version

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@78 eec46630-9e10-0410-a4d4-bdf9433bceab

4 years agoMerged revision r43:75 from https://pythonnet.svn.sourceforge.net/svnroot/pythonnet...
tiran [Fri, 27 Jul 2007 17:32:55 +0000]
Merged revision r43:75 from https://pythonnet.svn.sourceforge.net/svnroot/pythonnet/branches/clr-2.0-python-2.5-branch into the trunk

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@76 eec46630-9e10-0410-a4d4-bdf9433bceab

5 years agoAdded PyIter, an easy way to enumerate python iterators or sequences.
hardcoded [Fri, 24 Nov 2006 16:12:44 +0000]
Added PyIter, an easy way to enumerate python iterators or sequences.

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@42 eec46630-9e10-0410-a4d4-bdf9433bceab

5 years agoPythonException now has a meaningful message (The message of the actual python except...
hardcoded [Fri, 24 Nov 2006 16:02:49 +0000]
PythonException now has a meaningful message (The message of the actual python exception that was raised).

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@41 eec46630-9e10-0410-a4d4-bdf9433bceab

5 years agoMade PyObject.ToString() and PyString(string) work with unicode strings.
hardcoded [Fri, 24 Nov 2006 15:42:35 +0000]
Made PyObject.ToString() and PyString(string) work with unicode strings.
Added embed_tests.

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@40 eec46630-9e10-0410-a4d4-bdf9433bceab

5 years agocheckpoint
brianlloyd [Mon, 5 Jun 2006 20:37:19 +0000]
checkpoint

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@39 eec46630-9e10-0410-a4d4-bdf9433bceab

5 years agoupdate changes.txt
brianlloyd [Mon, 5 Jun 2006 14:16:00 +0000]
update changes.txt

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@38 eec46630-9e10-0410-a4d4-bdf9433bceab

5 years agofix unboxing of value types in generated delegate code
brianlloyd [Mon, 5 Jun 2006 14:11:57 +0000]
fix unboxing of value types in generated delegate code

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@37 eec46630-9e10-0410-a4d4-bdf9433bceab

5 years agocheckpoint
brianlloyd [Fri, 2 Jun 2006 20:46:05 +0000]
checkpoint

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@36 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agocheckpoint
brianlloyd [Sat, 22 Apr 2006 18:47:36 +0000]
checkpoint

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@33 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agocheckpoint
brianlloyd [Wed, 19 Apr 2006 01:54:42 +0000]
checkpoint

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@32 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agocheckpoint
brianlloyd [Wed, 19 Apr 2006 00:54:53 +0000]
checkpoint

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@31 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agocheckpoint
brianlloyd [Tue, 11 Apr 2006 20:24:58 +0000]
checkpoint

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@30 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agocheckpoint
brianlloyd [Mon, 10 Apr 2006 20:23:57 +0000]
checkpoint

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@29 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agomerge work branch
brianlloyd [Sat, 8 Apr 2006 14:06:20 +0000]
merge work branch

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@27 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agodebug commit - I know, I'm breaking the rules, but its only me for now ;)
brianlloyd [Sat, 8 Apr 2006 01:51:34 +0000]
debug commit - I know, I'm breaking the rules, but its only me for now ;)

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@23 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agoland import syntax refactoring on trunk
brianlloyd [Thu, 6 Apr 2006 17:07:16 +0000]
land import syntax refactoring on trunk

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@22 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agocommit import refactoring
brianlloyd [Wed, 5 Apr 2006 20:22:03 +0000]
commit import refactoring

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@20 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agofixup
brianlloyd [Tue, 4 Apr 2006 18:10:34 +0000]
fixup

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet@13 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agorefactor
brianlloyd [Tue, 4 Apr 2006 18:06:07 +0000]
refactor

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/x-pythonnet/pythonnet@12 eec46630-9e10-0410-a4d4-bdf9433bceab

6 years agoInitial revision
brianlloyd [Fri, 10 Mar 2006 21:14:54 +0000]
Initial revision

git-svn-id: http://pythonnet.svn.sourceforge.net/svnroot/pythonnet/trunk/pythonnet/pythonnet@3 eec46630-9e10-0410-a4d4-bdf9433bceab