<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Python/ceval.c, branch v2.1c2</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/ceval.c?h=v2.1c2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/ceval.c?h=v2.1c2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-04-13T16:51:46Z</updated>
<entry>
<title>Change error message raised when free variable is not yet bound.  It</title>
<updated>2001-04-13T16:51:46Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-04-13T16:51:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c76770c68c40021322c221dd6bcd62bf98356a33'/>
<id>urn:sha1:c76770c68c40021322c221dd6bcd62bf98356a33</id>
<content type='text'>
now raises NameError instead of UnboundLocalError, because the var in
question is definitely not local.  (This affects test_scope.py)

Also update the recent fix by Ping using get_func_name().  Replace
tests of get_func_name() return value with call to get_func_desc() to
match all the other uses.
</content>
</entry>
<entry>
<title>Patch by Ping (SF bug 415879, Exception.__init__() causes segfault):</title>
<updated>2001-04-13T15:42:40Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-04-13T15:42:40Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d9994e0115e1acfd6d3d97a048af9616778af95c'/>
<id>urn:sha1:d9994e0115e1acfd6d3d97a048af9616778af95c</id>
<content type='text'>
   Calling an unbound method on a C extension class without providing
   an instance can yield a segfault.  Try "Exception.__init__()" or
   "ValueError.__init__()".

   This is a simple fix. The error-reporting bits in call_method
   mistakenly treat the misleadingly-named variable "func" as a
   function, when in fact it is a method.

   If we let get_func_name take care of the work, all is fine.
</content>
</entry>
<entry>
<title>Fix exception handling for non-PyFunction objects, SF bug 414743.</title>
<updated>2001-04-11T13:52:29Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-04-11T13:52:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=512a237725c728faf495608c650f405522c3c5d4'/>
<id>urn:sha1:512a237725c728faf495608c650f405522c3c5d4</id>
<content type='text'>
Fix based on patch #414750 by Michael Hudson.

New functions get_func_name() and get_func_desc() return reasonable
names and descriptions for all objects.  XXX Even objects that aren't
actually callable.
</content>
</entry>
<entry>
<title>Extend support for from __future__ import nested_scopes</title>
<updated>2001-03-22T02:47:58Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-03-22T02:47:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=bc32024769eecd3c2251e00850e6a5c003aa9253'/>
<id>urn:sha1:bc32024769eecd3c2251e00850e6a5c003aa9253</id>
<content type='text'>
If a module has a future statement enabling nested scopes, they are
also enable for the exec statement and the functions compile() and
execfile() if they occur in the module.

If Python is run with the -i option, which enters interactive mode
after executing a script, and the script it runs enables nested
scopes, they are also enabled in interactive mode.

XXX The use of -i with -c "from __future__ import nested_scopes" is
not supported.  What's the point?

To support these changes, many function variants have been added to
pythonrun.c.  All the variants names end with Flags and they take an
extra PyCompilerFlags * argument.  It is possible that this complexity
will be eliminated in a future version of the interpreter in which
nested scopes are not optional.
</content>
</entry>
<entry>
<title>If a code object is compiled with nested scopes, define the CO_NESTED flag.</title>
<updated>2001-03-22T02:32:48Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-03-22T02:32:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=061d106a0f56c5b4171ad8c56ecfaa6cefb27385'/>
<id>urn:sha1:061d106a0f56c5b4171ad8c56ecfaa6cefb27385</id>
<content type='text'>
Add PyEval_GetNestedScopes() which returns a non-zero value if the
code for the current interpreter frame has CO_NESTED defined.
</content>
</entry>
<entry>
<title>Use PyObject_IsInstance() to check whether the first argument to an</title>
<updated>2001-03-21T19:17:22Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-03-21T19:17:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=66b0e9c2a77bd991ea55ad361bad4eb1a3dc5e78'/>
<id>urn:sha1:66b0e9c2a77bd991ea55ad361bad4eb1a3dc5e78</id>
<content type='text'>
unbound method is of the right type.  Hopefully this solves SF patch
#409355 (Meta-class inheritance problem); I have no easy way to test.
</content>
</entry>
<entry>
<title>Fix PyFrame_FastToLocals() and counterpart to deal with cells and</title>
<updated>2001-03-21T16:43:47Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-03-21T16:43:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=220ae7c0bf2054ad01f58e1cf669ac069eb9a574'/>
<id>urn:sha1:220ae7c0bf2054ad01f58e1cf669ac069eb9a574</id>
<content type='text'>
frees.  Note there doesn't seem to be any way to test LocalsToFast(),
because the instructions that trigger it are illegal in nested scopes
with free variables.

Fix allocation strategy for cells that are also formal parameters.
Instead of emitting LOAD_FAST / STORE_DEREF pairs for each parameter,
have the argument handling code in eval_code2() do the right thing.

A side-effect of this change is that cell variables that are also
arguments are listed at the front of co_cellvars in the order they
appear in the argument list.
</content>
</entry>
<entry>
<title>Variety of small INC/DECREF patches that fix reported memory leaks</title>
<updated>2001-03-13T01:58:22Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-03-13T01:58:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=30c9f3991cfb6a8179ea5dcf15fe17030dfbad05'/>
<id>urn:sha1:30c9f3991cfb6a8179ea5dcf15fe17030dfbad05</id>
<content type='text'>
with free variables.  Thanks to Martin v. Loewis for finding two of
the problems.  This fixes SF buf 405583.

There is also a C API change: PyFrame_New() is reverting to its
pre-2.1 signature.  The change introduced by nested scopes was a
mistake.  XXX Is this okay between beta releases?

cell_clear(), the GC helper, must decref its reference to break
cycles.

frame_dealloc() must dealloc all cell vars and free vars in addition
to locals.

eval_code2() setup code must INCREF cells it copies out of the
closure.

The STORE_DEREF opcode implementation must DECREF the object it passes
to PyCell_Set().
</content>
</entry>
<entry>
<title>Remove trailing comma from 'why_code' enum, which was introduced by the</title>
<updated>2001-02-16T11:52:31Z</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2001-02-16T11:52:31Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fc93b0a81a93a6b0960a8a08a565cce88a0d8f61'/>
<id>urn:sha1:fc93b0a81a93a6b0960a8a08a565cce88a0d8f61</id>
<content type='text'>
continue-inside-try patch. Partly fixes SF bug #132597.
</content>
</entry>
<entry>
<title>When calling a PyCFunction that has METH_KEYWORDS defined, don't</title>
<updated>2001-02-09T23:23:20Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-02-09T23:23:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8af6b83e61f1f5b4501968b77a17ad6ef96984c4'/>
<id>urn:sha1:8af6b83e61f1f5b4501968b77a17ad6ef96984c4</id>
<content type='text'>
create an empty dictionary if it is called without keyword args.  Just
pass NULL.

XXX I had believed that this caused weird errors, but the test suite
runs cleanly.
</content>
</entry>
</feed>
