diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonComponentWalker.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonComponentWalker.cs
index b44bf573d0..abfb0cd741 100644
--- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonComponentWalker.cs
+++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonComponentWalker.cs
@@ -77,9 +77,7 @@ namespace ICSharpCode.PythonBinding
{
classDefinition = node;
componentName = node.Name;
- if (node.Body != null) {
- node.Body.Walk(this);
- }
+ node.Body.Walk(this);
return false;
}
diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/MissingInitializeComponentMethodTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/MissingInitializeComponentMethodTestFixture.cs
index 363098f29c..bf4b29ffcf 100644
--- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/MissingInitializeComponentMethodTestFixture.cs
+++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/MissingInitializeComponentMethodTestFixture.cs
@@ -48,14 +48,22 @@ namespace PythonBinding.Tests.Designer
}
///
- /// Check that the PythonFormWalker does not try to walk the class body if it is null.
+ /// Check that the PythonComponentWalker does not try to walk the class body if it is null.
+ /// IronPython 2.6.1 now throws an ArgumentNullException if null is passed for the
+ /// class body.
///
[Test]
- public void ClassWithNoBody()
+ public void ClassWithNoBodyCannotBeCreated()
+ {
+ ArgumentNullException ex =
+ Assert.Throws(delegate { CreateClassWithNullBody(); });
+
+ Assert.AreEqual("body", ex.ParamName);
+ }
+
+ void CreateClassWithNullBody()
{
ClassDefinition classDef = new ClassDefinition("classWithNoBody", null, null);
- PythonComponentWalker walker = new PythonComponentWalker(this);
- walker.Walk(classDef);
}
///
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll
index 7419c3e5b0..29fa40ae7a 100755
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.xml b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.xml
index ed8425b0c1..c08062d62b 100644
--- a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.xml
+++ b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.xml
@@ -328,7 +328,7 @@
Convert an object to a 32-bit integer. This adds two features to Converter.ToInt32:
1. Sign is ignored. For example, 0xffff0000 converts to 4294901760, where Convert.ToInt32
- would throw because 0xffff000 is less than zero.
+ would throw because 0xffff0000 is less than zero.
2. Overflow exceptions are thrown. Converter.ToInt32 throws TypeError if x is
an integer, but is bigger than 32 bits. Instead, we throw OverflowException.
@@ -735,6 +735,9 @@
'?'
+
+ 'v'
+
Base class for all ctypes interop types.
@@ -804,6 +807,12 @@
Gets the required alignment for the type
+
+
+ Returns a string which describes the type. Used for _buffer_info implementation which
+ only exists for testing purposes.
+
+
Converts an object into a function call parameter.
@@ -1099,7 +1108,12 @@
Gets or sets the dictionary used for storing extra attributes on the partial object.
-
+
+
+ Special hash function because IStructuralEquatable.GetHashCode is not allowed to throw.
+
+
+
Special equals because none of the special cases in Ops.Equals
are applicable here, and the reference equality check breaks some tests.
@@ -1110,10 +1124,20 @@
gets the object or throws a reference exception
+
+
+ Special equality function because IStructuralEquatable.Equals is not allowed to throw.
+
+
gets the object or throws a reference exception
+
+
+ Special equality function because IStructuralEquatable.Equals is not allowed to throw.
+
+
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll
index afc1683995..fe8eb361e3 100755
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.xml b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.xml
index 738c8b859e..bed2a6a14a 100644
--- a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.xml
+++ b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.xml
@@ -4,127 +4,121 @@
IronPython
+
+
+ Creates a method frame for tracking purposes and enforces recursion
+
+
Returns true if the node can throw, false otherwise. Used to determine
whether or not we need to update the current dynamic stack info.
-
+
- A global allocator that puts all of the globals into an array access. The array is an
- array of PythonGlobal objects. We then just close over the array for any inner functions.
+ A temporary variable to track if the current line number has been emitted via the fault update block.
- Once compiled a RuntimeScriptCode is produced which is closed over the entire execution
- environment.
+ For example consider:
+
+ try:
+ raise Exception()
+ except Exception, e:
+ # do something here
+ raise
+
+ At "do something here" we need to have already emitted the line number, when we re-raise we shouldn't add it
+ again. If we handled the exception then we should have set the bool back to false.
+
+ We also sometimes directly check _lineNoUpdated to avoid creating this unless we have nested exceptions.
-
+
- Provides specific behaviors for different compilation modes. For example pre-compiled
- code, optimized code, collectible code all have different code gen properties. For
- the most part these are how we access globals and call sites and cache static fields.
+ A temporary variable to track the current line number
-
+
- Generates any preparation code for a new class def or function def scope.
+ Fake ScopeStatement for FunctionCode's to hold on to after we have deserialized pre-compiled code.
-
+
- Provides a wrapper expression for our PythonGlobal array of global variables.
-
- This always reduces to a PythonGlobal[] but we update it at the very end of the
- compilation process. This enables us to create nodes which refer to this
- array and burn them in as constants even before the array has been created.
+ Gets or creates the FunctionCode object for this FunctionDefinition.
-
+
- Provides common initialization between top-level and class/function definition ast generators.
+ Gets the expression for updating the dynamic stack trace at runtime when an
+ exception is thrown.
-
+
- Creates a new AstGenerator for a class or function definition.
+ Gets the expression for the actual updating of the line number for stack traces to be available
-
+
- Creates a new AstGenerator for top-level (module) code.
+ Wraps the body of a statement which should result in a frame being available during
+ exception handling. This ensures the line number is updated as the stack is unwound.
-
+
- Wraps the body of a statement which should result in a frame being available during
- exception handling. This ensures the line number is updated as the stack is unwound.
+ The variable used to hold out parents closure tuple in our local scope.
-
+
- Gets the expression for updating the dynamic stack trace at runtime when an
- exception is thrown.
+ Gets the expression associated with the local CodeContext. If the function
+ doesn't have a local CodeContext then this is the global context.
-
+
- Gets the expression for the actual updating of the line number for stack traces to be available
+ True if this scope accesses a variable from an outer scope.
-
+
- Returns MethodInfo of the Python helper method given its name.
+ True if an inner scope is accessing a variable defined in this scope.
- Method name to find.
-
-
+
- Returns MethodInfo of the Python helper method given its name and signature.
+ True if we are forcing the creation of a dictionary for storing locals.
+
+ This occurs for calls to locals(), dir(), vars(), unqualified exec, and
+ from ... import *.
- Name of the method to return
- Parameter types
-
-
+
- Creates a method frame for tracking purposes and enforces recursion
+ True if variables can be set in a late bound fashion that we don't
+ know about at code gen time - for example via from foo import *.
+
+ This is tracked independently of the ContainsUnqualifiedExec/NeedsLocalsDictionary
-
+
- A temporary variable to track the current line number
+ Variables that are bound in an outer scope - but not a global scope
-
+
- A temporary variable to track if the current line number has been emitted via the fault update block.
-
- For example consider:
-
- try:
- raise Exception()
- except Exception, e:
- # do something here
- raise
-
- At "do something here" we need to have already emitted the line number, when we re-raise we shouldn't add it
- again. If we handled the exception then we should have set the bool back to false.
-
- We also sometimes directly check _lineNoUpdated to avoid creating this unless we have nested exceptions.
+ Variables that are bound to the global scope
-
+
- Reducible node so that re-writing for profiling does not occur until
- after the script code has been completed and is ready to be compiled.
-
- Without this extra node profiling would force reduction of the node
- and we wouldn't have setup our constant access correctly yet.
+ Variables that are referred to from a nested scope and need to be
+ promoted to cells.
-
+
Provides a place holder for the expression which represents
a FunctionCode. For functions/classes this gets updated after
@@ -133,7 +127,54 @@
immediately have the value because it always comes in as a parameter.
-
+
+
+ Reducible node so that re-writing for profiling does not occur until
+ after the script code has been completed and is ready to be compiled.
+
+ Without this extra node profiling would force reduction of the node
+ and we wouldn't have setup our constant access correctly yet.
+
+
+
+
+ A global allocator that puts all of the globals into an array access. The array is an
+ array of PythonGlobal objects. We then just close over the array for any inner functions.
+
+ Once compiled a RuntimeScriptCode is produced which is closed over the entire execution
+ environment.
+
+
+
+
+ Specifies the compilation mode which will be used during the AST transformation
+
+
+
+
+ Compilation will proceed in a manner in which the resulting AST can be serialized to disk.
+
+
+
+
+ Compilation will use a type and declare static fields for globals. The resulting type
+ is uncollectible and therefore extended use of this will cause memory leaks.
+
+
+
+
+ Compilation will use an array for globals. The resulting code will be fully collectible
+ and once all references are released will be collected.
+
+
+
+
+ Compilation will force all global accesses to do a full lookup. This will also happen for
+ any unbound local references. This is the slowest form of code generation and is only
+ used for exec/eval code where we can run against an arbitrary dictionary.
+
+
+
Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global
variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites
@@ -165,6 +206,15 @@
Ensures the underlying array is long enough to accomodate the given index
The site storage type corresponding to the given index
+
+
+ Provides more specific type information for Python dictionaries which are not strongly typed.
+
+ This attribute can be applied to fields, parameters, proeprties, and return values. It can be
+ inspected to get type information about the types of the keys and values of the expected
+ dictionary or the returned dictionary.
+
+
Abstract base class for all PythonDictionary storage.
@@ -232,7 +282,7 @@
Attempts to lookup the provided name in this scope or any outer scope.
-
+
Looks up a global variable. If the variable is not defined in the
global scope then built-ins is consulted.
@@ -487,60 +537,10 @@
Gets the PythonVariable for which this closure expression was created.
-
-
- Tracking for variables lifted into closure objects.
-
- The primary purpose of ClosureInfo is to ensure that a parent scope
- has created the variables for a child scope. There are two cases where we need
- to do this:
- 1. The parent scope defines the variable. In this case we use a DefinitionClosureInfo
- and it will create the new ClosureCell.
- 2. There are 3 or more scopes. The outer most scope defines a variable and the inner most
- scope refers to it. But there is an interleaving scope which does not refer to the variable
- but needs to pass it down. In this case we have a ReferenceClosureInfo which pulls the closure
- cell from the defintion (or previous reference) scope and puts it into it's own tuple.
-
-
-
-
- The ClosureInfo used when a variable is defined in the current scope and referenced
- from a child scope.
-
-
- The variable info used when a variable is defined in a parent scope and referenced
- in a child scope but not referenced in this scope.
-
-
-
-
- Specifies the compilation mode which will be used during the AST transformation
-
-
-
-
- Compilation will proceed in a manner in which the resulting AST can be serialized to disk.
-
-
-
-
- Compilation will use a type and declare static fields for globals. The resulting type
- is uncollectible and therefore extended use of this will cause memory leaks.
-
-
-
-
- Compilation will use an array for globals. The resulting code will be fully collectible
- and once all references are released will be collected.
-
-
-
-
- Compilation will force all global accesses to do a full lookup. This will also happen for
- any unbound local references. This is the slowest form of code generation and is only
- used for exec/eval code where we can run against an arbitrary dictionary.
+ Tracking for variables lifted into closure objects. Used to store information in a function
+ about the outer variables it accesses.
@@ -609,6 +609,15 @@
__contains__
+
+
+ Provides more specific type information for Python lists which are not strongly typed.
+
+ This attribute can be applied to fields, parameters, proeprties, and return values. It can be
+ inspected to get type information about the types of the values of the expected
+ list or the returned list.
+
+
Captures the globals and other state of module code.
@@ -842,76 +851,44 @@
part of its exclusive time.
-
-
- Creates variables which are defined in this scope.
-
-
-
-
- Creates variables which are defined in a parent scope and accessed in this scope.
-
-
-
-
- Creates variables which are defined in a parent scope and used by a child scope.
-
-
-
-
- True if an inner scope is accessing a variable defined in this scope.
-
-
-
+
- True if we are forcing the creation of a dictionary for storing locals.
-
- This occurs for calls to locals(), dir(), vars(), unqualified exec, and
- from ... import *.
-
-
-
-
- True if variables can be set in a late bound fashion that we don't
- know about at code gen time - for example via from foo import *.
-
- This is tracked independently of the ContainsUnqualifiedExec/NeedsLocalsDictionary
-
-
-
-
- Variables that are bound in an outer scope - but not a global scope
+ Gets the closure tuple from our parent context.
-
+
- Variables that are bound to the global scope
+ PythonWalker class - The Python AST Walker (default result is true)
-
+
- Variables that are referred to from a nested scope and need to be
- promoted to cells.
+ PythonWalkerNonRecursive class - The Python AST Walker (default result is false)
-
+
- Gets the closure tuple from our parent context.
+ Pulls the closure tuple from our function/generator which is flowed into each function call.
-
+
- PythonWalker class - The Python AST Walker (default result is true)
+ Returns an expression which creates the function object.
-
+
- PythonWalkerNonRecursive class - The Python AST Walker (default result is false)
+ Creates the LambdaExpression which is the actual function body.
-
+
- Pulls the closure tuple from our function/generator which is flowed into each function call.
+ Creates the LambdaExpression which implements the body of the function.
+
+ The functions signature is either "object Function(PythonFunction, ...)"
+ where there is one object parameter for each user defined parameter or
+ object Function(PythonFunction, object[]) for functions which take more
+ than PythonCallTargets.MaxArgs arguments.
@@ -919,12 +896,7 @@
Determines delegate type for the Python function
-
-
- True if this scope accesses a variable from an outer scope.
-
-
-
+
Provides globals for when we need to lookup into a dictionary for each global access.
@@ -960,6 +932,44 @@
Parameter name
+
+
+ Top-level ast for all Python code. Typically represents a module but could also
+ be exec or eval code.
+
+
+
+
+ Binds an AST and makes it capable of being reduced and compiled. Before calling Bind an AST cannot successfully
+ be reduced.
+
+
+
+
+ Creates a variable at the global level. Called for known globals (e.g. __name__),
+ for variables explicitly declared global by the user, and names accessed
+ but not defined in the lexical scope.
+
+
+
+
+ Reduces the PythonAst to a LambdaExpression of type Type.
+
+
+
+
+ Returns a ScriptCode object for this PythonAst. The ScriptCode object
+ can then be used to execute the code against it's closed over scope or
+ to execute it against a different scope.
+
+
+
+
+ Rewrites the tree for performing lookups against globals instead of being bound
+ against the optimized scope. This is used if the user compiles optimied code and then
+ runs it against a different scope.
+
+
True division is enabled in this AST.
@@ -975,6 +985,12 @@
True if absolute imports are enabled
+
+
+ Represents a reference to a name. A PythonReference is created for each name
+ referred to in a scope (global, class, or function).
+
+
True if the user provided a step parameter (either providing an explicit parameter
@@ -1001,15 +1017,14 @@
The body of the optional finally associated with this try. NULL if there is no finally block.
-
+
Transform multiple python except handlers for a try block into a single catch body.
-
- The variable for the exception in the catch block.
+ The variable for the exception in the catch block.
Null if there are no except handlers. Else the statement to go inside the catch handler
-
+
Surrounds the body of an except block w/ the appropriate code for maintaining the traceback.
@@ -1031,16 +1046,6 @@
Local variables can be referenced from nested lambdas
-
-
- Variables that weren't assigned within the using scope and were hoisted to the global scope.
-
-
-
-
- Variables that weren't assigned within the scope that contains unqualified exec, eval, locals().
-
-
Parameter to a LambdaExpression
@@ -1055,7 +1060,7 @@
Should only appear in global (top level) lambda.
-
+
WithStatement is translated to the DLR AST equivalent to
the following Python code snippet (from with statement spec):
@@ -1085,6 +1090,11 @@
A ScriptCode which has been loaded from an assembly which is saved on disk.
+
+
+ Creates a fake PythonAst object which is represenative of the on-disk script code.
+
+
Base class for all of our fast get delegates. This holds onto the
@@ -1292,7 +1302,7 @@
Makes the comparison rule which returns an int (-1, 0, 1). TODO: Better name?
-
+
Python has three protocols for slicing:
Simple Slicing x[i:j]
@@ -1695,18 +1705,18 @@
Returns the ones complement of the instance.
-
+
Unary operator.
Boolean negation
-
+
Unary operator.
- Boolean negation
+ Negation, returns object
@@ -2408,25 +2418,181 @@
Given the object value runs the accessors in the field name (if any) against the object.
-
+
+
+ Encodes all the information about the field name.
+
+
+
+
+ Encodes a single field accessor (.b or [number] or [str])
+
+
+
+
+ For IList arguments: Marks that the argument is typed to accept a bytes or
+ bytearray object. This attribute disallows passing a Python list object and
+ auto-applying our generic conversion. It also enables conversion of a string to
+ a IList of byte in IronPython 2.6.
+
+ For string arguments: Marks that the argument is typed to accept a bytes object
+ as well. (2.6 only)
+
+
+
+ stored for copy_reg module, used for reduce protocol
+
+
+ stored for copy_reg module, used for reduce protocol
+
+
+
+ Creates a new PythonContext not bound to Engine.
+
+
+
+
+ Checks to see if module state has the current value stored already.
+
+
+
+
+ Gets per-runtime state used by a module. The module should have a unique key for
+ each piece of state it needs to store.
+
+
+
+
+ Sets per-runtime state used by a module. The module should have a unique key for
+ each piece of state it needs to store.
+
+
+
+
+ Sets per-runtime state used by a module and returns the previous value. The module
+ should have a unique key for each piece of state it needs to store.
+
+
+
+
+ Sets per-runtime state used by a module and returns the previous value. The module
+ should have a unique key for each piece of state it needs to store.
+
+
+
+
+ Initializes the sys module on startup. Called both to load and reload sys
+
+
+
+
+ Reads one line keeping track of the # of bytes read
+
+
+
+
+ We use Assembly.LoadFile to load assemblies from a path specified by the script (in LoadAssemblyFromFileWithPath).
+ However, when the CLR loader tries to resolve any of assembly references, it will not be able to
+ find the dependencies, unless we can hook into the CLR loader.
+
+
+
+
+ Returns (and creates if necessary) the PythonService that is associated with this PythonContext.
+
+ The PythonService is used for providing remoted convenience helpers for the DLR hosting APIs.
+
+
+
+
+ Gets the member names associated with the object
+ TODO: Move "GetMemberNames" functionality into MetaObject implementations
+
+
+
+
+ Gets a SiteLocalStorage when no call site is available.
+
+
+
+
+ Invokes the specified operation on the provided arguments and returns the new resulting value.
+
+ operation is usually a value from StandardOperators (standard CLR/DLR operator) or
+ OperatorStrings (a Python specific operator)
+
+
+
+
+ Gets a function which can be used for comparing two values. If cmp is not null
+ then the comparison will use the provided comparison function. Otherwise
+ it will use the normal Python semantics.
+
+ If type is null then a generic comparison function is returned. If type is
+ not null a comparison function is returned that's used for just that type.
+
+
+
+
+ Performs a GC collection including the possibility of freeing weak data structures held onto by the Python runtime.
+
+
+
+
+
+ Gets a PythonContext given a DynamicMetaObjectBinder.
+
+
+
+
+ Gets or sets the maximum depth of function calls. Equivalent to sys.getrecursionlimit
+ and sys.setrecursionlimit.
+
+
+
+
+ Gets or sets the default encoding for this system state / engine.
+
+
+
+
+ Dictionary from name to type of all known built-in module names.
+
+
+
+
+ Dictionary from type to name of all built-in modules.
+
+
+
+
+ TODO: Remove me, or stop caching built-ins. This is broken if the user changes __builtin__
+
+
+
+ Dictionary of error handlers for string codecs.
+
+
+ Table of functions used for looking for additional codecs.
+
+
- Encodes all the information about the field name.
+ Returns a shared code context for the current PythonContext. This shared
+ context can be used for performing general operations which usually
+ require a CodeContext.
-
+
- Encodes a single field accessor (.b or [number] or [str])
+ Returns an overload resolver for the current PythonContext. The overload
+ resolver will flow the shared context through as it's CodeContext.
-
+
- For IList arguments: Marks that the argument is typed to accept a bytes or
- bytearray object. This attribute disallows passing a Python list object and
- auto-applying our generic conversion. It also enables conversion of a string to
- a IList of byte in IronPython 2.6.
-
- For string arguments: Marks that the argument is typed to accept a bytes object
- as well. (2.6 only)
+ Returns a shared code context for the current PythonContext. This shared
+ context can be used for doing lookups which need to occur as if they
+ happened in a module which has done "import clr".
@@ -2526,6 +2692,11 @@
Enforce recursion is added at runtime.
+
+
+ The parent CodeContext in which this function was declared.
+
+
Captures the # of args and whether we have kw / arg lists. This
@@ -3059,11 +3230,6 @@
If this value is null then no indentation level is specified.
-
-
- Summary description for Parser.
-
-
Language features initialized on parser construction and possibly updated during parsing.
@@ -3374,6 +3540,29 @@
configure a ScriptRuntimeSetup object.
+
+
+ Creates a new PythonModule with the specified name and published it in sys.modules.
+
+ Returns the ScriptScope associated with the module.
+
+
+
+
+ Creates a new PythonModule with the specified name and filename published it
+ in sys.modules.
+
+ Returns the ScriptScope associated with the module.
+
+
+
+
+ Creates a new PythonModule with the specified name, filename, and doc string and
+ published it in sys.modules.
+
+ Returns the ScriptScope associated with the module.
+
+
A strongly-typed resource class, for looking up localized strings, etc.
@@ -4423,7 +4612,7 @@
so that we don't race against sys.settrace/sys.setprofile.
-
+
Constructor used to create a FunctionCode for code that's been serialized to disk.
@@ -4432,7 +4621,7 @@
Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry.
-
+
Constructor to create a FunctionCode at runtime.
@@ -4709,6 +4898,14 @@
Pep255 says that a generator should throw a ValueError if called reentrantly.
+
+
+ We cache the GeneratorFinalizer of generators that were closed on the user
+ thread, and did not get finalized on the finalizer thread. We can then reuse
+ the object. Reusing objects with a finalizer is good because it reduces
+ the load on the GC's finalizer queue.
+
+
Fields set by Throw() to communicate an exception to the yield point.
@@ -5530,6 +5727,50 @@
defined in the CLS System.String type.
+
+
+ Returns a copy of this string converted to uppercase
+
+
+
+
+ return true if self is a titlecased string and there is at least one
+ character in self; also, uppercase characters may only follow uncased
+ characters (e.g. whitespace) and lowercase characters only cased ones.
+ return false otherwise.
+
+
+
+
+ Return a string which is the concatenation of the strings
+ in the sequence seq. The separator between elements is the
+ string providing this method
+
+
+
+
+ Replaces each replacement field in the string with the provided arguments.
+
+ replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}"
+ field_name = (identifier | integer) ("." identifier | "[" element_index "]")*
+
+ format_spec: [[fill]align][sign][#][0][width][.precision][type]
+
+ Conversion can be 'r' for repr or 's' for string.
+
+
+
+
+ Replaces each replacement field in the string with the provided arguments.
+
+ replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}"
+ field_name = (identifier | integer) ("." identifier | "[" element_index "]")*
+
+ format_spec: [[fill]align][sign][#][0][width][.precision][type]
+
+ Conversion can be 'r' for repr or 's' for string.
+
+
Gets the starting offset checking to see if the incoming bytes already include a preamble.
@@ -5568,6 +5809,12 @@
which case we'll display the result of __repr__.
+
+
+ Provides a debug view for user defined types. This class is declared as public
+ because it is referred to from generated code. You should not use this class.
+
+
A DynamicMetaObject which is just used to support custom conversions to COM.
@@ -5578,162 +5825,6 @@
A marker interface so we can recognize and access sequence members on our array objects.
-
- stored for copy_reg module, used for reduce protocol
-
-
- stored for copy_reg module, used for reduce protocol
-
-
-
- Creates a new PythonContext not bound to Engine.
-
-
-
-
- Checks to see if module state has the current value stored already.
-
-
-
-
- Gets per-runtime state used by a module. The module should have a unique key for
- each piece of state it needs to store.
-
-
-
-
- Sets per-runtime state used by a module. The module should have a unique key for
- each piece of state it needs to store.
-
-
-
-
- Sets per-runtime state used by a module and returns the previous value. The module
- should have a unique key for each piece of state it needs to store.
-
-
-
-
- Sets per-runtime state used by a module and returns the previous value. The module
- should have a unique key for each piece of state it needs to store.
-
-
-
-
- Initializes the sys module on startup. Called both to load and reload sys
-
-
-
-
- Reads one line keeping track of the # of bytes read
-
-
-
-
- We use Assembly.LoadFile to load assemblies from a path specified by the script (in LoadAssemblyFromFileWithPath).
- However, when the CLR loader tries to resolve any of assembly references, it will not be able to
- find the dependencies, unless we can hook into the CLR loader.
-
-
-
-
- Returns (and creates if necessary) the PythonService that is associated with this PythonContext.
-
- The PythonService is used for providing remoted convenience helpers for the DLR hosting APIs.
-
-
-
-
- Gets the member names associated with the object
- TODO: Move "GetMemberNames" functionality into MetaObject implementations
-
-
-
-
- Gets a SiteLocalStorage when no call site is available.
-
-
-
-
- Invokes the specified operation on the provided arguments and returns the new resulting value.
-
- operation is usually a value from StandardOperators (standard CLR/DLR operator) or
- OperatorStrings (a Python specific operator)
-
-
-
-
- Gets a function which can be used for comparing two values. If cmp is not null
- then the comparison will use the provided comparison function. Otherwise
- it will use the normal Python semantics.
-
- If type is null then a generic comparison function is returned. If type is
- not null a comparison function is returned that's used for just that type.
-
-
-
-
- Performs a GC collection including the possibility of freeing weak data structures held onto by the Python runtime.
-
-
-
-
-
- Gets a PythonContext given a DynamicMetaObjectBinder.
-
-
-
-
- Gets or sets the maximum depth of function calls. Equivalent to sys.getrecursionlimit
- and sys.setrecursionlimit.
-
-
-
-
- Gets or sets the default encoding for this system state / engine.
-
-
-
-
- Dictionary from name to type of all known built-in module names.
-
-
-
-
- Dictionary from type to name of all built-in modules.
-
-
-
-
- TODO: Remove me, or stop caching built-ins. This is broken if the user changes __builtin__
-
-
-
- Dictionary of error handlers for string codecs.
-
-
- Table of functions used for looking for additional codecs.
-
-
-
- Returns a shared code context for the current PythonContext. This shared
- context can be used for performing general operations which usually
- require a CodeContext.
-
-
-
-
- Returns an overload resolver for the current PythonContext. The overload
- resolver will flow the shared context through as it's CodeContext.
-
-
-
-
- Returns a shared code context for the current PythonContext. This shared
- context can be used for doing lookups which need to occur as if they
- happened in a module which has done "import clr".
-
-
List of unary operators which we have sites for to enable fast dispatch that
@@ -5802,7 +5893,7 @@
- Contains common set functionality between set and forzenSet
+ Contains common set functionality between set and frozenSet
@@ -5832,7 +5923,7 @@
- Non-mutable set class
+ Immutable set class
@@ -5902,6 +5993,30 @@
behavior on get/set.
+
+
+ Provides custom, versioned, dictionary access for instances. Used for both
+ new-style and old-style instances.
+
+ Each class can allocate a version for instance storage using the
+ CustomInstanceDictionaryStorage.AllocateInstance method. The version allocated
+ is dependent upon the names which are likely to appear in the instance
+ dictionary. Currently these names are calculated by collecting the names
+ that are assigned to during the __init__ method and combining these with
+ all such names in the types MRO.
+
+ When creating the dictionary for storing instance values the class can then create
+ a PythonDictionary backed by a CustomInstanceDictionaryStorage with it's
+ version. When doing a get/set optimized code can then be produced that
+ verifies we have CustomInstanceDictionaryStorage and it has the
+ correct version. If we have a matching dictionary then gets/sets can turn
+ into simple array accesses rather than dictionary gets/sets. For programs
+ which access a large number of instance variables this can dramatically
+ speed up the program.
+
+ TODO: Should we attempt to unify all versions which share the same keys?
+
+
Represents a set of attributes that different functions can have.
@@ -6019,6 +6134,12 @@
objects), and a dictionary of members is provided.
+
+
+ Creates a new type for a user defined type. The name, base classes (a tuple of type
+ objects), and a dictionary of members is provided.
+
+
Creates a new PythonType object which is backed by the specified .NET type for
@@ -6477,7 +6598,8 @@
- Provides a resolution for IValueEquality.GetValueHashCode to __hash__.
+ Provides a resolution for __hash__, first looking for IStructuralEquatable.GetHashCode,
+ then IValueEquality.GetValueHashCode.
@@ -6503,16 +6625,6 @@
Provides a resolution for __iter__
-
-
- Provides a mapping of IValueEquality.ValueEquals to __eq__
-
-
-
-
- Provides a mapping of IValueEquality.ValueNotEquals to __ne__
-
-
Looks for an Equals overload defined on the type and if one is present binds __ne__ to an
@@ -6707,6 +6819,21 @@
Standard resolver for looking up .NET members. Uses reflection to get the members by name.
+
+
+ Resolves methods mapped to __eq__ and __ne__ from:
+ 1. IStructuralEquatable.Equals
+ 2. IValueEquality.Equals (CLR2 only)
+
+
+
+
+ Resolves methods mapped to __gt__, __lt__, __ge__, __le__, as well as providing an alternate resolution
+ for __eq__ and __ne__, from the comparable type's CompareTo method.
+
+ This should be run after the EqualityResolver.
+
+
Resolves methods mapped to __*__ methods automatically from the .NET operator.
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Dynamic.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Dynamic.dll
index 61bb54c72b..b105a431be 100644
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Dynamic.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Dynamic.dll differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll
index 29a06e8276..6502a88283 100755
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Debugging.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Debugging.dll
index fedb462d3d..694b337822 100644
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Debugging.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Debugging.dll differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll
index 60de3d287f..c82eb94835 100644
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll
index 12a24c9ccb..221b8c1355 100755
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe
index 87c0cb9215..01894a42bc 100755
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe and b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy64.exe b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy64.exe
index 0576fc76dd..067fc153bb 100644
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy64.exe and b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy64.exe differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipyw.exe b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipyw.exe
index 50f43b4b5b..9b84d6a386 100644
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipyw.exe and b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipyw.exe differ
diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipyw64.exe b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipyw64.exe
index e20a5e75c3..ff011b1cce 100644
Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipyw64.exe and b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipyw64.exe differ