[Python.NET] import changes for 2.x

Brian Lloyd brian.d.lloyd at gmail.com
Mon Apr 3 21:37:52 CEST 2006

Hi all -

One of the things I'd like the 2.x-compatible version of PythonNet to do is
be code-compatible as much as possible with IronPython.

A part of that is reconciling import syntax. Currently, you have to use the
'CLR.xxx' form to import modules in PythonNet, where in IronPython you can
just say things like 'from System import *'.

For the 2.x release, I propose to:

  - deprecate, but still support, the 'CLR.' syntax, so current code would
continue to work until
    an eventual 3.x, at which point that support would be removed

  - implement and guide people toward using the direct syntax

I also want to implement the 'clr' (lower-case) module and move toward
IronPython's explicit assembly loading model and deprecate implicit loading
(though that too would continue to
work until 3.x).

I've got this all basically working now (even evil old 'from x import *'),
but wanted to run it up the flagpole for feedback before I get too far, and
particularly to see how people feel about deprecation
warnings (should we? shouldn't we?)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20060403/a7bf8568/attachment.html 

More information about the PythonDotNet mailing list