Skip to content
This repository was archived by the owner on Jun 4, 2019. It is now read-only.

Commit e073a2e

Browse files
committed
land import syntax refactoring on trunk
1 parent 1456e25 commit e073a2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+423
-557
lines changed

pythonnet/demo/helloform.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
2-
#
3-
# All Rights Reserved.
4-
#
1+
# ===========================================================================
52
# This software is subject to the provisions of the Zope Public License,
63
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
74
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
85
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
96
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
107
# FOR A PARTICULAR PURPOSE.
8+
# ===========================================================================
119

12-
import CLR.System.Windows.Forms as WinForms
13-
from CLR.System.Drawing import Size, Point
10+
import System.Windows.Forms as WinForms
11+
from System.Drawing import Size, Point
1412

1513

1614
class HelloApp(WinForms.Form):

pythonnet/demo/splitter.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
# Copyright (c) 2003 Zope Corporation and Contributors.
2-
#
3-
# All Rights Reserved.
4-
#
1+
# ===========================================================================
52
# This software is subject to the provisions of the Zope Public License,
63
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
74
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
85
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
96
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
107
# FOR A PARTICULAR PURPOSE.
8+
# ===========================================================================
119

12-
import CLR.System.Windows.Forms as WinForms
13-
from CLR.System.Drawing import Color, Size, Point
14-
from CLR import System
10+
import System.Windows.Forms as WinForms
11+
from System.Drawing import Color, Size, Point
12+
import System
1513

1614

1715
class Splitter(WinForms.Form):

pythonnet/demo/wordpad.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
# Copyright (c) 2003 Zope Corporation and Contributors.
2-
#
3-
# All Rights Reserved.
4-
#
1+
# ===========================================================================
52
# This software is subject to the provisions of the Zope Public License,
63
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
74
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
85
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
96
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
107
# FOR A PARTICULAR PURPOSE.
8+
# ===========================================================================
119

12-
import CLR.System.Windows.Forms as WinForms
13-
from CLR.System.Drawing import Color, Size, Point
14-
from CLR.System.Text import Encoding
15-
from CLR.System.IO import File
16-
from CLR import System
10+
import System.Windows.Forms as WinForms
11+
from System.Drawing import Color, Size, Point
12+
from System.Text import Encoding
13+
from System.IO import File
14+
import System
1715

1816

1917
class Wordpad(WinForms.Form):

pythonnet/doc/changes.txt

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
1-
PythonNet Changes
2-
-----------------
1+
Python for .NET Changes
2+
-----------------------
3+
4+
PythonNet 2.0 alpha 1
5+
---------------------------------------------------------------------------
6+
7+
- Moved the Python for .NET project to Sourceforge and moved version
8+
control to Subversion.
9+
10+
- Removed CallConvCdecl attributes and the IL hack that they supported.
11+
.NET 2.x now supports UnmanagedFunctionPointer, which does the right
12+
thing without the hackery required in 1.x. This removes a dependency
13+
on ILASM to build the package and better supports Mono (in theory).
14+
15+
- Refactored import and assembly management machinery. The old 'CLR.'
16+
syntax for import is deprecated, but still supported until 3.x. The
17+
recommended style now is to use 'from System import xxx', etc. We
18+
also now support 'from X import *' correctly.
19+
20+
- Implemented a (lowercase) 'clr' module to match IronPython for code
21+
compatibility. Methods of this module should be used to explicitly
22+
load assemblies. Implicit (name-based) assembly loading will still
23+
work until 3.x, but it is deprecated.
24+
25+
- Implemented support for generic types and generic methods using the
26+
same patterns and syntax as IronPython. See the documentation for
27+
usage details.
28+
29+
- Many small and large performance improvements, switched to generic
30+
collections for some internals, better algorithms for assembly
31+
scanning, etc.
32+
33+
34+
PythonNet 1.0 final
35+
---------------------------------------------------------------------------
36+
37+
- Backported the refactored import and assembly management from the 2.x
38+
line, mainly to improve the possibility of code-compatibility with
39+
IronPython.
40+
341

442
PythonNet 1.0 release candidate 2
543
---------------------------------------------------------------------------

pythonnet/src/console/assemblyinfo.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// Copyright (c) 2004 Zope Corporation and Contributors.
2-
//
3-
// All Rights Reserved.
4-
//
1+
// ==========================================================================
52
// This software is subject to the provisions of the Zope Public License,
63
// Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
74
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
85
// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
96
// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
107
// FOR A PARTICULAR PURPOSE.
8+
// ==========================================================================
119

1210
using System;
1311
using System.Reflection;

pythonnet/src/console/pythonconsole.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// Copyright (c) 2001, 2002 Zope Corporation and Contributors.
2-
//
3-
// All Rights Reserved.
4-
//
1+
// ==========================================================================
52
// This software is subject to the provisions of the Zope Public License,
63
// Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
74
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
85
// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
96
// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
107
// FOR A PARTICULAR PURPOSE.
8+
// ==========================================================================
119

1210
using System;
1311
using Python.Runtime;

pythonnet/src/runtime/arrayobject.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// Copyright (c) 2001, 2002 Zope Corporation and Contributors.
2-
//
3-
// All Rights Reserved.
4-
//
1+
// ==========================================================================
52
// This software is subject to the provisions of the Zope Public License,
63
// Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
74
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
85
// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
96
// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
107
// FOR A PARTICULAR PURPOSE.
8+
// ==========================================================================
119

1210
using System;
1311
using System.Collections;

pythonnet/src/runtime/assemblyinfo.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// Copyright (c) 2001, 2002 Zope Corporation and Contributors.
2-
//
3-
// All Rights Reserved.
4-
//
1+
// ==========================================================================
52
// This software is subject to the provisions of the Zope Public License,
63
// Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
74
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
85
// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
96
// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
107
// FOR A PARTICULAR PURPOSE.
8+
// ==========================================================================
119

1210
using System;
1311
using System.Reflection;

pythonnet/src/runtime/assemblymanager.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// ===========================================================================
2-
//
1+
// ==========================================================================
32
// This software is subject to the provisions of the Zope Public License,
4-
// Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
3+
// Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
54
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
65
// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
76
// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
87
// FOR A PARTICULAR PURPOSE.
9-
//
10-
// ===========================================================================
8+
// ==========================================================================
119

1210
using System;
1311
using System.IO;
@@ -268,7 +266,6 @@ public static bool LoadImplicit(string name) {
268266
// mapping of valid namespaces. Note that for a given namespace
269267
// a.b.c.d, each of a, a.b, a.b.c and a.b.c.d are considered to
270268
// be valid namespaces (to better match Python import semantics).
271-
// {'System' : ['Reflection', 'String']}
272269
//===================================================================
273270

274271
static void ScanAssembly(Assembly assembly) {

pythonnet/src/runtime/classbase.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// Copyright (c) 2001, 2002 Zope Corporation and Contributors.
2-
//
3-
// All Rights Reserved.
4-
//
1+
// ==========================================================================
52
// This software is subject to the provisions of the Zope Public License,
63
// Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
74
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
85
// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
96
// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
107
// FOR A PARTICULAR PURPOSE.
8+
// ==========================================================================
119

1210
using System;
1311
using System.Collections;

0 commit comments

Comments
 (0)