From c13c31332c5b9e6ece79c71b0cd36ee9977a6240 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 11:34:57 -0700 Subject: [PATCH 01/11] Remove unused files - `./htdocs/*` duplicates the content of `pythonnet.github.io` - `./installer/*` isn't used for distribution anymore - `pythonnet.build` is no longer used as build method. - `*.{mds,,mdp}` are deprecated mono files. Deprecated since eff40dfaa1f0b6b46c1cfa0378f38e431357260e - `pythonnet_8.sln` old solution file - `pythonnet_9.sln` old solution file - `doc/mono_config.txt` outdate version of `.\Python.Runtime.dll.config` - `doc/Python.Runtime.dll.config` outdate version of `.\Python.Runtime.dll.config` - `visualstate` is a per user setting. https://groups.google.com/forum/#!topic/nunit-discuss/7aXg_usr98Q --- VS_README.txt | 43 -- doc/Python.Runtime.dll.config | 21 - doc/mono_config.txt | 17 - htdocs/index.html | 149 ---- htdocs/license.txt | 61 -- htdocs/readme.html | 672 ------------------ installer/installer.iss | 73 -- installer/left.bmp | Bin 28334 -> 0 bytes installer/license.txt | 59 -- installer/top.bmp | Bin 4198 -> 0 bytes monopythonnet.mds | 25 - pythonnet.build | 74 -- pythonnet_8.sln | 86 --- pythonnet_9.sln | 87 --- src/console/Console.mdp | 25 - src/embed_tests/Embeddingtest.VisualState.xml | 21 - src/runtime/Python.Runtime.mdp | 78 -- src/testing/Python.Test.mdp | 40 -- 18 files changed, 1531 deletions(-) delete mode 100644 VS_README.txt delete mode 100644 doc/Python.Runtime.dll.config delete mode 100644 doc/mono_config.txt delete mode 100755 htdocs/index.html delete mode 100755 htdocs/license.txt delete mode 100755 htdocs/readme.html delete mode 100644 installer/installer.iss delete mode 100644 installer/left.bmp delete mode 100644 installer/license.txt delete mode 100644 installer/top.bmp delete mode 100644 monopythonnet.mds delete mode 100644 pythonnet.build delete mode 100644 pythonnet_8.sln delete mode 100644 pythonnet_9.sln delete mode 100644 src/console/Console.mdp delete mode 100644 src/embed_tests/Embeddingtest.VisualState.xml delete mode 100644 src/runtime/Python.Runtime.mdp delete mode 100644 src/testing/Python.Test.mdp diff --git a/VS_README.txt b/VS_README.txt deleted file mode 100644 index d66cbc379..000000000 --- a/VS_README.txt +++ /dev/null @@ -1,43 +0,0 @@ -Visual Studio 2005 -================== - -pythonnet contains a new solution file for Visual Studio 2005: pythonnet.sln -It should make development under Windows much easier since you don't have to -install MSys or Cygwin to run the makefile. - -The solution file should work with the free VS .NET Express Edition. - -Available configurations ------------------------- - -Every configuration copies the dll, pdf and exe files to the root directory -of the project. - - * Release - Builds Python.Runtime, Python.Tests, clr.pyd and python.exe. The console - project starts a Python console - - * Debug - Same as Release but creates a build with debug symbols - - * UnitTest - Builds a Debug build. The console project invokes runtests.py instead of - opening a Python shell. - - * EmbeddingTest - Builds Python.EmbeddingTests and its dependencies. The configuration - requires the NUunit framework. - -Python version --------------- - -You can switch the destination version by defining either PYTHON24 or PYTHON25 -inside the Python.Runtime project. - - ** Don't forget to force a rebuild after you have altered the setting! ** - -MS VS doesn't take changes to define into account. - -Thanks to Virgil Duprasfor his original VS howto! - -Christian 'Tiran' Heimes diff --git a/doc/Python.Runtime.dll.config b/doc/Python.Runtime.dll.config deleted file mode 100644 index 3cfe2735a..000000000 --- a/doc/Python.Runtime.dll.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - diff --git a/doc/mono_config.txt b/doc/mono_config.txt deleted file mode 100644 index 2e62ad142..000000000 --- a/doc/mono_config.txt +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/htdocs/index.html b/htdocs/index.html deleted file mode 100755 index a1c362770..000000000 --- a/htdocs/index.html +++ /dev/null @@ -1,149 +0,0 @@ - - - Codestin Search App - - - - - - - - - - -
-

Python for .NET

-

Python for .NET is a package that gives Python programmers - nearly seamless integration with the .NET Common Language Runtime - (CLR) and provides a powerful application scripting tool for .NET - developers. Using this package you can script .NET applications or - build entire applications in Python, using .NET services and - components written in any language that targets the CLR (Managed - C++, C#, VB, JScript).

-

Note that this package does not implement Python as a - first-class CLR language - it does not produce managed code (IL) - from Python code. Rather, it is an integration of the C Python - engine with the .NET runtime. This approach allows you to use use - CLR services and continue to use existing Python code and C-based - extensions while maintaining native execution speeds for Python - code. If you are interested in a pure managed-code implementation - of the Python language, you should check out the IronPython - project, which is in active development.

-

Python for .NET is currently compatible with Python releases 2.5 - and greater. To subscribe to the - Python for .NET mailing list or read the - online archives of the list, see the - mailing list information page. You can also send questions - or comments to me at brian.lloyd@revolution.com - or use the - Python for .NET issue tracker to report issues.

-

My blog site is - also (sometimes) a good source for more information on Python for - .NET ;)

-
    -
  • The README provides a detailed - overview of Python for .NET, as well as some basic usage - examples. Many other examples can be found in the demos and unit - tests for the package.
  • -
  • Checkout the PythonNet - code from Subversion..
  • -
  • - Download releases for various versions of Python and CLR. -
  • -
-
- - diff --git a/htdocs/license.txt b/htdocs/license.txt deleted file mode 100755 index ec12c9f2a..000000000 --- a/htdocs/license.txt +++ /dev/null @@ -1,61 +0,0 @@ -Zope Public License (ZPL) Version 2.0 ------------------------------------------------ - -This software is Copyright (c) Zope Corporation (tm) and -Contributors. All rights reserved. - -This license has been certified as open source. It has also -been designated as GPL compatible by the Free Software -Foundation (FSF). - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions in source code must retain the above - copyright notice, this list of conditions, and the following - disclaimer. - -2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions, and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - -3. The name Zope Corporation (tm) must not be used to - endorse or promote products derived from this software - without prior written permission from Zope Corporation. - -4. The right to distribute this software or to use it for - any purpose does not give you the right to use Servicemarks - (sm) or Trademarks (tm) of Zope Corporation. Use of them is - covered in a separate agreement (see - http://www.zope.com/Marks). - -5. If any files are modified, you must cause the modified - files to carry prominent notices stating that you changed - the files and the date of any change. - -Disclaimer - - THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS'' - AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. - - -This software consists of contributions made by Zope -Corporation and many individuals on behalf of Zope -Corporation. Specific attributions are listed in the -accompanying credits file. - - diff --git a/htdocs/readme.html b/htdocs/readme.html deleted file mode 100755 index d7ae26f04..000000000 --- a/htdocs/readme.html +++ /dev/null @@ -1,672 +0,0 @@ - - - Codestin Search App - - - - - - - - - - - -
-

Python for .NET is a package that gives Python programmers - nearly seamless integration with the .NET Common Language Runtime - (CLR) and provides a powerful application scripting tool for .NET - developers. Using this package you can script .NET applications or - build entire applications in Python, using .NET services and - components written in any language that targets the CLR (Managed - C++, C#, VB, JScript). -

-

Note that this package does not implement Python as a - first-class CLR language - it does not produce managed code (IL) - from Python code. Rather, it is an integration of the C Python - engine with the .NET runtime. This approach allows you to use use - CLR services and continue to use existing Python code and C-based - extensions while maintaining native execution speeds for Python - code. If you are interested in a pure managed-code implementation - of the Python language, you should check out the IronPython - project, which is in active development. -

-

Python for .NET is currently compatible with Python releases 2.3 - and greater. Current releases are available at the - Python for .NET website . To subscribe to the - Python for .NET mailing list or read the - online archives of the list, see the - mailing list information page.

- -

Installation

-

Python for .NET is available as a source release and as a - Windows installer for various versions of Python and the common - language runtime from the - Python for .NET website . On Windows platforms, you can - choose to install .NET-awareness into an existing Python - installation as well as install Python for .NET as a standalone - package. -

- -

The source release is a self-contained "private" assembly. Just - unzip the package wherever you want it, cd to that directory and - run python.exe to start using it. Note that the source release - does not include a copy of the CPython runtime, so you will need - to have installed Python on your machine before using the source - release. -

-

Running on Linux/Mono: preliminary testing - shows that PythonNet will run under Mono, - though the Mono runtime is not yet complete so there still may be - problems. The Python for .NET integration layer is 100% managed - code, so there should be no long-term issues under Mono - it - should work better and better as the Mono platform matures. -

-

Note that if you are running under Mono on a *nix system, you - will need to have a compatible version of Python installed. You - will also need to create a symbolic link to the copy of - libpython2.x.so (in your existing Python installation) in the - PythonNet directory. This is needed to ensure that the mono - interop dll loader will find it by name. For example: -

-
    ln -s /usr/lib/libpython2.4.so ./python24.so
-
- -

Getting Started

-

A key goal for this project has been that Python for .NET should - "work just the way you'd expect in Python", except for cases that - are .NET specific (in which case the goal is to work "just the way - you'd expect in C#"). In addition, with the IronPython project - gaining traction, it is my goal that code written for IronPython - run without modification under Python for .NET. -

-

If you already know Python, you can probably finish this readme - and then refer to .NET docs to figure out anything you need to do. - Conversely if you are familiar with C# or another .NET language, - you probably just need to pick up one of the many good Python - books or read the Python tutorial online to get started. -

-

A good way to start is to run python.exe and - follow along with the examples in this document. If you get stuck, - there are also a number of demos and unit tests located in the - source directory of the distribution that can be helpful as - examples. -

-

Note that if you have installed CLR support into your existing - Python installation (rather than using the included python.exe), - you will need to use the line: "'import clr" (lower-case!) to - initially load the clr extension module before trying the - following examples. -

- -

Importing Modules

-

Python for .NET allows CLR namespaces to be treated essentially - as Python packages.

-

-

-
    from System import String
-    from System.Collections import *
-
-

- Note that earlier releases of Python for .NET required you to - import modules through a special top-level package named CLR. - This is no longer required if you are starting python from the - managed python.exe from this distribution.
- CLR has been deprecated in favor of the more - pythonic clr, though the syntax is still supported - for backward compatibility. -
-

-

Types from any loaded assembly may be imported and used in this - manner. To load an assembly, use the "AddReference" function in - the "clr" module: -

-
-    import clr
-    clr.AddReference("System.Windows.Forms")
-    from System.Windows.Forms import Form
-
-
-

- Note that earlier releases of Python for .NET relied on - "implicit loading" to support automatic loading of assemblies - whose names corresponded to an imported namespace. Implicit - loading still works for backward compatibility, but will be - removed in a future release so it is recommended to use the - clr.AddReference method. - -

-

Python for .NET uses the PYTHONPATH (sys.path) to look for - assemblies to load, in addition to the usual application base and - the GAC. To ensure that you can implicitly import an assembly, put - the directory containing the assembly in sys.path. -

- -

Using Classes

-

Python for .NET allows you to use any non-private classes, - structs, interfaces, enums or delegates from Python. To create an - instance of a managed class, you use the standard instantiation - syntax, passing a set of arguments that match one of its public - constructors: -

-
    from System.Drawing import Point
-
-    p = Point(5, 5)
-
-

In most cases, Python for .NET can determine the correct - constructor to call automatically based on the arguments. In some - cases, it may be necessary to call a particular overloaded - constructor, which is supported by a special "__overloads__" - attribute, which will soon be deprecated in favor of iPy - compatible "Overloads", on a class: -

-
    from System import String, Char, Int32
-
-    s = String.Overloads[Char, Int32]('A', 10)
-    s = String.__overloads__[Char, Int32]('A', 10)
-
- -

Using Generics

-

When running under versions of the .NET runtime greater than - 2.0, you can use generic types. A generic type must be bound to - create a concrete type before it can be instantiated. Generic - types support the subscript syntax to create bound types: -

-
    from System.Collections.Generic import Dictionary
-    from System import *
-
-    dict1 = Dictionary[String, String]()
-    dict2 = Dictionary[String, Int32]()
-    dict3 = Dictionary[String, Type]()
-
-

When you pass a list of types using the subscript syntax, you - can also pass a subset of Python types that directly correspond to - .NET types: -

-
    dict1 = Dictionary[str, str]()
-    dict2 = Dictionary[str, int]()
-    dict3 = Dictionary[str, Decimal]()
-
-

This shorthand also works when explicitly selecting generic - methods or specific versions of overloaded methods and - constructors (explained later). -

-

You can also subclass managed classes in Python, though members - of the Python subclass are not visible to .NET code. See the helloform.py - file in the /demo directory of the distribution for - a simple Windows Forms example that demonstrates subclassing a - managed class. -

- -

Fields And Properties

-

You can get and set fields and properties of CLR objects just as - if they were regular attributes: -

-
    from System import Environment
-
-    name = Environment.MachineName
-    Environment.ExitCode = 1
-
- -

Using Indexers

-

If a managed object implements one or more indexers, you can - call the indexer using standard Python indexing syntax: -

-
    from System.Collections import Hashtable
-
-    table = Hashtable()
-    table["key 1"] = "value 1"
-
-

Overloaded indexers are supported, using the same notation one - would use in C#: -

-
    items[0, 2]
-
-    items[0, 2, 3]
-
- -

Using Methods

-

Methods of CLR objects behave generally like normal Python - methods. Static methods may be called either through the class or - through an instance of the class. All public and protected methods - of CLR objects are accessible to Python: -

-
    from System import Environment
-
-    drives = Environment.GetLogicalDrives()
-
-

It is also possible to call managed methods unbound - (passing the instance as the first argument) just as with Python - methods. This is most often used to explicitly call methods of a - base class. -

-

Note that there is one caveat related to calling unbound - methods: it is possible for a managed class to declare a static - method and an instance method with the same name. Since it is - not possible for the runtime to know the intent when such a - method is called unbound, the static method will always be - called. -

-

The docstring of CLR a method (__doc__) can be used to view the - signature of the method, including overloads if the CLR method is - overloaded. You can also use the Python help method - to inspect a managed class: -

-
    from System import Environment
-
-    print Environment.GetFolderPath.__doc__
-
-    help(Environment)
-
- -

Overloaded and Generic Methods

-

While Python for .NET will generally be able to figure out the - right version of an overloaded method to call automatically, there - are cases where it is desirable to select a particular method - overload explicitly. -

-

Methods of CLR objects have an "__overloads__", which will soon - be deprecated in favor of iPy compatible Overloads, attribute that - can be used for this purpose : -

-
    from System import Console
-
-    Console.WriteLine.Overloads[bool](true)
-    Console.WriteLine.Overloads[str]("true")
-    Console.WriteLine.__overloads__[int](42)
-
-

Similarly, generic methods may be bound at runtime using the - subscript syntax directly on the method: -

-
    someobject.SomeGenericMethod[int](10)
-    someobject.SomeGenericMethod[str]("10")
-
- -

Delegates And Events

-

Delegates defined in managed code can be implemented in Python. - A delegate type can be instantiated and passed a callable Python - object to get a delegate instance. The resulting delegate instance - is a true managed delegate that will invoke the given Python - callable when it is called: -

-
    def my_handler(source, args):
-        print 'my_handler called!'
-
-    # instantiate a delegate
-    d = AssemblyLoadEventHandler(my_handler)
-
-    # use it as an event handler
-    AppDomain.CurrentDomain.AssemblyLoad += d
-
-

Multicast delegates can be implemented by adding more callable - objects to a delegate instance: -

-
    d += self.method1
-    d += self.method2
-    d()
-
-

Events are treated as first-class objects in Python, and behave - in many ways like methods. Python callbacks can be registered with - event attributes, and an event can be called to fire the event. -

-

Note that events support a convenience spelling similar to that - used in C#. You do not need to pass an explicitly instantiated - delegate instance to an event (though you can if you want). Events - support the += and -= operators in a - way very similar to the C# idiom: -

-
    def handler(source, args):
-        print 'my_handler called!'
-
-    # register event handler
-    object.SomeEvent += handler
-
-    # unregister event handler
-    object.SomeEvent -= handler
-
-    # fire the event
-    result = object.SomeEvent(...)
-
- -

Exception Handling

-

You can raise and catch managed exceptions just the same as you - would pure-Python exceptions: -

-
    from System import NullReferenceException
-
-    try:
-        raise NullReferenceException("aiieee!")
-    except NullReferenceException, e:
-        print e.Message
-        print e.Source
-
-

- -

Using Arrays

-

The type System.Array supports the subscript - syntax in order to make it easy to create managed arrays from - Python: -

-
    from System import Array
-
-    myarray = Array[int](10)
-
-

Managed arrays support the standard Python sequence protocols: -

-
    items = SomeObject.GetArray()
-
-    # Get first item
-    v = items[0]
-    items[0] = v
-
-    # Get last item
-    v = items[-1]
-    items[-1] = v
-
-    # Get length
-    l = len(items)
-
-    # Containment test
-    test = v in items
-
-

Multidimensional arrays support indexing using the same notation - one would use in C#: -

-
    items[0, 2]
-
-    items[0, 2, 3]
-
- -

Using Collections

-

Managed arrays and managed objects that implement the - IEnumerable interface can be iterated over using the standard - iteration Python idioms: -

-
    domain = System.AppDomain.CurrentDomain
-
-    for item in domain.GetAssemblies():
-        name = item.GetName()
-
- -

Using COM Components

-

Using Microsoft-provided tools such as aximp.exe - and tlbimp.exe, it is possible to generate - managed wrappers for COM libraries. After generating such a - wrapper, you can use the libraries from Python just like any other - managed code. -

-

Note: currently you need to put the generated wrappers in the - GAC, in the PythonNet assembly directory or on the PYTHONPATH in - order to load them. -

- -

Type Conversion

-

Type conversion under Python for .NET is fairly straightforward - - most elemental Python types (string, int, long, etc.) convert - automatically to compatible managed equivalents (String, Int32, - etc.) and vice-versa. Note that all strings returned from the CLR - are returned as unicode. -

-

Types that do not have a logical equivalent in Python are - exposed as instances of managed classes or structs (System.Decimal - is an example). -

-

The .NET architecture makes a distinction between value - types and reference types. Reference types - are allocated on the heap, and value types are allocated either on - the stack or in-line within an object. -

-

A process called boxing is used in .NET to allow - code to treat a value type as if it were a reference type. Boxing - causes a separate copy of the value type object to be created on - the heap, which then has reference type semantics. -

-

Understanding boxing and the distinction between value types and - reference types can be important when using Python for .NET - because the Python language has no value type semantics or syntax - - in Python "everything is a reference". -

-

Here is a simple example that demonstrates an issue. If you are - an experienced C# programmer, you might write the following code: -

-
    items = System.Array.CreateInstance(Point, 3)
-    for i in range(3):
-        items[i] = Point(0, 0)
-
-    items[0].X = 1 # won't work!!
-
-

While the spelling of items[0].X = 1 is the same - in C# and Python, there is an important and subtle semantic - difference. In C# (and other compiled-to-IL languages), the - compiler knows that Point is a value type and can do the Right - Thing here, changing the value in place. -

-

In Python however, "everything's a reference", and there is - really no spelling or semantic to allow it to do the right thing - dynamically. The specific reason that items[0] - itself doesn't change is that when you say items[0], - that getitem operation creates a Python object that holds a - reference to the object at items[0] via a GCHandle. - That causes a ValueType (like Point) to be boxed, so the following - setattr (.X = 1) changes the state of the boxed - value, not the original unboxed value. -

-

The rule in Python is essentially: "the result of any attribute - or item access is a boxed value", and that can be important in how - you approach your code. -

-

Because there are no value type semantics or syntax in Python, - you may need to modify your approach. To revisit the previous - example, we can ensure that the changes we want to make to an - array item aren't "lost" by resetting an array member after making - changes to it: -

-
    items = System.Array.CreateInstance(Point, 3)
-    for i in range(3):
-        items[i] = Point(0, 0)
-
-    # This _will_ work. We get 'item' as a boxed copy of the Point
-    # object actually stored in the array. After making our changes
-    # we re-set the array item to update the bits in the array.
-
-    item = items[0]
-    item.X = 1
-    items[0] = item
-
-

This is not unlike some of the cases you can find in C# where - you have to know about boxing behavior to avoid similar kinds of lost - update problems (generally because an implicit boxing - happened that was not taken into account in the code). -

-

This is the same thing, just the manifestation is a little - different in Python. See the .NET documentation for more details - on boxing and the differences between value types and reference - types. -

- -

Embedding Python

-

Note: because Python code running under Python - for .NET is inherently unverifiable, it runs totally under the - radar of the security infrastructure of the CLR so you should - restrict use of the Python assembly to trusted code. -

-

The Python runtime assembly defines a number of public classes - that provide a subset of the functionality provided by the Python - C API. -

-

These classes include PyObject, PyList, PyDict, etc. The source - and the unit tests are currently the only API documentation.. The - rhythym is very similar to using Python C++ wrapper solutions such - as CXX. -

-

At a very high level, to embed Python in your application you - will need to: -

-
    -
  • Reference Python.Runtime.dll in your build environment
  • -
  • Call PythonEngine.Intialize() to initialize Python
  • -
  • Call PythonEngine.ImportModule(name) to import a module
  • -
-

The module you import can either start working with your managed - app environment at the time its imported, or you can explicitly - lookup and call objects in a module you import. -

-

For general-purpose information on embedding Python in - applications, use www.python.org or Google to find (C) examples. - Because Python for .NET is so closely integrated with the managed - environment, you will generally be better off importing a module - and deferring to Python code as early as possible rather than - writing a lot of managed embedding code. -

-

Important Note for embedders: Python is not - free-threaded and uses a global interpreter lock to allow - multi-threaded applications to interact safely with the Python - interpreter. Much more information about this is available in the - Python C API documentation on the www.python.org Website. -

-

When embedding Python in a managed application, you have to - manage the GIL in just the same way you would when embedding - Python in a C or C++ application. -

-

Before interacting with any of the objects or APIs provided by - the Python.Runtime namespace, calling code must have acquired the - Python global interpreter lock by calling the PythonEngine.AcquireLock - method. The only exception to this rule is the PythonEngine.Initialize - method, which may be called at startup without having acquired the - GIL. -

-

When finished using Python APIs, managed code must call a - corresponding PythonEngine.ReleaseLock to release - the GIL and allow other threads to use Python. -

-

The AcquireLock and ReleaseLock methods are thin wrappers over - the unmanaged PyGILState_Ensure and PyGILState_Release - functions from the Python API, and the documentation for those - APIs applies to the managed versions. -

- -

License

-
-

Python for .NET is released under the open - source Zope Public License (ZPL). A copy of the ZPL is included - in the distribution, or you can find a copy of the - ZPL online . Some distributions of this package include a - copy of the C Python dlls and standard library, which are covered - by the Python - license . -

-
- - diff --git a/installer/installer.iss b/installer/installer.iss deleted file mode 100644 index b0aa6ea2b..000000000 --- a/installer/installer.iss +++ /dev/null @@ -1,73 +0,0 @@ -; -------------------------------------------------------------------------------- -; Setup script for Python for .NET (based on InnoSetup 5.0.8) -; -------------------------------------------------------------------------------- - -[Setup] - -SourceDir=.. -OutputDir=release - -AppName=Python for .NET -AppVerName=Python for .NET 1.0 RC2 -AppPublisher=Brian Lloyd -AppCopyright=Copyright © 2005 Zope Corporation -DefaultDirName={pf}\PythonNet -DefaultGroupName=Python for .NET -LicenseFile=installer\license.txt -DisableProgramGroupPage=yes -WizardImageFile=installer\left.bmp -WizardSmallImageFile=installer\top.bmp -WizardImageStretch=no - - -[Tasks] - -Name: "existing"; Description: "Install .NET support in &existing python installation"; Flags: unchecked -Name: "icon"; Description: "Create a &desktop icon"; Flags: unchecked - - - -[Files] - -Source: "makefile"; DestDir: "{app}"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion -Source: "python.exe"; DestDir: "{app}"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion - -Source: "*.dll"; DestDir: "{app}"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion -Source: "demo\*.*"; DestDir: "{app}\demo"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion recursesubdirs -Source: "doc\*.*"; DestDir: "{app}\doc"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion recursesubdirs -Source: "src\*.*"; DestDir: "{app}\src"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion recursesubdirs -Source: "redist\2.3\*.*"; DestDir: "{app}"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion recursesubdirs -Source: "doc/readme.html"; DestDir: "{app}/doc"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion isreadme - -Source: "*Python.Runtime.dll"; DestDir: "{code:GetPythonDir}"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion recursesubdirs; Check: UpdateExisting -Source: "CLR.dll"; DestDir: "{code:GetPythonDir}"; Excludes: ".svn*,~*,CVS*"; Flags: ignoreversion recursesubdirs; Check: UpdateExisting - -[Icons] - -Name: "{group}\Python for .NET"; Filename: "{app}\python.exe" -Name: "{userdesktop}\Python for .NET"; Filename: "{app}\python.exe"; Tasks: icon - - -[Code] - -function GetPythonDir(Default: String): string; -var - path : string; -begin - path := ''; - RegQueryStringValue(HKLM, 'Software\Python\PythonCore\2.3\InstallPath', '', path); - Result := path; -end; - -function UpdateExisting(): boolean; -var - temp: string; - res: boolean; -begin - temp := WizardSelectedTasks(False); - res := (Pos('existing', temp) <> 0); - temp := GetPythonDir(''); - Result := res and (Pos('Python', temp) <> 0); -end; - - diff --git a/installer/left.bmp b/installer/left.bmp deleted file mode 100644 index 424aae680cdb136f4d8b46ad0614ee16a6ca00c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28334 zcmeI1J#s5I5QOPWp+X(OFI3_xWm^iI`6`Zm0F{s98|WGemFgJsw`{TBEU0IxaO1uU{fJCe&^;u+nwP*03CsyyMJ@piqMkbsw$m-qK~X6%@`#O5eMzP`SG ze0(r#7k(p+0r}&{4>ONq5*|e_>4`~FIL8|0DPf}Wc;3iA&t9)4bUdm3{QP9b)=~0V z3E)5=9DEZLC)l-xIVm zltN|>M5=UijKMFD(i8opmR0p1XC1YTNn$CkB2pahjj>!149A_p!>8OR|LjtD<9anA zf1He5<^#XVVhoRs=p^Lz)e!E^My?~Nh%43M5NNO0uo5vQh*&YV-2IuEPpG=sJ%mi&Dd*2w1? z9Nkfidk(S4=PgHP)FRJwzcZn{)iuqC4S)v=ZN}REq|itTOM&n z1~a4Zn1g=m7QYq~NCH|&EyvR7k*`u{_C0a>7XH>Hopyj-r z0t^|@=oY7RF@Yo?hhCxc)H=zGcHIhKK4J-D9@t|4CI0C=L|5@0@hm-~njcu*!|dgM8r-~IwLY-%tIOdC7Q(K{^>maC18dgLNj74sr6?Xobhzs;*>5X zkc3|L=@%*l(l>E-YP%zB6lsiC?MZgoZ{%n!uL{p>RgnRhktLoIh8x1&YxSOVl0BUH zfn(_S`ut0r^|#%zYmCV`wKUydLe_aKzy<~6hES7M?@1T#n^dbWla7oq+f(or3`?W2 zM*TvT?!$B*$dk`EDP-;zzZMhZ641rr_%zUS7aNa8Hx`biZ}AmOX>abQ6jDWJ>qC0p z=a|lt^W*QiBOlrC8B_*55P9=R@Sdw)n)5&Q<1ZYC`vnekV!J!CMZ&sN?IH z(%$IjCRmSe1qn|4#<2IOYw*_;tM;>ss*PS75TkcuZ-La9f-hmF_)C9F#JxF&RTWLO zO72g$LF&Z00WoP#dX&TA(d?(Ms=@4|$EUkjZA8x4uhDIxU4;4Z0}!NOv9WYu}|(=EX7qsW-*WMO)zSrTvgoLZIC)~Za_@7D!m(T zLhMCs{|s(Se9)P5>w7|d7}gN)4;tJH*H)9*)9QFU$*oX9l3Nim{6QD{GIEyuQ({&2 zQVLzIsHznA+G-Men(n8!^eYp#p8d?F{)>CD-Iq)JQ(_r&ye5MOtTjhH*H)9*TT6Nu z9@3yWzgJ#We>3B84YBPn?M?g<@AOBW$bW4$aZhtf27Tt)&*|y^Kaq!+7$DJ8MQr-D zYB~?Q6n(ZH7mCVXTTSRE66R-fG)RnZjxfxz|GZbo5|21pb+4Cr)&|drP$r+CD6yM34@!;R|wGI90FlYSNr#xfN z7<6kM^KWNtQf!J&)R~#} diff --git a/installer/license.txt b/installer/license.txt deleted file mode 100644 index 44e0648b3..000000000 --- a/installer/license.txt +++ /dev/null @@ -1,59 +0,0 @@ -Zope Public License (ZPL) Version 2.0 ------------------------------------------------ - -This software is Copyright (c) Zope Corporation (tm) and -Contributors. All rights reserved. - -This license has been certified as open source. It has also -been designated as GPL compatible by the Free Software -Foundation (FSF). - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions in source code must retain the above - copyright notice, this list of conditions, and the following - disclaimer. - -2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions, and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - -3. The name Zope Corporation (tm) must not be used to - endorse or promote products derived from this software - without prior written permission from Zope Corporation. - -4. The right to distribute this software or to use it for - any purpose does not give you the right to use Servicemarks - (sm) or Trademarks (tm) of Zope Corporation. Use of them is - covered in a separate agreement (see - http://www.zope.com/Marks). - -5. If any files are modified, you must cause the modified - files to carry prominent notices stating that you changed - the files and the date of any change. - -Disclaimer - - THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS'' - AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. - - -This software consists of contributions made by Zope -Corporation and many individuals on behalf of Zope -Corporation. Specific attributions are listed in the -accompanying credits file. diff --git a/installer/top.bmp b/installer/top.bmp deleted file mode 100644 index 370ff89ba50b7d3d7938d51c64439623437e6247..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4198 zcmeH|-%FEG7{@>6A}ygPcGE={h15kCF`+IBgXkhJvTi1^h>cu}MbV5EQkG>=q($jP zH4w5{{ruV-Upr^oWt|w@IBx2oCAjq z8<1?b0(OX%O7wlAXOSbV@5+$Z42!E_6Ins+D2z-BG#A12E(BL5HbQ-_kPesKQ z=At16>WUb(-yo4lV7J@pJOK-HNs`GVeYaG^`&u!Z%@h=<(CKvaUf#;2=Osl&hX~oq z2!%p)8x?rVHW92pPI_vB{QP_(kuZsYc7~so67$({yWJ?2N}|z8zCJieO-(hai2*#P zVB%dJJ?GY9v)TA`L5bCBW%@@q8jS|`Nf>Lb=4WF$H>;{}I2`ycZYCq78MKrz8y>>x zbn^N7PTYD#oQ-5M8HAZQ>G&uv4g7XJr~mF=rh}by=^)~4puMdPwOWnQXe2i`m%zRK zbe~y+|LS(WJvvHeewOjK_nA*d8F_t;slarQA~~b0Eq_)`85y()5sZAafw=V2J@)2Qmke4CI+8zXeGM|MuVb E7r#Bkl>h($ diff --git a/monopythonnet.mds b/monopythonnet.mds deleted file mode 100644 index 1d3dc000d..000000000 --- a/monopythonnet.mds +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pythonnet.build b/pythonnet.build deleted file mode 100644 index 9d0d6584a..000000000 --- a/pythonnet.build +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pythonnet_8.sln b/pythonnet_8.sln deleted file mode 100644 index e30c01be0..000000000 --- a/pythonnet_8.sln +++ /dev/null @@ -1,86 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Runtime", "src\runtime\Python.Runtime.csproj", "{097B4AC0-74E9-4C58-BCF8-C69746EC8271}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Test", "src\testing\Python.Test.csproj", "{6F401A34-273B-450F-9A4C-13550BE0767B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.EmbeddingTest", "src\embed_tests\Python.EmbeddingTest.csproj", "{4165C59D-2822-499F-A6DB-EACA4C331EB5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console", "src\console\Console.csproj", "{E29DCF0A-5114-4A98-B1DD-71264B6EA349}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - EmbeddingTest|Any CPU = EmbeddingTest|Any CPU - EmbeddingTest|x64 = EmbeddingTest|x64 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - UnitTests|Any CPU = UnitTests|Any CPU - UnitTests|x64 = UnitTests|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|Any CPU.Build.0 = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|x64.ActiveCfg = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|x64.Build.0 = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.EmbeddingTest|Any CPU.ActiveCfg = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.EmbeddingTest|Any CPU.Build.0 = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.EmbeddingTest|x64.ActiveCfg = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.EmbeddingTest|x64.Build.0 = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|Any CPU.ActiveCfg = Release|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|Any CPU.Build.0 = Release|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|x64.ActiveCfg = Release|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|x64.Build.0 = Release|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.UnitTests|Any CPU.ActiveCfg = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.UnitTests|Any CPU.Build.0 = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.UnitTests|x64.ActiveCfg = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.UnitTests|x64.Build.0 = Debug|x64 - {6F401A34-273B-450F-9A4C-13550BE0767B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Debug|x64.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Debug|x64.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.EmbeddingTest|Any CPU.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.EmbeddingTest|Any CPU.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.EmbeddingTest|x64.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.EmbeddingTest|x64.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Release|Any CPU.Build.0 = Release|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Release|x64.ActiveCfg = Release|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Release|x64.Build.0 = Release|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.UnitTests|Any CPU.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.UnitTests|Any CPU.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.UnitTests|x64.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.UnitTests|x64.Build.0 = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Debug|x64.ActiveCfg = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.EmbeddingTest|Any CPU.ActiveCfg = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.EmbeddingTest|Any CPU.Build.0 = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.EmbeddingTest|x64.ActiveCfg = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.EmbeddingTest|x64.Build.0 = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Release|x64.ActiveCfg = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.UnitTests|Any CPU.ActiveCfg = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.UnitTests|x64.ActiveCfg = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Debug|x64.ActiveCfg = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Debug|x64.Build.0 = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.EmbeddingTest|Any CPU.ActiveCfg = EmbeddingTest|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.EmbeddingTest|Any CPU.Build.0 = EmbeddingTest|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.EmbeddingTest|x64.ActiveCfg = EmbeddingTest|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.EmbeddingTest|x64.Build.0 = EmbeddingTest|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Release|Any CPU.Build.0 = Release|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Release|x64.ActiveCfg = Release|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Release|x64.Build.0 = Release|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.UnitTests|Any CPU.ActiveCfg = UnitTests|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.UnitTests|Any CPU.Build.0 = UnitTests|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.UnitTests|x64.ActiveCfg = UnitTests|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.UnitTests|x64.Build.0 = UnitTests|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/pythonnet_9.sln b/pythonnet_9.sln deleted file mode 100644 index 1d11d7fd8..000000000 --- a/pythonnet_9.sln +++ /dev/null @@ -1,87 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Runtime", "src\runtime\Python.Runtime.csproj", "{097B4AC0-74E9-4C58-BCF8-C69746EC8271}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Test", "src\testing\Python.Test.csproj", "{6F401A34-273B-450F-9A4C-13550BE0767B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.EmbeddingTest", "src\embed_tests\Python.EmbeddingTest.csproj", "{4165C59D-2822-499F-A6DB-EACA4C331EB5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console", "src\console\Console.csproj", "{E29DCF0A-5114-4A98-B1DD-71264B6EA349}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - EmbeddingTest|Any CPU = EmbeddingTest|Any CPU - EmbeddingTest|x64 = EmbeddingTest|x64 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - UnitTests|Any CPU = UnitTests|Any CPU - UnitTests|x64 = UnitTests|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|Any CPU.Build.0 = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|x64.ActiveCfg = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Debug|x64.Build.0 = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.EmbeddingTest|Any CPU.ActiveCfg = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.EmbeddingTest|Any CPU.Build.0 = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.EmbeddingTest|x64.ActiveCfg = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.EmbeddingTest|x64.Build.0 = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|Any CPU.ActiveCfg = Release|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|Any CPU.Build.0 = Release|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|x64.ActiveCfg = Release|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.Release|x64.Build.0 = Release|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.UnitTests|Any CPU.ActiveCfg = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.UnitTests|Any CPU.Build.0 = Debug|Any CPU - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.UnitTests|x64.ActiveCfg = Debug|x64 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271}.UnitTests|x64.Build.0 = Debug|x64 - {6F401A34-273B-450F-9A4C-13550BE0767B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Debug|x64.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Debug|x64.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.EmbeddingTest|Any CPU.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.EmbeddingTest|Any CPU.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.EmbeddingTest|x64.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.EmbeddingTest|x64.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Release|Any CPU.Build.0 = Release|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Release|x64.ActiveCfg = Release|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.Release|x64.Build.0 = Release|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.UnitTests|Any CPU.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.UnitTests|Any CPU.Build.0 = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.UnitTests|x64.ActiveCfg = Debug|Any CPU - {6F401A34-273B-450F-9A4C-13550BE0767B}.UnitTests|x64.Build.0 = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Debug|x64.ActiveCfg = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.EmbeddingTest|Any CPU.ActiveCfg = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.EmbeddingTest|Any CPU.Build.0 = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.EmbeddingTest|x64.ActiveCfg = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.EmbeddingTest|x64.Build.0 = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.Release|x64.ActiveCfg = Release|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.UnitTests|Any CPU.ActiveCfg = Debug|Any CPU - {4165C59D-2822-499F-A6DB-EACA4C331EB5}.UnitTests|x64.ActiveCfg = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Debug|x64.ActiveCfg = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Debug|x64.Build.0 = Debug|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.EmbeddingTest|Any CPU.ActiveCfg = EmbeddingTest|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.EmbeddingTest|Any CPU.Build.0 = EmbeddingTest|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.EmbeddingTest|x64.ActiveCfg = EmbeddingTest|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.EmbeddingTest|x64.Build.0 = EmbeddingTest|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Release|Any CPU.Build.0 = Release|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Release|x64.ActiveCfg = Release|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.Release|x64.Build.0 = Release|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.UnitTests|Any CPU.ActiveCfg = UnitTests|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.UnitTests|Any CPU.Build.0 = UnitTests|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.UnitTests|x64.ActiveCfg = UnitTests|Any CPU - {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.UnitTests|x64.Build.0 = UnitTests|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/console/Console.mdp b/src/console/Console.mdp deleted file mode 100644 index 45c23241d..000000000 --- a/src/console/Console.mdp +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/embed_tests/Embeddingtest.VisualState.xml b/src/embed_tests/Embeddingtest.VisualState.xml deleted file mode 100644 index 4909bca42..000000000 --- a/src/embed_tests/Embeddingtest.VisualState.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - [0-1000]C:\Users\Barton\Documents\Visual Studio 2008\Projects\PySharp\trunk\pythonnet\src\embed_tests\Embeddingtest.nunit - [0-1003]Python.EmbeddingTest.PyImportTest - false - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/runtime/Python.Runtime.mdp b/src/runtime/Python.Runtime.mdp deleted file mode 100644 index 845407ec2..000000000 --- a/src/runtime/Python.Runtime.mdp +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/testing/Python.Test.mdp b/src/testing/Python.Test.mdp deleted file mode 100644 index e8ab5d5cf..000000000 --- a/src/testing/Python.Test.mdp +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 6f9d0ac535d59f56ced280bcf6d87194c48c1a3c Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 12:02:42 -0700 Subject: [PATCH 02/11] Add CHANGELOG Relevant items from todo.txt were opened as tickets --- CHANGELOG.md | 446 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/TODO.txt | 34 ---- doc/changes.txt | 400 ------------------------------------------- 3 files changed, 446 insertions(+), 434 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 doc/TODO.txt delete mode 100644 doc/changes.txt diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..a9a0ab58f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,446 @@ +# Changelog + +All notable changes to Python for .NET will be documented in this file. +This project adheres to [Semantic Versioning][]. + +This document follows the conventions laid out in [Keep a CHANGELOG][]. + +## [Unreleased][] + +### Added + +- Python 3.6 support. +- Added `__version__` to module. + +## [2.2.0-dev1][] - 2016-09-19 + +- Switch to C# 6.0 (#219) +- Relative imports (#219) +- Recursive types (#250) +- Demo fix - stream reading (#225) +- setup.py improvements for locating build tools (#208) +- unmanaged exports updated (#206) +- Mono update pinned to 4.2.4.4 (#233) + +## [2.1.0][] - 2016-04-12 + +### Added + +- Added Python 3.x support. + +### Removed + +- Implicit Type Casting. + +## [2.0.0][] - 2015-06-26 + + Release + +## 2.0.0-alpha.2 + +### Changed + +- First work on Python 2.5 compatibility. The destination version can be + set by defining PYTHON24 or PYTHON25. Python 2.6 compatibility is in + work. + +- Added VS 2005 solution and project files including a UnitTest + configuration which runs the unit test suite. + +- Enhanced unit test suite. All test cases are combined in a single + test suite now. + +- Fixed bugs in generics support for all Python versions. + +- Fixed exception bugs for Python 2.5+. When compiled for Python 2.5+ all + managed exceptions are based on Python's `exceptions.Exception` class. + +- Added deprecation warnings for importing from `CLR.*` and the CLR module. + +- Implemented support for methods with variable arguments + `spam(params object[] egg)` + +- Fixed Mono support by adding a custom marshaler for UCS-4 unicode, + fixing a some ref counter bugs and creating a new makefile.mono. + +- Added a standard python extension to load the clr environment. + The `src/monoclr/` directory contains additional sample code like a + Python binary linked against `libpython2.x.so` and some example code + how to embed Mono and PythonNet in a C application. + +- Added yet another python prompt. This time it's a C application that + embedds both Python and Mono. It may be useful as an example app for + others and I need it to debug a nasty bug. + +- Implemented `ModuleFunctionAttribute` and added + `ForbidPythonThreadsAttribute`. The latter is required for module + functions which invoke Python methods. + +- Added `clr.setPreload()`, `clr.getPreload()`, + `clr.AddReference("assembly name")`, `clr.FindAssembly("name")` + and `clr.ListAssemblies(verbose)`. Automatic preloading can be enabled + with clr.setPreload/True). Preloading is automatically enabled for + interactive Python shells and disabled in all other cases. + +- New Makefile that works for Windows and Mono and autodetects the Python + version and UCS 2/4 setting. + +- Added code for Python 2.3. PythonNet can be build for Python 2.3 again + but it is not fully supported. + +- Changed the PythonException.Message value so it displays the name of + the exception class `Exception` instead of its representation + ``. + +- Added `Python.Runtime.dll.config`. + +## 2.0.0-alpha.1 + +### Changed + +- Moved the Python for .NET project to Sourceforge and moved version + control to Subversion. + +- Removed `CallConvCdecl` attributes and the IL hack that they supported. + .NET 2.x now supports `UnmanagedFunctionPointer`, which does the right + thing without the hackery required in 1.x. This removes a dependency + on ILASM to build the package and better supports Mono (in theory). + +- Refactored import and assembly management machinery. The old `CLR.` + syntax for import is deprecated, but still supported until 3.x. The + recommended style now is to use `from System import xxx`, etc. We + also now support `from X import *` correctly. + +- Implemented a (lowercase) `clr` module to match IronPython for code + compatibility. Methods of this module should be used to explicitly + load assemblies. Implicit (name-based) assembly loading will still + work until 3.x, but it is deprecated. + +- Implemented support for generic types and generic methods using the + same patterns and syntax as IronPython. See the documentation for + usage details. + +- Many small and large performance improvements, switched to generic + collections for some internals, better algorithms for assembly + scanning, etc. + +- Fixed an unboxing issue in generated delegate implementation code + that affected delegates that return value types. + +## [1.0.0][] - 2006-04-08 + +### Changed + +- Backported the refactored import and assembly management from the 2.x + line, mainly to improve the possibility of code-compatibility with + IronPython. + +## 1.0.0-rc.2 + +### Changed + +- Changed some uses of Finalize as a static method name that confused the + Mono compiler and people reading the code. Note that this may be a + breaking change if anyone was calling `PythonEngine.Finalize()`. If so, + you should now use `PythonEngine.Shutdown()`. + +- Tweaked assembly lookup to ensure that assemblies can be found in the + current working directory, even after changing directories using things + like `os.chdir()` from Python. + +- Fixed some incorrect finalizers (thanks to Greg Chapman for the report) + that may have caused some threading oddities. + +- Tweaked support for out and ref parameters. If a method has a return + type of void and a single ref or out parameter, that parameter will be + returned as the result of the method. This matches the current behavior + of IronPython and makes it more likely that code can be moved between + Python for .NET and IP in the future. + +- Refactored part of the assembly manager to remove a potential case of + thread-deadlock in multi-threaded applications. + +- Added a `__str__` method to managed exceptions that returns the Message + attribute of the exception and the StackTrace (if available). + +## 1.0.0-rc.1 + +### Changed + +- Implemented a workaround for the fact that exceptions cannot be new-style + classes in the CPython interpreter. Managed exceptions can now be raised + and caught naturally from Python (hooray!) + +- Implemented support for invoking methods with out and ref parameters. + Because there is no real equivalent to these in Python, methods that + have out or ref parameters will return a tuple. The tuple will contain + the result of the method as its first item, followed by out parameter + values in the order of their declaration in the method signature. + +- Fixed a refcount problem that caused a crash when CLR was imported in + an existing installed Python interpreter. + +- Added an automatic conversion from Python strings to `byte[]`. This makes + it easier to pass `byte[]` data to managed methods (or set properties, + etc.) as a Python string without having to write explicit conversion + code. Also works for sbyte arrays. Note that `byte` and `sbyte` arrays + returned from managed methods or obtained from properties or fields + do _not_ get converted to Python strings - they remain instances of + `Byte[]` or `SByte[]`. + +- Added conversion of generic Python sequences to object arrays when + appropriate (thanks to Mackenzie Straight for the patch). + +- Added a bit of cautionary documentation for embedders, focused on + correct handling of the Python global interpreter lock from managed + code for code that calls into Python. + +- `PyObject.FromManagedObject` now correctly returns the Python None object + if the input is a null reference. Also added a new `AsManagedObject` + method to `PyObject`, making it easier to convert a Python-wrapped managed + object to the real managed object. + +- Created a simple installer for windows platforms. + +## 1.0.0-beta.5 + +### Changed + +- Refactored and fixed threading and global interpreter lock handling, + which was badly broken before. Also added a number of threading and + GIL-handling tests. + +- Related to the GIL fixes, added a note to embedders in the README + about using the AcquireLock and ReleaseLock methods of the PythonEngine + class to manage the GIL. + +- Fixed a problem in `Single <--> float` conversion for cultures that use + different decimal symbols than Python. + +- Added a new `ReloadModule` method to the `PythonEngine` class that hooks + Python module reloading (`PyImport_ReloadModule`). + +- Added a new `StringAsModule` method to the PythonEngine class that can + create a module from a managed string of code. + +- Added a default `__str__` implementation for Python wrappers of managed + objects that calls the `ToString` method of the managed object. + +## 1.0.0-beta.4 + +### Changed + +- Fixed a problem that made it impossible to override "special" methods + like `__getitem__` in subclasses of managed classes. Now the tests all + pass, and there is much rejoicing. + +- Managed classes reflected to Python now have an `__doc__` attribute that + contains a listing of the class constructor signatures. + +- Fixed a problem that prevented passing null (None) for array arguments. + +- Added a number of new argument conversion tests. Thanks to Laurent + Caumont for giving Python for .NET a good workout with managed DirectX. + +- Updated the bundled C Python runtime and libraries to Python 2.4. The + current release is known to also run with Python 2.3. It is known + _not_ to work with older versions due to changes in CPython type + object structure. + +- Mostly fixed the differences in the way that import works depending + on whether you are using the bundled interpreter or an existing Python + interpreter. The hack I used makes import work uniformly for imports + done in Python modules. Unfortunately, there is still a limitation + when using the interpreter interactively: you need to do `import CLR` + first before importing any sub-names when running with an existing + Python interpreter. + + The reason is that the first import of `CLR` installs the CLR import + hook, but for an existing interpreter the standard importer is still + in control for the duration of that first import, so sub-names won't + be found until the next import, which will use the now-installed hook. + +- Added support to directly iterate over objects that support IEnumerator + (as well as IEnumerable). Thanks to Greg Chapman for prodding me ;) + +- Added a section to the README dealing with rebuilding Python for .NET + against other CPython versions. + +- Fixed a problem with accessing properties when only the interface for + an object is known. For example, `ICollection(ob).Count` failed because + Python for .NET mistakenly decided that Count was abstract. + +- Fixed some problems with how COM-based objects are exposed and how + members of inherited interfaces are exposed. Thanks to Bruce Dodson + for patches on this. + +- Changed the Runtime class to use a const string to target the + appropriate CPython dll in DllImport attributes. Now you only + have to change one line to target a new Python version. + +## 1.0.0-beta.3 + +### Changed + +- A dumb bug that could cause a crash on startup on some platforms was + fixed. Decided to update the beta for this, as a number of people + were running into the problem. + +## 1.0.0-beta.2 + +### Changed + +- Exceptions raised as a result of getting or setting properties were + not very helpful (target invokation exception). This has been changed + to pass through the inner exception the way that methods do, which is + much more likely to be the real exception that caused the problem. + +- Events were refactored as the implementation was based on some bad + assumptions. As a result, subscription and unsubscription now works + correctly. A change from beta 1 is that event objects are no longer + directly callable - this was not appropriate, since the internal + implementation of an event is private and cant work reliably. Instead, + you should the appropriate `OnSomeEvent` method published by a class + to fire an event. + +- The distribution did not include the key file, making it a pain for + people to build from source. Added the key file to the distribution + buildout for beta 2. + +- Assemblies can now be found and loaded if they are on the PYTHONPATH. + Previously only the appbase and the GAC were checked. The system now + checks PYTHONPATH first, then the appbase, then the GAC. + +- Fixed a bug in constructor invokation during object instantiation. + +## 1.0.0-beta.1 + +### Changed + +- Added the baseline of the managed embedding API. Some of the details + are still subject to change based on some real-world use and feedback. + + The embedding API is based on the `PyObject` class, along with a number + of specific `PyDict`, `PyList`, (etc.) classes that expose the respective + interfaces of the built-in Python types. The basic structure and usage + is intended be familar to anyone who has used Python / C++ wrapper + libraries like CXX or Boost. + +- Started integrating NUnit2 to support unit tests for the embedding + layer - still need to add the embedding tests (many already exist, + but were written for an older version of NUnit). + +- Added Python iteration protocol support for arrays and managed objects + that implement IEnumerable. This means that you can now use the Python + idiom `for item in object:` on any array or IEnumerable object. + +- Added automatic conversion from Python sequence types to managed array + types. This means, for example, that you can now call a managed method + like AddRange that expects an array with any Python object that supports + the Python sequence protocol, provided the items of the sequence are + convertible to the item type of the managed array. + +- Added new demo scripts, mostly more substantial winforms examples. + +- Finished the unit tests for event support, and fixed lots of problems + with events and delegates as a result. This is one of the trickier + parts of the integration layer, and there is good coverage of these + in the unit tests now. + +- Did a fair amount of profiling with an eval version of ANTS (which is + quite nice, BTW) and made a few changes as a result. + +- Type management was refactored, fixing the issue that caused segfaults + when GC was enabled. Unit tests, stress tests and demo apps now all run + nicely with Python GC enabled. There are one or two things left to fix, + but the fixes should not have any user impact. + +- Changed to base PythonNet on Python 2.3.2. This is considered the most + stable release, and a good 25 - 30% faster as well. + +- Added a new `CLR.dll` that acts as an extension module that allows an + existing unmodified Python 2.3 installation to simply `import CLR` to + bootstrap the managed integration layer. + +- A bug was causing managed methods to only expose overloads declared in + a particular class, hiding inherited overloads of the same name. Fixed + the bug and added some unit tests. + +- Added a virtual `__doc__` attribute to managed methods that contains + the signature of the method. This also means that the Python `help` + function now provides signature info when used on a managed class. + +- Calling managed methods and events `unbound` (passing the instance as + the first argument) now works. There is a caveat for methods - if a + class declares both static and instance methods with the same name, + it is not possible to call that instance method unbound (the static + method will always be called). + +- Overload selection for overloaded methods is now much better and uses + a method resolution algorithm similar to that used by Jython. + +- Changed the managed python.exe wrapper to run as an STA thread, which + seems to be more compatible with winforms apps. This needs a better + solution long-term. One possibility would be a command line switch + so that -sta or -mta could control the python.exe apartment state. + +- Added support for the Python boolean type (True, False). Bool values + now appear as True or False to Python. + +## 1.0.0-alpha.2 + +### Changed + +- Added a Mono makefile. Thanks to Camilo Uribe for help in testing and + working out problems on Mono. Note that it not currently possible to + build PythonNet using mono, due to the use of some IL attributes that + the mono assembler / disassembler doesn't support yet. + +- Preliminary tests show that PythonNet _does_ actually run under mono, + though the test suite bombs out before the end with an "out of memory" + error from the mono runtime. It's just a guess at this point, but I + suspect there may be a limited pool for allocating certain reflection + structures, and Python uses the reflection infrastructure quite heavily. + +- Removed decoys like the non-working embedding APIs; lots of internal + refactoring. + +- Implemented indexer support. Managed instances that implement indexers + can now be used naturally from Python (e.g. `someobject[0]`). + +- Implemented sequence protocol support for managed arrays. + +- Implemented basic thread state management; calls to managed methods + no longer block Python. I won't go so far as to say the thread + choreography is "finished", as I don't have a comprehensive set of + tests to back that up yet (and it will take some work to write a + sufficiently large and evil set of tests). + +- Fixed a bug that caused conversions of managed strings to PyUnicode to + produce mangled values in certain situations. + +- Fixed a number of problems related to subclassing a managed class, + including the fact that it didn't work :) + +- Fixed all of the bugs that were causing tests to fail. This release + contains all new bugs and new failing tests. Progress! :) + +## 1.0.0-alpha.1 + +### Added + +- Initial (mostly) working experimental release. + +[keep a changelog]: http://keepachangelog.com/ + +[semantic versioning]: http://semver.org/ + +[unreleased]: ../../compare/v2.2.0-dev1...HEAD + +[2.2.0-dev1]: ../../compare/v2.1.0...v2.2.0-dev1 + +[2.1.0]: ../../compare/v2.0.0...v2.1.0 + +[2.0.0]: ../../compare/1.0...v2.0.0 + +[1.0.0]: https://github.com/pythonnet/pythonnet/releases/tag/1.0 diff --git a/doc/TODO.txt b/doc/TODO.txt deleted file mode 100644 index b13cf1024..000000000 --- a/doc/TODO.txt +++ /dev/null @@ -1,34 +0,0 @@ -TODO list -========= - -For PythonNet 2.0 ------------------ - - * Implement support for ModulePropertyAttribute. - - * Replace CLRModule.preload code with ModulePropertyAttribute specific code. - - * Deprecate implicit loading of assemblies - - * Debug failing unit tests under Mono and report them if they are caused - by incompatibilities in Mono. - -Future and nice-to-have features --------------------------------- - - * Add support for Python's debug builds. Debug builds have additional fields - in the struct, extensive self testing and C assert() are enabled. Py_DEBUG - implies Py_TRACE_REFS and Py_REF_DEBUG which enlarge the PyObject and - PyVarObject based structs. The Py_INCREF and Py_DECREF macros have a larger - payload as well. They keep track of the absolute number of references and - do tests when an object is GCed. - I've taken care of most of the incompatibilities but the Py_DEBUG build - is still broken. Somehow tp_mro of wrapper_descriptor isn't a tuple. - - * Support Python 2.6. The most important feature I was able to isolate is the - PyType_FastSubclass macro and related TypeFlags in interops.cs. - - * Let's talk to the Debian and Ubuntu maintainers for Python in order to convince - them to build Python with --enable-shared. Ubuntu's Python is semi static and not - linked against libpython2.x.so. This causes trouble with clr.so. - diff --git a/doc/changes.txt b/doc/changes.txt deleted file mode 100644 index 7e577d96c..000000000 --- a/doc/changes.txt +++ /dev/null @@ -1,400 +0,0 @@ -Python for .NET Changes ------------------------ - - PythonNet 2.0 alpha 2 - --------------------------------------------------------------------------- - - - First work on Python 2.5 compatibility. The destination version can be - set by defining PYTHON24 or PYTHON25. Python 2.6 compatibility is in - work. [tiran] - - - Added VS 2005 solution and project files including a UnitTest - configuration which runs the unit test suite. [tiran] - - - Enhanced unit test suite. All test cases are combined in a single - test suite now. [tiran] - - - Fixed bugs in generics support for all Python versions. [tiran] - - - Fixed exception bugs for Python 2.5+. When compiled for Python 2.5+ all - managed exceptions are based on Python's exceptions.Exception class. - [tiran] - - - Added deprecation warnings for importing from CLR.* and the CLR module. - [tiran] - - - Implemented support for methods with variable arguments - spam(params object[] egg) [tiran] - - - Fixed Mono support by adding a custom marshaler for UCS-4 unicode, - fixing a some ref counter bugs and creating a new makefile.mono. - [tiran] - - - Added a standard python extension to load the clr environment. - The src/monoclr/ directory contains additional sample code like a - Python binary linked against libpython2.x.so and some example code - how to embed Mono and PythonNet in a C application. - [tiran] - - - Added yet another python prompt. This time it's a C application that - embedds both Python and Mono. It may be useful as an example app for - others and I need it to debug a nasty bug. [tiran] - - - Implemented ModuleFunctionAttribute and added ForbidPythonThreadsAttribute. - The latter is required for module functions which invoke Python methods. - [tiran] - - - Added clr.setPreload(), clr.getPreload(), clr.AddReference("assembly name"), - clr.FindAssembly("name") and clr.ListAssemblies(verbose). Automatic - preloading can be enabled with clr.setPreload/True). Preloading is - automatically enabled for interactive Python shells and disabled in all - other cases. [tiran] - - - New Makefile that works for Windows and Mono and autodetects the Python - version and UCS 2/4 setting. [tiran] - - - Added code for Python 2.3. PythonNet can be build for Python 2.3 again - but it is not fully supported. [tiran] - - - Changed the PythonException.Message value so it displays the name of - the exception class ("Exception") instead of its representation - (""). - - - Added Python.Runtime.dll.config - - - PythonNet 2.0 alpha 1 - --------------------------------------------------------------------------- - - - Moved the Python for .NET project to Sourceforge and moved version - control to Subversion. - - - Removed CallConvCdecl attributes and the IL hack that they supported. - .NET 2.x now supports UnmanagedFunctionPointer, which does the right - thing without the hackery required in 1.x. This removes a dependency - on ILASM to build the package and better supports Mono (in theory). - - - Refactored import and assembly management machinery. The old 'CLR.' - syntax for import is deprecated, but still supported until 3.x. The - recommended style now is to use 'from System import xxx', etc. We - also now support 'from X import *' correctly. - - - Implemented a (lowercase) 'clr' module to match IronPython for code - compatibility. Methods of this module should be used to explicitly - load assemblies. Implicit (name-based) assembly loading will still - work until 3.x, but it is deprecated. - - - Implemented support for generic types and generic methods using the - same patterns and syntax as IronPython. See the documentation for - usage details. - - - Many small and large performance improvements, switched to generic - collections for some internals, better algorithms for assembly - scanning, etc. - - - Fixed an unboxing issue in generated delegate implementation code - that affected delegates that return value types. - - - PythonNet 1.0 final - --------------------------------------------------------------------------- - - - Backported the refactored import and assembly management from the 2.x - line, mainly to improve the possibility of code-compatibility with - IronPython. - - - PythonNet 1.0 release candidate 2 - --------------------------------------------------------------------------- - - - Changed some uses of Finalize as a static method name that confused the - Mono compiler and people reading the code. Note that this may be a - breaking change if anyone was calling PythonEngine.Finalize(). If so, - you should now use PythonEngine.Shutdown(). - - - Tweaked assembly lookup to ensure that assemblies can be found in the - current working directory, even after changing directories using things - like os.chdir() from Python. - - - Fixed some incorrect finalizers (thanks to Greg Chapman for the report) - that may have caused some threading oddities. - - - Tweaked support for out and ref parameters. If a method has a return - type of void and a single ref or out parameter, that parameter will be - returned as the result of the method. This matches the current behavior - of IronPython and makes it more likely that code can be moved between - Python for .NET and IP in the future. - - - Refactored part of the assembly manager to remove a potential case of - thread-deadlock in multi-threaded applications. - - - Added a __str__ method to managed exceptions that returns the Message - attribute of the exception and the StackTrace (if available). - - - PythonNet 1.0 release candidate 1 - --------------------------------------------------------------------------- - - - Implemented a workaround for the fact that exceptions cannot be new-style - classes in the CPython interpreter. Managed exceptions can now be raised - and caught naturally from Python (hooray!) - - - Implemented support for invoking methods with out and ref parameters. - Because there is no real equivalent to these in Python, methods that - have out or ref parameters will return a tuple. The tuple will contain - the result of the method as its first item, followed by out parameter - values in the order of their declaration in the method signature. - - - Fixed a refcount problem that caused a crash when CLR was imported in - an existing installed Python interpreter. - - - Added an automatic conversion from Python strings to byte[]. This makes - it easier to pass byte[] data to managed methods (or set properties, - etc.) as a Python string without having to write explicit conversion - code. Also works for sbyte arrays. Note that byte and sbyte arrays - returned from managed methods or obtained from properties or fields - do *not* get converted to Python strings - they remain instances of - Byte[] or SByte[]. - - - Added conversion of generic Python sequences to object arrays when - appropriate (thanks to Mackenzie Straight for the patch). - - - Added a bit of cautionary documentation for embedders, focused on - correct handling of the Python global interpreter lock from managed - code for code that calls into Python. - - - PyObject.FromManagedObject now correctly returns the Python None object - if the input is a null reference. Also added a new AsManagedObject - method to PyObject, making it easier to convert a Python-wrapped managed - object to the real managed object. - - - Created a simple installer for windows platforms. - - - PythonNet 1.0 beta 5 - --------------------------------------------------------------------------- - - - Refactored and fixed threading and global interpreter lock handling, - which was badly broken before. Also added a number of threading and - GIL-handling tests. - - - Related to the GIL fixes, added a note to embedders in the README - about using the AcquireLock and ReleaseLock methods of the PythonEngine - class to manage the GIL. - - - Fixed a problem in Single <--> float conversion for cultures that use - different decimal symbols than Python. - - - Added a new ReloadModule method to the PythonEngine class that hooks - Python module reloading (PyImport_ReloadModule). - - - Added a new StringAsModule method to the PythonEngine class that can - create a module from a managed string of code. - - - Added a default __str__ implementation for Python wrappers of managed - objects that calls the ToString method of the managed object. - - - PythonNet 1.0 beta 4 - --------------------------------------------------------------------------- - - - Fixed a problem that made it impossible to override "special" methods - like __getitem__ in subclasses of managed classes. Now the tests all - pass, and there is much rejoicing. - - - Managed classes reflected to Python now have an __doc__ attribute that - contains a listing of the class constructor signatures. - - - Fixed a problem that prevented passing null (None) for array arguments. - - - Added a number of new argument conversion tests. Thanks to Laurent - Caumont for giving Python for .NET a good workout with managed DirectX. - - - Updated the bundled C Python runtime and libraries to Python 2.4. The - current release is known to also run with Python 2.3. It is known - *not* to work with older versions due to changes in CPython type - object structure. - - - Mostly fixed the differences in the way that import works depending - on whether you are using the bundled interpreter or an existing Python - interpreter. The hack I used makes import work uniformly for imports - done in Python modules. Unfortunately, there is still a limitation - when using the interpreter interactively: you need to do 'import CLR' - first before importing any sub-names when running with an existing - Python interpreter. - - The reason is that the first import of 'CLR' installs the CLR import - hook, but for an existing interpreter the standard importer is still - in control for the duration of that first import, so sub-names won't - be found until the next import, which will use the now-installed hook. - - - Added support to directly iterate over objects that support IEnumerator - (as well as IEnumerable). Thanks to Greg Chapman for prodding me ;) - - - Added a section to the README dealing with rebuilding Python for .NET - against other CPython versions. - - - Fixed a problem with accessing properties when only the interface for - an object is known. For example, ICollection(ob).Count failed because - Python for .NET mistakenly decided that Count was abstract. - - - Fixed some problems with how COM-based objects are exposed and how - members of inherited interfaces are exposed. Thanks to Bruce Dodson - for patches on this. - - - Changed the Runtime class to use a const string to target the - appropriate CPython dll in DllImport attributes. Now you only - have to change one line to target a new Python version. - - - PythonNet 1.0 beta 3 - --------------------------------------------------------------------------- - - - A dumb bug that could cause a crash on startup on some platforms was - fixed. Decided to update the beta for this, as a number of people - were running into the problem. - - - PythonNet 1.0 beta 2 - --------------------------------------------------------------------------- - - - Exceptions raised as a result of getting or setting properties were - not very helpful (target invokation exception). This has been changed - to pass through the inner exception the way that methods do, which is - much more likely to be the real exception that caused the problem. - - - Events were refactored as the implementation was based on some bad - assumptions. As a result, subscription and unsubscription now works - correctly. A change from beta 1 is that event objects are no longer - directly callable - this was not appropriate, since the internal - implementation of an event is private and cant work reliably. Instead, - you should the appropriate OnSomeEvent method published by a class - to fire an event. - - - The distribution did not include the key file, making it a pain for - people to build from source. Added the key file to the distribution - buildout for beta 2. - - - Assemblies can now be found and loaded if they are on the PYTHONPATH. - Previously only the appbase and the GAC were checked. The system now - checks PYTHONPATH first, then the appbase, then the GAC. - - - Fixed a bug in constructor invokation during object instantiation. - - - PythonNet 1.0 beta 1 - --------------------------------------------------------------------------- - - - Added the baseline of the managed embedding API. Some of the details - are still subject to change based on some real-world use and feedback. - - The embedding API is based on the PyObject class, along with a number - of specific PyDict, PyList, (etc.) classes that expose the respective - interfaces of the built-in Python types. The basic structure and usage - is intended be familar to anyone who has used Python / C++ wrapper - libraries like CXX or Boost. - - - Started integrating NUnit2 to support unit tests for the embedding - layer - still need to add the embedding tests (many already exist, - but were written for an older version of NUnit). - - - Added Python iteration protocol support for arrays and managed objects - that implement IEnumerable. This means that you can now use the Python - idiom 'for item in object:' on any array or IEnumerable object. - - - Added automatic conversion from Python sequence types to managed array - types. This means, for example, that you can now call a managed method - like AddRange that expects an array with any Python object that supports - the Python sequence protocol, provided the items of the sequence are - convertible to the item type of the managed array. - - - Added new demo scripts, mostly more substantial winforms examples. - - - Finished the unit tests for event support, and fixed lots of problems - with events and delegates as a result. This is one of the trickier - parts of the integration layer, and there is good coverage of these - in the unit tests now. - - - Did a fair amount of profiling with an eval version of ANTS (which is - quite nice, BTW) and made a few changes as a result. - - - Type management was refactored, fixing the issue that caused segfaults - when GC was enabled. Unit tests, stress tests and demo apps now all run - nicely with Python GC enabled. There are one or two things left to fix, - but the fixes should not have any user impact. - - - Changed to base PythonNet on Python 2.3.2. This is considered the most - stable release, and a good 25 - 30% faster as well. - - - Added a new 'CLR.dll' that acts as an extension module that allows an - existing unmodified Python 2.3 installation to simply 'import CLR' to - bootstrap the managed integration layer. - - - A bug was causing managed methods to only expose overloads declared in - a particular class, hiding inherited overloads of the same name. Fixed - the bug and added some unit tests. - - - Added a virtual '__doc__' attribute to managed methods that contains - the signature of the method. This also means that the Python 'help' - function now provides signature info when used on a managed class. - - - Calling managed methods and events 'unbound' (passing the instance as - the first argument) now works. There is a caveat for methods - if a - class declares both static and instance methods with the same name, - it is not possible to call that instance method unbound (the static - method will always be called). - - - Overload selection for overloaded methods is now much better and uses - a method resolution algorithm similar to that used by Jython. - - - Changed the managed python.exe wrapper to run as an STA thread, which - seems to be more compatible with winforms apps. This needs a better - solution long-term. One possibility would be a command line switch - so that -sta or -mta could control the python.exe apartment state. - - - Added support for the Python boolean type (True, False). Bool values - now appear as True or False to Python. - - - PythonNet Preview 2 - --------------------------------------------------------------------------- - - - Added a Mono makefile. Thanks to Camilo Uribe for help in testing and - working out problems on Mono. Note that it not currently possible to - build PythonNet using mono, due to the use of some IL attributes that - the mono assembler / disassembler doesn't support yet. - - - Preliminary tests show that PythonNet *does* actually run under mono, - though the test suite bombs out before the end with an "out of memory" - error from the mono runtime. It's just a guess at this point, but I - suspect there may be a limited pool for allocating certain reflection - structures, and Python uses the reflection infrastructure quite heavily. - - - Removed decoys like the non-working embedding APIs; lots of internal - refactoring. - - - Implemented indexer support. Managed instances that implement indexers - can now be used naturally from Python ( e.g. someobject[0] ). - - - Implemented sequence protocol support for managed arrays. - - - Implemented basic thread state management; calls to managed methods - no longer block Python. I won't go so far as to say the thread - choreography is "finished", as I don't have a comprehensive set of - tests to back that up yet (and it will take some work to write a - sufficiently large and evil set of tests). - - - Fixed a bug that caused conversions of managed strings to PyUnicode to - produce mangled values in certain situations. - - - Fixed a number of problems related to subclassing a managed class, - including the fact that it didn't work :) - - - Fixed all of the bugs that were causing tests to fail. This release - contains all new bugs and new failing tests. Progress! :) - - - PythonNet Preview 1 - --------------------------------------------------------------------------- - - - Initial (mostly) working experimental release. From 33a88012b802020052f1b0fef8e15c950e12cd0e Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 17:32:47 -0700 Subject: [PATCH 03/11] Fix references to `snk` file --- src/embed_tests/Python.EmbeddingTest.csproj | 2 +- src/runtime/Python.Runtime.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/embed_tests/Python.EmbeddingTest.csproj b/src/embed_tests/Python.EmbeddingTest.csproj index 80a4a9820..c16a60609 100644 --- a/src/embed_tests/Python.EmbeddingTest.csproj +++ b/src/embed_tests/Python.EmbeddingTest.csproj @@ -138,7 +138,7 @@ - + diff --git a/src/runtime/Python.Runtime.csproj b/src/runtime/Python.Runtime.csproj index 1e54d2742..8f0b09996 100644 --- a/src/runtime/Python.Runtime.csproj +++ b/src/runtime/Python.Runtime.csproj @@ -188,7 +188,7 @@ - + From 9dee2211b8812abe32d8062ebe20301fd4cb1154 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 18:48:13 -0700 Subject: [PATCH 04/11] Remove unreferences files in `.\src` `sourceforge-logo.png` not sure why it existed `clrmodule.pp.il` used to be part of the makefile build to create `clrmodule.il`. No longer used. `oldmodule.il` is an old copy of `clrmodule.il` commit: 927bbf13328f21d9e6c6c21075429d2787ef1d45 --- src/console/sourceforge-logo.png | Bin 25796 -> 0 bytes src/runtime/clrmodule.pp.il | 271 ------------------------------- src/runtime/oldmodule.il | 266 ------------------------------ 3 files changed, 537 deletions(-) delete mode 100644 src/console/sourceforge-logo.png delete mode 100644 src/runtime/clrmodule.pp.il delete mode 100644 src/runtime/oldmodule.il diff --git a/src/console/sourceforge-logo.png b/src/console/sourceforge-logo.png deleted file mode 100644 index 14c4143ccf1bf89f666e48474c84e96b901ef8c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25796 zcmaHSc|26#|Npr&_B|F+P0}0Eqn& z0z6#oH^*DW9ssz-n4CUobNAO$;}+p+>pNC2AwK6#gxmm3by?-WA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x;0&xIdtr(A7q zJLn|gti+_qrENw36wvS0#aQLvn2n#B_}1ljp;o(j!BQvM_llslWqDVysIB=@zcMn& zR`cf{_vcR~AAPX;-kFu#^KY*P@+4hqBsUh-`*|07Q-SuB&rV`_5U|?ZG?NDA8 z(nG44ff2~)h(JZ}&odv?2(?GamHK832khohbHDuH19{;iYxPJ3CLYOmUM_KUK5@8G71SdCX^E?Jd}SJf%Vp-}GT7k2$FqSpbbt4{0F2zshy z&%~3J7S4*UjU*+dUxV4Vzk;C8H0qX=XByvHBX_J&fA(LqQC|vD9iKJVL*P%O|6#<( zEssq9`B|ZaP^4p6`NX7Kx4cVs(u+qdm8&kB+RIPW`-Gdsa!_#(v6YRxa!Dg!rxaqN zu$w2^PA23(A9oZF*L+VhG`{8~)SV}IpAhr@)g z`x@nXup{}Sx%`p5?245H9LeK+3wbnAWe+`;sJL54@~BnzeajmE)R(%#{n+1f?71$) zr&`!%W3b!B0-IFWa;@qxq4)6K)Wbb4Pw2K0k#sRbo}zXTFaPr5Nx0#iOqb|VwbJ$K zslV|%x@hb4U{c7bfN5Ga8m2^a3EJ~UaI!;3$!@K57R~a$wSAeF@$zq!?mgW^el(4U zB9^A83armtjaVo}b4V6OU`CpjF5!#GGIw*ExWBQnW1D#*%Ciw;>`K`=z7(j;~k*D46e^iNfTZo7oEBQXJ4;mU8^!~pekzY6PHIW*!n1dULco`Ad M?%8iyYtD%Me_aar8~^|S diff --git a/src/runtime/clrmodule.pp.il b/src/runtime/clrmodule.pp.il deleted file mode 100644 index 27eb78432..000000000 --- a/src/runtime/clrmodule.pp.il +++ /dev/null @@ -1,271 +0,0 @@ - -//============================================================================ -// This file is a hand-maintained stub - it implements clr.dll, which can be -// loaded by a standard CPython interpreter as an extension module. When it -// is loaded, it bootstraps the managed runtime integration layer and defers -// to it to do initialization and put the clr module into sys.modules, etc. - -// The "USE_PYTHON_RUNTIME_*" defines control what extra evidence is used -// to help the CLR find the appropriate Python.Runtime assembly. - -// If defined, the "pythonRuntimeVersionString" variable must be set to -// Python.Runtime's current version. -#define USE_PYTHON_RUNTIME_VERSION - -// If defined, the "PythonRuntimePublicKeyTokenData" data array must be -// set to Python.Runtime's public key token. -//#define USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - -// If DEBUG_PRINT is defined, a few System.Console.WriteLine calls are made -// to indicate what's going on during the load... -//#define DEBUG_PRINT -//============================================================================ - -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .ver 2:0:0:0 -} - -.assembly clr -{ - .hash algorithm 0x00008004 - .ver 2:0:0:2 -} - -.module clr.dll -.imagebase 0x00400000 -.subsystem 0x00000003 -.file alignment 512 - -// This includes the platform-specific IL. The include search path -// is set depending on whether we're compiling 32 or 64 bit. -// This MUST come before any other .data directives! -// Why, oh why, can't ilasm support command line #defines? :( - -// Contributed by VIKAS DHIMAN - Handled by /home/barton/Projects/PyDotNet/pythonnet/makefile -// gcc -C -P -x c++ -I $(ARCH) clrmodule.pp.il -o clrmodule.il -// to copy the correct architecture to the clrModule. -// Nice formating, as well - Thanks, Vikas! -#include "clrmodule-platform.il" - -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN -.data PythonRuntimePublicKeyTokenData = bytearray (64 e1 4e 84 5a bf 2e 60) -#endif - -.class public auto ansi beforefieldinit clrModule extends [mscorlib]System.Object -{ -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - .field static assembly int64 PythonRuntimePublicKeyToken at PythonRuntimePublicKeyTokenData -#endif - - .method public hidebysig specialname rtspecialname instance void - .ctor() cil managed - { - .maxstack 1 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - - .method public hidebysig static void modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - initclr() cil managed - { - .vtentry 1:1 - .export [1] as initclr - - .maxstack 6 - .locals init ( - class [mscorlib]System.Reflection.Assembly pythonRuntime, - class [mscorlib]System.Reflection.Assembly executingAssembly, - class [mscorlib]System.Reflection.AssemblyName pythonRuntimeName, - class [mscorlib]System.Type pythonEngineType, - int8[] publicKeyToken, - string assemblyDirectory, - string pythonRuntimeVersionString, - string pythonRuntimeDllPath) - - // pythonRuntime = null; - ldnull - stloc pythonRuntime - - .try - { -#ifdef DEBUG_PRINT - ldstr "Attempting to load Python.Runtime using standard binding rules... " - call void [mscorlib]System.Console::Write(string) -#endif - - // Attempt to find and load Python.Runtime using standard assembly binding rules. - // This roughly translates into looking in order: - // - GAC - // - ApplicationBase - // - A PrivateBinPath under ApplicationBase - // With an unsigned assembly, the GAC is skipped. - - // System.Reflection.AssemblyName pythonRuntimeName = new System.Reflection.AssemblyName(); - newobj instance void [mscorlib]System.Reflection.AssemblyName::.ctor() - stloc pythonRuntimeName - - // pythonRuntimeName.Name = "Python.Runtime"; - ldloc pythonRuntimeName - ldstr "Python.Runtime" - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_Name(string) - -#ifdef USE_PYTHON_RUNTIME_VERSION - // pythonRuntimeVersionString = "..."; - ldstr "2.0.0.2" - stloc pythonRuntimeVersionString - - // pythonRuntimeName.Version = new Version(pythonRuntimeVersionString); - ldloc pythonRuntimeName - ldloc pythonRuntimeVersionString - newobj instance void [mscorlib]System.Version::.ctor(string) - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_Version(class [mscorlib]System.Version) -#endif - -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - // publicKeyToken = new byte[] { ... }; - ldc.i4.8 - newarr [mscorlib]System.Byte - dup - ldtoken field int64 clrModule::PythonRuntimePublicKeyToken - call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array, valuetype [mscorlib]System.RuntimeFieldHandle) - stloc publicKeyToken - - // pythonRuntimeName.SetPublicKeyToken(publicKeyToken); - ldloc pythonRuntimeName - ldloc publicKeyToken - callvirt instance void [mscorlib]System.Reflection.AssemblyName::SetPublicKeyToken(uint8[]) -#endif - - // pythonRuntimeName.CultureInfo = System.Globalization.CultureInfo.InvariantCulture; - ldloc pythonRuntimeName - call class [mscorlib]System.Globalization.CultureInfo [mscorlib]System.Globalization.CultureInfo::get_InvariantCulture() - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_CultureInfo(class [mscorlib]System.Globalization.CultureInfo) - - // return System.Reflection.Assembly.Load(pythonRuntimeName); - ldloc pythonRuntimeName - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::Load(class [mscorlib]System.Reflection.AssemblyName) - stloc pythonRuntime - -#ifdef DEBUG_PRINT - ldstr "Success!" - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s LOADED_PYTHON_RUNTIME - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Failed." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_CLR_LOAD - } - EXIT_CLR_LOAD: nop - - .try - { - // If the above fails for any reason, we fallback to attempting to load "Python.Runtime.dll" - // from the directory this assembly is running in. "This assembly" is probably "clr.pyd", - // sitting somewhere in PYTHONPATH. This is using Assembly.LoadFrom, and inherits all the - // caveats of that call. See MSDN docs for details. - // Suzanne Cook's blog is also an excellent source of info on this: - // http://blogs.msdn.com/suzcook/ - // http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx - // http://blogs.msdn.com/suzcook/archive/2003/06/13/57180.aspx - // executingAssembly = System.Reflection.Assembly.GetExecutingAssembly(); - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::GetExecutingAssembly() - stloc executingAssembly - - // assemblyDirectory = System.IO.Path.GetDirectoryName(executingAssembly.Location); - ldloc executingAssembly - callvirt instance string [mscorlib]System.Reflection.Assembly::get_Location() - call string [mscorlib]System.IO.Path::GetDirectoryName(string) - stloc assemblyDirectory - - // pythonRuntimeDllPath = System.IO.Path.Combine(assemblyDirectory, "Python.Runtime.dll"); - ldloc assemblyDirectory - ldstr "Python.Runtime.dll" - call string [mscorlib]System.IO.Path::Combine(string, string) - stloc pythonRuntimeDllPath - -#ifdef DEBUG_PRINT - ldstr "Attempting to load Python.Runtime from: '{0}'... " - ldloc pythonRuntimeDllPath - call void [mscorlib]System.Console::Write(string, object) -#endif - - // pythonRuntime = System.Reflection.Assembly.LoadFrom(pythonRuntimeDllPath); - ldloc pythonRuntimeDllPath - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::LoadFrom(string) - stloc pythonRuntime - -#ifdef DEBUG_PRINT - ldstr "Success!" - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s LOADED_PYTHON_RUNTIME - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Failed." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_PYTHONPATH_LOAD - } - EXIT_PYTHONPATH_LOAD: nop - - // If we get here, we haven't loaded Python.Runtime, so bail. -#ifdef DEBUG_PRINT - ldstr "Could not load Python.Runtime, so sad." - call void [mscorlib]System.Console::WriteLine(string) -#endif - ret - - // Once here, we've successfully loaded SOME version of Python.Runtime - // So now we get the PythonEngine and execute the InitExt method on it. - LOADED_PYTHON_RUNTIME: nop - .try - { -#ifdef DEBUG_PRINT - ldstr "Running Python.Runtime.PythonEngine.InitExt()" - call void [mscorlib]System.Console::WriteLine(string) -#endif - // pythonEngineType = pythonRuntime.GetType("Python.Runtime.PythonEngine"); - ldloc pythonRuntime - ldstr "Python.Runtime.PythonEngine" - callvirt instance class [mscorlib]System.Type [mscorlib]System.Reflection.Assembly::GetType(string) - stloc pythonEngineType - - // pythonEngineType.InvokeMember("InitExt", System.Reflection.BindingFlags.InvokeMethod, null, null, null); - ldloc pythonEngineType - ldstr "InitExt" - ldc.i4 0x100 - ldnull - ldnull - ldnull - callvirt instance object [mscorlib]System.Type::InvokeMember( string, - valuetype [mscorlib]System.Reflection.BindingFlags, - class [mscorlib]System.Reflection.Binder, - object, - object[]) - pop - leave.s EXIT_TRY_INVOKE - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Error calling Python.Runtime.PythonEngine.InitExt()." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_TRY_INVOKE - } - EXIT_TRY_INVOKE: nop - - ret - } -} - diff --git a/src/runtime/oldmodule.il b/src/runtime/oldmodule.il deleted file mode 100644 index b9e3883c9..000000000 --- a/src/runtime/oldmodule.il +++ /dev/null @@ -1,266 +0,0 @@ - -//============================================================================ -// This file is a hand-maintained stub - it implements clr.dll, which can be -// loaded by a standard CPython interpreter as an extension module. When it -// is loaded, it bootstraps the managed runtime integration layer and defers -// to it to do initialization and put the clr module into sys.modules, etc. - -// The "USE_PYTHON_RUNTIME_*" defines control what extra evidence is used -// to help the CLR find the appropriate Python.Runtime assembly. - -// If defined, the "pythonRuntimeVersionString" variable must be set to -// Python.Runtime's current version. -#define USE_PYTHON_RUNTIME_VERSION - -// If defined, the "PythonRuntimePublicKeyTokenData" data array must be -// set to Python.Runtime's public key token. -//#define USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - -// If DEBUG_PRINT is defined, a few System.Console.WriteLine calls are made -// to indicate what's going on during the load... -//#define DEBUG_PRINT -//============================================================================ - -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .ver 2:0:0:0 -} - -.assembly clr -{ - .hash algorithm 0x00008004 - .ver 2:0:0:2 -} - -.module clr.dll -.imagebase 0x00400000 -.subsystem 0x00000003 -.file alignment 512 - -// This includes the platform-specific IL. The include search path -// is set depending on whether we're compiling 32 or 64 bit. -// This MUST come before any other .data directives! -// Why, oh why, can't ilasm support command line #defines? :( -#include "clrmodule-platform.il" - -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN -.data PythonRuntimePublicKeyTokenData = bytearray (64 e1 4e 84 5a bf 2e 60) -#endif - -.class public auto ansi beforefieldinit clrModule extends [mscorlib]System.Object -{ -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - .field static assembly int64 PythonRuntimePublicKeyToken at PythonRuntimePublicKeyTokenData -#endif - - .method public hidebysig specialname rtspecialname instance void - .ctor() cil managed - { - .maxstack 1 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - - .method public hidebysig static void modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - initclr() cil managed - { - .vtentry 1:1 - .export [1] as initclr - - .maxstack 6 - .locals init ( - class [mscorlib]System.Reflection.Assembly pythonRuntime, - class [mscorlib]System.Reflection.Assembly executingAssembly, - class [mscorlib]System.Reflection.AssemblyName pythonRuntimeName, - class [mscorlib]System.Type pythonEngineType, - int8[] publicKeyToken, - string assemblyDirectory, - string pythonRuntimeVersionString, - string pythonRuntimeDllPath) - - // pythonRuntime = null; - ldnull - stloc pythonRuntime - - .try - { -#ifdef DEBUG_PRINT - ldstr "Attempting to load Python.Runtime using standard binding rules... " - call void [mscorlib]System.Console::Write(string) -#endif - - // Attempt to find and load Python.Runtime using standard assembly binding rules. - // This roughly translates into looking in order: - // - GAC - // - ApplicationBase - // - A PrivateBinPath under ApplicationBase - // With an unsigned assembly, the GAC is skipped. - - // System.Reflection.AssemblyName pythonRuntimeName = new System.Reflection.AssemblyName(); - newobj instance void [mscorlib]System.Reflection.AssemblyName::.ctor() - stloc pythonRuntimeName - - // pythonRuntimeName.Name = "Python.Runtime"; - ldloc pythonRuntimeName - ldstr "Python.Runtime" - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_Name(string) - -#ifdef USE_PYTHON_RUNTIME_VERSION - // pythonRuntimeVersionString = "..."; - ldstr "2.0.0.2" - stloc pythonRuntimeVersionString - - // pythonRuntimeName.Version = new Version(pythonRuntimeVersionString); - ldloc pythonRuntimeName - ldloc pythonRuntimeVersionString - newobj instance void [mscorlib]System.Version::.ctor(string) - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_Version(class [mscorlib]System.Version) -#endif - -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - // publicKeyToken = new byte[] { ... }; - ldc.i4.8 - newarr [mscorlib]System.Byte - dup - ldtoken field int64 clrModule::PythonRuntimePublicKeyToken - call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array, valuetype [mscorlib]System.RuntimeFieldHandle) - stloc publicKeyToken - - // pythonRuntimeName.SetPublicKeyToken(publicKeyToken); - ldloc pythonRuntimeName - ldloc publicKeyToken - callvirt instance void [mscorlib]System.Reflection.AssemblyName::SetPublicKeyToken(uint8[]) -#endif - - // pythonRuntimeName.CultureInfo = System.Globalization.CultureInfo.InvariantCulture; - ldloc pythonRuntimeName - call class [mscorlib]System.Globalization.CultureInfo [mscorlib]System.Globalization.CultureInfo::get_InvariantCulture() - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_CultureInfo(class [mscorlib]System.Globalization.CultureInfo) - - // return System.Reflection.Assembly.Load(pythonRuntimeName); - ldloc pythonRuntimeName - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::Load(class [mscorlib]System.Reflection.AssemblyName) - stloc pythonRuntime - -#ifdef DEBUG_PRINT - ldstr "Success!" - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s LOADED_PYTHON_RUNTIME - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Failed." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_CLR_LOAD - } - EXIT_CLR_LOAD: nop - - .try - { - // If the above fails for any reason, we fallback to attempting to load "Python.Runtime.dll" - // from the directory this assembly is running in. "This assembly" is probably "clr.pyd", - // sitting somewhere in PYTHONPATH. This is using Assembly.LoadFrom, and inherits all the - // caveats of that call. See MSDN docs for details. - // Suzanne Cook's blog is also an excellent source of info on this: - // http://blogs.msdn.com/suzcook/ - // http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx - // http://blogs.msdn.com/suzcook/archive/2003/06/13/57180.aspx - // executingAssembly = System.Reflection.Assembly.GetExecutingAssembly(); - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::GetExecutingAssembly() - stloc executingAssembly - - // assemblyDirectory = System.IO.Path.GetDirectoryName(executingAssembly.Location); - ldloc executingAssembly - callvirt instance string [mscorlib]System.Reflection.Assembly::get_Location() - call string [mscorlib]System.IO.Path::GetDirectoryName(string) - stloc assemblyDirectory - - // pythonRuntimeDllPath = System.IO.Path.Combine(assemblyDirectory, "Python.Runtime.dll"); - ldloc assemblyDirectory - ldstr "Python.Runtime.dll" - call string [mscorlib]System.IO.Path::Combine(string, string) - stloc pythonRuntimeDllPath - -#ifdef DEBUG_PRINT - ldstr "Attempting to load Python.Runtime from: '{0}'... " - ldloc pythonRuntimeDllPath - call void [mscorlib]System.Console::Write(string, object) -#endif - - // pythonRuntime = System.Reflection.Assembly.LoadFrom(pythonRuntimeDllPath); - ldloc pythonRuntimeDllPath - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::LoadFrom(string) - stloc pythonRuntime - -#ifdef DEBUG_PRINT - ldstr "Success!" - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s LOADED_PYTHON_RUNTIME - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Failed." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_PYTHONPATH_LOAD - } - EXIT_PYTHONPATH_LOAD: nop - - // If we get here, we haven't loaded Python.Runtime, so bail. -#ifdef DEBUG_PRINT - ldstr "Could not load Python.Runtime, so sad." - call void [mscorlib]System.Console::WriteLine(string) -#endif - ret; - - // Once here, we've successfully loaded SOME version of Python.Runtime - // So now we get the PythonEngine and execute the InitExt method on it. - LOADED_PYTHON_RUNTIME: nop - .try - { -#ifdef DEBUG_PRINT - ldstr "Running Python.Runtime.PythonEngine.InitExt()" - call void [mscorlib]System.Console::WriteLine(string) -#endif - // pythonEngineType = pythonRuntime.GetType("Python.Runtime.PythonEngine"); - ldloc pythonRuntime - ldstr "Python.Runtime.PythonEngine" - callvirt instance class [mscorlib]System.Type [mscorlib]System.Reflection.Assembly::GetType(string) - stloc pythonEngineType - - // pythonEngineType.InvokeMember("InitExt", System.Reflection.BindingFlags.InvokeMethod, null, null, null); - ldloc pythonEngineType - ldstr "InitExt" - ldc.i4 0x100 - ldnull - ldnull - ldnull - callvirt instance object [mscorlib]System.Type::InvokeMember( string, - valuetype [mscorlib]System.Reflection.BindingFlags, - class [mscorlib]System.Reflection.Binder, - object, - object[]) - pop - leave.s EXIT_TRY_INVOKE - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Error calling Python.Runtime.PythonEngine.InitExt()." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_TRY_INVOKE - } - EXIT_TRY_INVOKE: nop - - ret - } -} - From dd3e5dd16109c4a426327c23a655fccaea5a8852 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 19:43:27 -0700 Subject: [PATCH 05/11] Update runtime project file - Add reference to py3.3 and py3.6 interop files - Add missing preprocessor to py3.3 interop - Remove unused build script. Unref on commit: 53003430fbceb46d0a3f8bfa0c7393ce2eb75631 Note, looks like nothing uses `clrmodule.il` anymore. Leaving it for now. --- src/runtime/Python.Runtime.csproj | 3 ++- src/runtime/buildclrmodule.bat | 36 ------------------------------- src/runtime/interop33.cs | 2 ++ 3 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 src/runtime/buildclrmodule.bat diff --git a/src/runtime/Python.Runtime.csproj b/src/runtime/Python.Runtime.csproj index 8f0b09996..bb44eb8e6 100644 --- a/src/runtime/Python.Runtime.csproj +++ b/src/runtime/Python.Runtime.csproj @@ -182,11 +182,12 @@ + + - diff --git a/src/runtime/buildclrmodule.bat b/src/runtime/buildclrmodule.bat deleted file mode 100644 index 549902d7f..000000000 --- a/src/runtime/buildclrmodule.bat +++ /dev/null @@ -1,36 +0,0 @@ -:: Call with buildclrmodule.bat - -@echo off - -set TARGET_PLATFORM=%1 -set INPUT_DIRECTORY=%~2 -set INPUT_PATH="%INPUT_DIRECTORY%\clrmodule.il" -set OUTPUT_PATH=%3 - -if %TARGET_PLATFORM%==x86 goto SETUP32 -if %TARGET_PLATFORM%==x64 goto SETUP64 -goto ERROR_BAD_PLATFORM - -:SETUP32 -set INCLUDE_PATH="%INPUT_DIRECTORY%\x86" -goto BUILD_CLR_MODULE - -:SETUP64 -set INCLUDE_PATH="%INPUT_DIRECTORY%\x64" -set ILASM_EXTRA_ARGS=/pe64 /x64 -goto BUILD_CLR_MODULE - -:ERROR_BAD_PLATFORM -echo Unknown target platform: %TARGET_PLATFORM% -exit /b 1 - -:ERROR_MISSING_INPUT -echo Can't find input file: %INPUT_PATH% -exit /b 1 - -:BUILD_CLR_MODULE -if not exist %INPUT_PATH% goto ERROR_MISSING_INPUT -%windir%\Microsoft.NET\Framework\v4.0.30319\ilasm /nologo /quiet /dll %ILASM_EXTRA_ARGS% /include=%INCLUDE_PATH% /output=%OUTPUT_PATH% %INPUT_PATH% - -::: 2.0 or 3.5 -:::%windir%\Microsoft.NET\Framework\v2.0.50727\ilasm /nologo /quiet /dll %ILASM_EXTRA_ARGS% /include=%INCLUDE_PATH% /output=%OUTPUT_PATH% %INPUT_PATH% diff --git a/src/runtime/interop33.cs b/src/runtime/interop33.cs index 88e9022e4..27a7fe982 100644 --- a/src/runtime/interop33.cs +++ b/src/runtime/interop33.cs @@ -2,6 +2,7 @@ // Auto-generated by geninterop.py. // DO NOT MODIFIY BY HAND. +#if (PYTHON33) using System; using System.Collections; using System.Collections.Specialized; @@ -135,3 +136,4 @@ public static int magic() { public static int members = 0; } } +#endif From dd0650170168e665e2d8c98457ea2ce64104baa2 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 20:50:10 -0700 Subject: [PATCH 06/11] Update setup.py classifiers and tests - Remove py32 classifier - Stop testing on unsupported python versions - Add python33 testing - Changed check_output to _check_output --- .travis.yml | 2 +- setup.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 190a89447..3cb826c98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: required language: python python: - 2.7 - - 3.2 + - 3.3 - 3.4 - 3.5 - 3.6 diff --git a/setup.py b/setup.py index c5b00049d..cda322ccd 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ from distutils.spawn import find_executable from distutils import log from platform import architecture -from subprocess import Popen, CalledProcessError, PIPE, check_call, check_output +from subprocess import Popen, CalledProcessError, PIPE, check_call from glob import glob import fnmatch import sys @@ -155,8 +155,8 @@ def build_extension(self, ext): enable_shared = get_config_var("Py_ENABLE_SHARED") if enable_shared: # Double-check if libpython is linked dynamically with python - lddout = check_output(["ldd", sys.executable]) - if b'libpython' not in lddout: + lddout = _check_output(["ldd", sys.executable]) + if 'libpython' not in lddout: enable_shared = False if not enable_shared: @@ -339,11 +339,10 @@ def _get_interop_filename(): author="Python for .Net developers", classifiers=[ 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.6', 'Programming Language :: C#', 'License :: OSI Approved :: Zope Public License', 'Development Status :: 5 - Production/Stable', From 39c4e4b1cf67f3d45cc59df7fe22a3db11350ef9 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 21:07:45 -0700 Subject: [PATCH 07/11] Fix warning, add missing build cfg for mono. > warning : The project configuration for project 'clrmodule' corresponding to the solution configuration 'ReleaseMono|x64' was not found. --- pythonnet.sln | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pythonnet.sln b/pythonnet.sln index 64bf45fa2..15ef48d4e 100644 --- a/pythonnet.sln +++ b/pythonnet.sln @@ -89,10 +89,14 @@ Global {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.ReleaseWin|x64.Build.0 = Release|x64 {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.ReleaseWin|x86.ActiveCfg = Release|x86 {E29DCF0A-5114-4A98-B1DD-71264B6EA349}.ReleaseWin|x86.Build.0 = Release|x86 + {86E834DE-1139-4511-96CC-69636A56E7AC}.DebugMono|x64.ActiveCfg = DebugWin|x64 + {86E834DE-1139-4511-96CC-69636A56E7AC}.DebugMono|x86.ActiveCfg = DebugWin|x86 {86E834DE-1139-4511-96CC-69636A56E7AC}.DebugWin|x64.ActiveCfg = DebugWin|x64 {86E834DE-1139-4511-96CC-69636A56E7AC}.DebugWin|x64.Build.0 = DebugWin|x64 {86E834DE-1139-4511-96CC-69636A56E7AC}.DebugWin|x86.ActiveCfg = DebugWin|x86 {86E834DE-1139-4511-96CC-69636A56E7AC}.DebugWin|x86.Build.0 = DebugWin|x86 + {86E834DE-1139-4511-96CC-69636A56E7AC}.ReleaseMono|x64.ActiveCfg = ReleaseWin|x64 + {86E834DE-1139-4511-96CC-69636A56E7AC}.ReleaseMono|x86.ActiveCfg = ReleaseWin|x86 {86E834DE-1139-4511-96CC-69636A56E7AC}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64 {86E834DE-1139-4511-96CC-69636A56E7AC}.ReleaseWin|x64.Build.0 = ReleaseWin|x64 {86E834DE-1139-4511-96CC-69636A56E7AC}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86 From e66b39786e832f63fbaa9ccad8b0664ce1ab6ba5 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 21:12:07 -0700 Subject: [PATCH 08/11] Flatten clrmodule AssemblyInfo.cs --- src/clrmodule/{Properties => }/AssemblyInfo.cs | 0 src/clrmodule/clrmodule.csproj | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) rename src/clrmodule/{Properties => }/AssemblyInfo.cs (100%) diff --git a/src/clrmodule/Properties/AssemblyInfo.cs b/src/clrmodule/AssemblyInfo.cs similarity index 100% rename from src/clrmodule/Properties/AssemblyInfo.cs rename to src/clrmodule/AssemblyInfo.cs diff --git a/src/clrmodule/clrmodule.csproj b/src/clrmodule/clrmodule.csproj index a062d3bf2..f1e302ffe 100644 --- a/src/clrmodule/clrmodule.csproj +++ b/src/clrmodule/clrmodule.csproj @@ -7,7 +7,6 @@ 2.0 {86E834DE-1139-4511-96CC-69636A56E7AC} Library - Properties clrmodule clrmodule v4.0 @@ -117,7 +116,7 @@ - + From f7b71f592a9c0a9d4bfab83023339e02adc97b90 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 8 Jan 2017 21:20:46 -0700 Subject: [PATCH 09/11] Unneeded print in unittests --- src/tests/test_constructors.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/test_constructors.py b/src/tests/test_constructors.py index fdc1ef060..6e02528bb 100644 --- a/src/tests/test_constructors.py +++ b/src/tests/test_constructors.py @@ -44,7 +44,6 @@ class sub(System.Exception): instance = sub() ob = SubclassConstructorTest(instance) - print(ob) self.assertTrue(isinstance(ob.value, System.Exception)) From d57f0a089c2ffb1919b11594a05440c9ac2640cf Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Mon, 9 Jan 2017 10:43:44 -0700 Subject: [PATCH 10/11] Remove `clrmodule.il` Replace by `clrmodule.cs` on commit 74e178cdc65357809d2633fb7f757ba13dfbaf1a https://github.com/pythonnet/pythonnet/blob/a330330104695581165de388279830204604bcf9/src/clrmodule/ClrModule.cs#L2-L3 --- src/runtime/Python.Runtime.csproj | 1 - src/runtime/clrmodule.il | 297 ------------------------------ 2 files changed, 298 deletions(-) delete mode 100644 src/runtime/clrmodule.il diff --git a/src/runtime/Python.Runtime.csproj b/src/runtime/Python.Runtime.csproj index bb44eb8e6..b7163266b 100644 --- a/src/runtime/Python.Runtime.csproj +++ b/src/runtime/Python.Runtime.csproj @@ -188,7 +188,6 @@ - diff --git a/src/runtime/clrmodule.il b/src/runtime/clrmodule.il deleted file mode 100644 index fb312b1b5..000000000 --- a/src/runtime/clrmodule.il +++ /dev/null @@ -1,297 +0,0 @@ - -//============================================================================ -// This file is a hand-maintained stub - it implements clr.dll, which can be -// loaded by a standard CPython interpreter (on Windows) as an extension module. -// When it is loaded, it bootstraps the managed runtime integration layer and defers -// to it to do initialization and put the clr module into sys.modules, etc. - -// The "USE_PYTHON_RUNTIME_*" defines control what extra evidence is used -// to help the CLR find the appropriate Python.Runtime assembly. - -// If defined, the "pythonRuntimeVersionString" variable must be set to -// Python.Runtime's current version. -#define USE_PYTHON_RUNTIME_VERSION - -// If defined, the "PythonRuntimePublicKeyTokenData" data array must be -// set to Python.Runtime's public key token. (sn -T Python.Runtin.dll) -#define USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - -// If DEBUG_PRINT is defined, a few System.Console.WriteLine calls are made -// to indicate what's going on during the load... -//#define DEBUG_PRINT -//============================================================================ - -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .ver 4:0:0:0 -} - -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .ver 2:0:0:0 -} - -.assembly clr -{ - .hash algorithm 0x00008004 - .ver 4:0:0:1 -} - -.module clr.dll -.imagebase 0x00400000 -.subsystem 0x00000003 -.file alignment 512 - -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN -.data PythonRuntimePublicKeyTokenData = bytearray (50 00 fe a6 cb a7 02 dd) -//.data PythonRuntimePublicKeyTokenData = bytearray (64 e1 4e 84 5a bf 2e 60) -#endif - -// This includes the platform-specific IL. The include search path -// is set depending on whether we're compiling 32 or 64 bit. -// This MUST come before any other .data directives! -// Why, oh why, can't ilasm support command line #defines? :( -// - -//#include "clrmodule-platform.il" - -// From the manifest as seen by ildasm -//%windir%\Microsoft.NET\Framework\v4.0.30319\ilasm /dll /pe64 /x64 clrmodule.il -//.corflags 0x00000000 -// Image base: 0x01550000 -// .vtfixup [1] int64 fromunmanaged at D_00004008 // 0000000006000002 - -//%windir%\Microsoft.NET\Framework\v4.0.30319\ilasm /dll clrmodule.il -// .vtfixup [1] int32 fromunmanaged at D_00004008 // 06000002 -//.corflags 0x00000002 // 32BITREQUIRED -// Image base: 0x015A0000 - -// With or without /pe64 /x64 switches. -//{ -// .vtentry 1 : 1 -// .export [1] as initclr -// ... } - - -.class public auto ansi beforefieldinit clrModule extends [mscorlib]System.Object -{ -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - .field static assembly int64 PythonRuntimePublicKeyToken at PythonRuntimePublicKeyTokenData -#endif - - .method public hidebysig specialname rtspecialname instance void - .ctor() cil managed - { - .maxstack 1 - ldarg.0 - call instance void [mscorlib]System.Object::.ctor() - ret - } - - .method public hidebysig static void modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl) - initclr() cil managed - { -// .vtentry 1:1 - .export [1] as initclr - - .maxstack 6 - .locals init ( - class [mscorlib]System.Reflection.Assembly pythonRuntime, - class [mscorlib]System.Reflection.Assembly executingAssembly, - class [mscorlib]System.Reflection.AssemblyName pythonRuntimeName, - class [mscorlib]System.Type pythonEngineType, - int8[] publicKeyToken, - string assemblyDirectory, - string pythonRuntimeVersionString, - string pythonRuntimeDllPath) - - // pythonRuntime = null; - ldnull - stloc pythonRuntime - - .try - { -#ifdef DEBUG_PRINT - ldstr "Attempting to load Python.Runtime using standard binding rules... " - call void [mscorlib]System.Console::Write(string) -#endif - - // Attempt to find and load Python.Runtime using standard assembly binding rules. - // This roughly translates into looking in order: - // - GAC - // - ApplicationBase - // - A PrivateBinPath under ApplicationBase - // With an unsigned assembly, the GAC is skipped. - - // System.Reflection.AssemblyName pythonRuntimeName = new System.Reflection.AssemblyName(); - newobj instance void [mscorlib]System.Reflection.AssemblyName::.ctor() - stloc pythonRuntimeName - - // pythonRuntimeName.Name = "Python.Runtime"; - ldloc pythonRuntimeName - ldstr "Python.Runtime" - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_Name(string) - -#ifdef USE_PYTHON_RUNTIME_VERSION - // pythonRuntimeVersionString = "..."; - ldstr "4.0.0.1" - stloc pythonRuntimeVersionString - - // pythonRuntimeName.Version = new Version(pythonRuntimeVersionString); - ldloc pythonRuntimeName - ldloc pythonRuntimeVersionString - newobj instance void [mscorlib]System.Version::.ctor(string) - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_Version(class [mscorlib]System.Version) -#endif - -#ifdef USE_PYTHON_RUNTIME_PUBLIC_KEY_TOKEN - // publicKeyToken = new byte[] { ... }; - ldc.i4.8 - newarr [mscorlib]System.Byte - dup - ldtoken field int64 clrModule::PythonRuntimePublicKeyToken - call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array, valuetype [mscorlib]System.RuntimeFieldHandle) - stloc publicKeyToken - - // pythonRuntimeName.SetPublicKeyToken(publicKeyToken); - ldloc pythonRuntimeName - ldloc publicKeyToken - callvirt instance void [mscorlib]System.Reflection.AssemblyName::SetPublicKeyToken(uint8[]) -#endif - - // pythonRuntimeName.CultureInfo = System.Globalization.CultureInfo.InvariantCulture; - ldloc pythonRuntimeName - call class [mscorlib]System.Globalization.CultureInfo [mscorlib]System.Globalization.CultureInfo::get_InvariantCulture() - callvirt instance void [mscorlib]System.Reflection.AssemblyName::set_CultureInfo(class [mscorlib]System.Globalization.CultureInfo) - - // return System.Reflection.Assembly.Load(pythonRuntimeName); - ldloc pythonRuntimeName - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::Load(class [mscorlib]System.Reflection.AssemblyName) - stloc pythonRuntime - -#ifdef DEBUG_PRINT - ldstr "Success!" - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s LOADED_PYTHON_RUNTIME - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Failed." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_CLR_LOAD - } - EXIT_CLR_LOAD: nop - - .try - { - // If the above fails for any reason, we fallback to attempting to load "Python.Runtime.dll" - // from the directory this assembly is running in. "This assembly" is probably "clr.pyd", - // sitting somewhere in PYTHONPATH. This is using Assembly.LoadFrom, and inherits all the - // caveats of that call. See MSDN docs for details. - // Suzanne Cook's blog is also an excellent source of info on this: - // http://blogs.msdn.com/suzcook/ - // http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx - // http://blogs.msdn.com/suzcook/archive/2003/06/13/57180.aspx - // executingAssembly = System.Reflection.Assembly.GetExecutingAssembly(); - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::GetExecutingAssembly() - stloc executingAssembly - - // assemblyDirectory = System.IO.Path.GetDirectoryName(executingAssembly.Location); - ldloc executingAssembly - callvirt instance string [mscorlib]System.Reflection.Assembly::get_Location() - call string [mscorlib]System.IO.Path::GetDirectoryName(string) - stloc assemblyDirectory - - // pythonRuntimeDllPath = System.IO.Path.Combine(assemblyDirectory, "Python.Runtime.dll"); - ldloc assemblyDirectory - ldstr "Python.Runtime.dll" - call string [mscorlib]System.IO.Path::Combine(string, string) - stloc pythonRuntimeDllPath - -#ifdef DEBUG_PRINT - ldstr "Attempting to load Python.Runtime from: '{0}'... " - ldloc pythonRuntimeDllPath - call void [mscorlib]System.Console::Write(string, object) -#endif - - // pythonRuntime = System.Reflection.Assembly.LoadFrom(pythonRuntimeDllPath); - ldloc pythonRuntimeDllPath - call class [mscorlib]System.Reflection.Assembly [mscorlib]System.Reflection.Assembly::LoadFrom(string) - stloc pythonRuntime - -#ifdef DEBUG_PRINT - ldstr "Success!" - call void [mscorlib]System.Console::WriteLine(string) - - ldloc pythonRuntime - callvirt instance string [mscorlib]System.Reflection.Assembly::get_CodeBase() - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s LOADED_PYTHON_RUNTIME - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Failed." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_PYTHONPATH_LOAD - } - EXIT_PYTHONPATH_LOAD: nop - - // If we get here, we haven't loaded Python.Runtime, so bail. -#ifdef DEBUG_PRINT - ldstr "Could not load Python.Runtime, so sad." - call void [mscorlib]System.Console::WriteLine(string) -#endif - ret; - - // Once here, we've successfully loaded SOME version of Python.Runtime - // So now we get the PythonEngine and execute the InitExt method on it. - LOADED_PYTHON_RUNTIME: nop - .try - { -#ifdef DEBUG_PRINT - ldstr "Running Python.Runtime.PythonEngine.InitExt()" - call void [mscorlib]System.Console::WriteLine(string) -#endif - // pythonEngineType = pythonRuntime.GetType("Python.Runtime.PythonEngine"); - ldloc pythonRuntime - ldstr "Python.Runtime.PythonEngine" - callvirt instance class [mscorlib]System.Type [mscorlib]System.Reflection.Assembly::GetType(string) - stloc pythonEngineType - - // pythonEngineType.InvokeMember("InitExt", System.Reflection.BindingFlags.InvokeMethod, null, null, null); - ldloc pythonEngineType - ldstr "InitExt" - ldc.i4 0x100 - ldnull - ldnull - ldnull - callvirt instance object [mscorlib]System.Type::InvokeMember( string, - valuetype [mscorlib]System.Reflection.BindingFlags, - class [mscorlib]System.Reflection.Binder, - object, - object[]) - pop - leave.s EXIT_TRY_INVOKE - } - catch [mscorlib]System.Object - { -#ifdef DEBUG_PRINT - ldstr "Error calling Python.Runtime.PythonEngine.InitExt()." - call void [mscorlib]System.Console::WriteLine(string) -#endif - leave.s EXIT_TRY_INVOKE - } - EXIT_TRY_INVOKE: nop - - ret - } -} - From d711bd8882729a3bce9f2cf327bf58f57c969452 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Mon, 9 Jan 2017 15:05:44 -0700 Subject: [PATCH 11/11] Fix file encoding and line-endings --- pythonnet.sln | 2 +- src/clrmodule/AssemblyInfo.cs | 2 +- src/clrmodule/ClrModule.cs | 4 +- src/clrmodule/clrmodule.csproj | 268 ++++++------- src/clrmodule/packages.config | 2 +- src/console/Console.csproj | 4 +- src/embed_tests/Embeddingtest.nunit | 4 +- src/embed_tests/Python.EmbeddingTest.csproj | 4 +- src/embed_tests/packages.config | 4 +- src/runtime/Python.Runtime.csproj | 424 ++++++++++---------- src/runtime/classderived.cs | 4 +- src/runtime/constructorbinding.cs | 4 +- src/testing/Python.Test.csproj | 4 +- src/testing/callbacktest.cs | 2 +- src/testing/moduletest.cs | 4 +- src/testing/subclasstest.cs | 4 +- 16 files changed, 370 insertions(+), 370 deletions(-) diff --git a/pythonnet.sln b/pythonnet.sln index 15ef48d4e..0a4dbe1f7 100644 --- a/pythonnet.sln +++ b/pythonnet.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.30110.0 diff --git a/src/clrmodule/AssemblyInfo.cs b/src/clrmodule/AssemblyInfo.cs index c9658c0b5..74a010d78 100644 --- a/src/clrmodule/AssemblyInfo.cs +++ b/src/clrmodule/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/clrmodule/ClrModule.cs b/src/clrmodule/ClrModule.cs index b90df485d..f6bf6690d 100644 --- a/src/clrmodule/ClrModule.cs +++ b/src/clrmodule/ClrModule.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // This file replaces the hand-maintained stub that used to implement clr.dll. // This is a line-by-line port from IL back to C#. // We now use RGiesecke.DllExport on the required static init method so it can be @@ -112,4 +112,4 @@ public static void initclr() pythonEngineType.InvokeMember("InitExt", System.Reflection.BindingFlags.InvokeMethod, null, null, null); #endif } -} \ No newline at end of file +} diff --git a/src/clrmodule/clrmodule.csproj b/src/clrmodule/clrmodule.csproj index f1e302ffe..134f5997e 100644 --- a/src/clrmodule/clrmodule.csproj +++ b/src/clrmodule/clrmodule.csproj @@ -1,134 +1,134 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {86E834DE-1139-4511-96CC-69636A56E7AC} - Library - clrmodule - clrmodule - v4.0 - 512 - ..\..\ - $(SolutionDir) - true - - - true - bin\x86\DebugMono\ - DEBUG;TRACE - full - x86 - prompt - true - true - false - - - true - bin\x64\DebugMono\ - DEBUG;TRACE - full - x64 - prompt - true - true - false - - - bin\x86\ReleaseMono\ - - - true - pdbonly - x86 - prompt - true - true - false - - - bin\x64\ReleaseMono\ - - - true - pdbonly - x64 - prompt - true - true - false - - - true - bin\x86\DebugWin\ - TRACE;DEBUG;DEBUG_PRINT - full - x86 - prompt - true - false - false - - - true - bin\x64\DebugWin\ - DEBUG;TRACE - full - x64 - prompt - true - true - false - - - bin\x86\ReleaseWin\ - - - true - pdbonly - x86 - prompt - true - true - false - - - bin\x64\ReleaseWin\ - - - true - pdbonly - x64 - prompt - true - true - false - - - - ..\..\packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll - False - - - - - - - - - - - - - $(TargetPath) - $(TargetDir)$(TargetName).pdb - - - - - - - \ No newline at end of file + + + + Debug + x86 + 8.0.30703 + 2.0 + {86E834DE-1139-4511-96CC-69636A56E7AC} + Library + clrmodule + clrmodule + v4.0 + 512 + ..\..\ + $(SolutionDir) + true + + + true + bin\x86\DebugMono\ + DEBUG;TRACE + full + x86 + prompt + true + true + false + + + true + bin\x64\DebugMono\ + DEBUG;TRACE + full + x64 + prompt + true + true + false + + + bin\x86\ReleaseMono\ + + + true + pdbonly + x86 + prompt + true + true + false + + + bin\x64\ReleaseMono\ + + + true + pdbonly + x64 + prompt + true + true + false + + + true + bin\x86\DebugWin\ + TRACE;DEBUG;DEBUG_PRINT + full + x86 + prompt + true + false + false + + + true + bin\x64\DebugWin\ + DEBUG;TRACE + full + x64 + prompt + true + true + false + + + bin\x86\ReleaseWin\ + + + true + pdbonly + x86 + prompt + true + true + false + + + bin\x64\ReleaseWin\ + + + true + pdbonly + x64 + prompt + true + true + false + + + + ..\..\packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll + False + + + + + + + + + + + + + $(TargetPath) + $(TargetDir)$(TargetName).pdb + + + + + + + diff --git a/src/clrmodule/packages.config b/src/clrmodule/packages.config index 03814de1e..01dd53f14 100644 --- a/src/clrmodule/packages.config +++ b/src/clrmodule/packages.config @@ -1,4 +1,4 @@ - + diff --git a/src/console/Console.csproj b/src/console/Console.csproj index 77406e6c5..bac59bcfa 100644 --- a/src/console/Console.csproj +++ b/src/console/Console.csproj @@ -1,4 +1,4 @@ - + Debug @@ -215,4 +215,4 @@ - \ No newline at end of file + diff --git a/src/embed_tests/Embeddingtest.nunit b/src/embed_tests/Embeddingtest.nunit index ab4a73f4e..57c999c1c 100644 --- a/src/embed_tests/Embeddingtest.nunit +++ b/src/embed_tests/Embeddingtest.nunit @@ -1,7 +1,7 @@ - + - \ No newline at end of file + diff --git a/src/embed_tests/Python.EmbeddingTest.csproj b/src/embed_tests/Python.EmbeddingTest.csproj index c16a60609..24645f1bd 100644 --- a/src/embed_tests/Python.EmbeddingTest.csproj +++ b/src/embed_tests/Python.EmbeddingTest.csproj @@ -1,4 +1,4 @@ - + Debug @@ -184,4 +184,4 @@ - \ No newline at end of file + diff --git a/src/embed_tests/packages.config b/src/embed_tests/packages.config index 163c6c929..fdc687a35 100644 --- a/src/embed_tests/packages.config +++ b/src/embed_tests/packages.config @@ -1,5 +1,5 @@ - + - \ No newline at end of file + diff --git a/src/runtime/Python.Runtime.csproj b/src/runtime/Python.Runtime.csproj index b7163266b..8b7cb30ef 100644 --- a/src/runtime/Python.Runtime.csproj +++ b/src/runtime/Python.Runtime.csproj @@ -1,212 +1,212 @@ - - - - Debug - x86 - {097B4AC0-74E9-4C58-BCF8-C69746EC8271} - Library - false - Python.Runtime - Python.Runtime - ..\..\ - $(SolutionDir) - - - bin\x86\ReleaseMono\ - PYTHON27, UCS4 - true - true - pdbonly - x86 - false - true - PYTHON27,UCS2 - - - bin\x64\ReleaseMono\ - PYTHON27, UCS4 - true - true - pdbonly - x64 - false - true - - - bin\x86\ReleaseWin\ - PYTHON27, UCS2 - true - true - pdbonly - x86 - false - true - - - bin\x64\ReleaseWin\ - PYTHON27, UCS2 - true - true - pdbonly - x64 - false - true - - - true - bin\x86\DebugMono\ - TRACE;DEBUG;PYTHON27,UCS4 - true - false - full - x86 - false - false - false - - - true - bin\x64\DebugMono\ - TRACE;DEBUG;PYTHON27,UCS4 - true - false - full - x64 - - - true - bin\x86\DebugWin\ - TRACE;DEBUG;PYTHON27,UCS2 - true - false - full - x86 - false - false - false - - - true - bin\x64\DebugWin\ - TRACE;DEBUG;PYTHON27,UCS2 - true - false - full - x64 - - - - - - False - ..\..\packages\MonoGAC\Mono.Posix\4.0.0.0__0738eb9f132ed756\Mono.Posix.dll - - - - - - - False - ..\..\packages\MonoGAC\Mono.Posix\4.0.0.0__0738eb9f132ed756\Mono.Posix.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - clr.py - - - - - - - - $(TargetPath) - $(TargetDir)$(TargetName).pdb - - - - - - \ No newline at end of file + + + + Debug + x86 + {097B4AC0-74E9-4C58-BCF8-C69746EC8271} + Library + false + Python.Runtime + Python.Runtime + ..\..\ + $(SolutionDir) + + + bin\x86\ReleaseMono\ + PYTHON27, UCS4 + true + true + pdbonly + x86 + false + true + PYTHON27,UCS2 + + + bin\x64\ReleaseMono\ + PYTHON27, UCS4 + true + true + pdbonly + x64 + false + true + + + bin\x86\ReleaseWin\ + PYTHON27, UCS2 + true + true + pdbonly + x86 + false + true + + + bin\x64\ReleaseWin\ + PYTHON27, UCS2 + true + true + pdbonly + x64 + false + true + + + true + bin\x86\DebugMono\ + TRACE;DEBUG;PYTHON27,UCS4 + true + false + full + x86 + false + false + false + + + true + bin\x64\DebugMono\ + TRACE;DEBUG;PYTHON27,UCS4 + true + false + full + x64 + + + true + bin\x86\DebugWin\ + TRACE;DEBUG;PYTHON27,UCS2 + true + false + full + x86 + false + false + false + + + true + bin\x64\DebugWin\ + TRACE;DEBUG;PYTHON27,UCS2 + true + false + full + x64 + + + + + + False + ..\..\packages\MonoGAC\Mono.Posix\4.0.0.0__0738eb9f132ed756\Mono.Posix.dll + + + + + + + False + ..\..\packages\MonoGAC\Mono.Posix\4.0.0.0__0738eb9f132ed756\Mono.Posix.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + clr.py + + + + + + + + $(TargetPath) + $(TargetDir)$(TargetName).pdb + + + + + + diff --git a/src/runtime/classderived.cs b/src/runtime/classderived.cs index 6a35d5497..02d734c26 100644 --- a/src/runtime/classderived.cs +++ b/src/runtime/classderived.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Reflection; using System.Reflection.Emit; @@ -860,4 +860,4 @@ public static void Finalize(IPythonDerivedType obj) }); } } -} \ No newline at end of file +} diff --git a/src/runtime/constructorbinding.cs b/src/runtime/constructorbinding.cs index e2eda0685..8710f53bf 100644 --- a/src/runtime/constructorbinding.cs +++ b/src/runtime/constructorbinding.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Reflection; namespace Python.Runtime @@ -241,4 +241,4 @@ public static IntPtr tp_repr(IntPtr ob) ExtensionType.FinalizeObject(self); } } -} \ No newline at end of file +} diff --git a/src/testing/Python.Test.csproj b/src/testing/Python.Test.csproj index a0d62d4f9..4566aeccf 100644 --- a/src/testing/Python.Test.csproj +++ b/src/testing/Python.Test.csproj @@ -1,4 +1,4 @@ - + Debug @@ -154,4 +154,4 @@ - \ No newline at end of file + diff --git a/src/testing/callbacktest.cs b/src/testing/callbacktest.cs index 70c7bbc9e..f95cbc602 100644 --- a/src/testing/callbacktest.cs +++ b/src/testing/callbacktest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/src/testing/moduletest.cs b/src/testing/moduletest.cs index 8734f2569..ca75a1313 100644 --- a/src/testing/moduletest.cs +++ b/src/testing/moduletest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; namespace Python.Test { @@ -22,4 +22,4 @@ public static void JoinThreads() _thread.Join(); } } -} \ No newline at end of file +} diff --git a/src/testing/subclasstest.cs b/src/testing/subclasstest.cs index 4fd271fa7..2b61be254 100644 --- a/src/testing/subclasstest.cs +++ b/src/testing/subclasstest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -114,4 +114,4 @@ public static int test_event(IInterfaceTest x, int value) return et.value; } } -} \ No newline at end of file +}