<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/astroid.git/ChangeLog, branch enum-fixes</title>
<subtitle>bitbucket.org: Obsolete (use python-packages/astroid-git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/'/>
<entry>
<title>Ensure that generated enum values have the correct base classes</title>
<updated>2015-05-01T08:44:12+00:00</updated>
<author>
<name>Philip Lorenz</name>
<email>philip@bithub.de</email>
</author>
<published>2015-05-01T08:44:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=b7b303d5b590c11ba8d861dcd8fa440122567d6d'/>
<id>b7b303d5b590c11ba8d861dcd8fa440122567d6d</id>
<content type='text'>
Enum values should share the same base classes as their defining class.
If this is not the case it may lead to wrong inference results when an
enum member is used - e.g. for the following snippet:

class X(enum.IntEnum):
    one = 1

print([1, 2][X.one])

pylint will detect a "invalid-sequence-index" error as the __index__
method of X.one is not detected.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enum values should share the same base classes as their defining class.
If this is not the case it may lead to wrong inference results when an
enum member is used - e.g. for the following snippet:

class X(enum.IntEnum):
    one = 1

print([1, 2][X.one])

pylint will detect a "invalid-sequence-index" error as the __index__
method of X.one is not detected.
</pre>
</div>
</content>
</entry>
<entry>
<title>Expose a implicit_metaclass() method in Class.</title>
<updated>2015-04-24T21:29:31+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-24T21:29:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=98ebf98748c0cc4beaf40e779b0c863cb5cad7a5'/>
<id>98ebf98748c0cc4beaf40e779b0c863cb5cad7a5</id>
<content type='text'>
This will return a builtins.type instance for newstyle classes, otherwise it will
return None.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will return a builtins.type instance for newstyle classes, otherwise it will
return None.
</pre>
</div>
</content>
</entry>
<entry>
<title>Class.local_attr and Class.local_attr_ancestors uses internally a mro lookup, using .mro() method, if they can.</title>
<updated>2015-04-18T18:22:10+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-18T18:22:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=a33c019e29b18ed594ac1b427768e9a8b016b128'/>
<id>a33c019e29b18ed594ac1b427768e9a8b016b128</id>
<content type='text'>
That means for newstyle classes, when trying to lookup a member
using one of these functions, the first one according to the
mro will be returned. This reflects nicely the reality,
but it can have as a drawback the fact that it is a behaviour
change (the previous behaviour was incorrect though). Also,
having bases which can return multiple values when inferred
will not work with the new approach, because .mro() only
retrieves the first value inferred from a base.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That means for newstyle classes, when trying to lookup a member
using one of these functions, the first one according to the
mro will be returned. This reflects nicely the reality,
but it can have as a drawback the fact that it is a behaviour
change (the previous behaviour was incorrect though). Also,
having bases which can return multiple values when inferred
will not work with the new approach, because .mro() only
retrieves the first value inferred from a base.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't hard fail when calling .mro() on a class which has combined both newstyle and old style classes.</title>
<updated>2015-04-18T17:50:46+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-18T17:50:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=2cab2395cf9dbee0d076d5f0b69b50aac8c0312e'/>
<id>2cab2395cf9dbee0d076d5f0b69b50aac8c0312e</id>
<content type='text'>
The class in question is actually newstyle (and the __mro__ can be retrieved using Python).
.mro() fallbacks to using .ancestors() in that case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The class in question is actually newstyle (and the __mro__ can be retrieved using Python).
.mro() fallbacks to using .ancestors() in that case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support multiple types of known properties in _wrap_attr.</title>
<updated>2015-04-17T20:45:59+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-17T20:45:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=8fb276122ab8d0e308f4c9453d5857de17454966'/>
<id>8fb276122ab8d0e308f4c9453d5857de17454966</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>UnboundMethod.getattr calls the getattr of its _proxied object.</title>
<updated>2015-04-17T17:39:14+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-17T17:39:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=aa5d3cc86ee45d409d01e2dc4f575c0eeaad0788'/>
<id>aa5d3cc86ee45d409d01e2dc4f575c0eeaad0788</id>
<content type='text'>
It previously crashed, since it called super(...).getattr(..) and the
first ancestor in its mro was bases.Proxy and bases.Proxy doesn't implement
the .getattr method. Closes issue #91.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It previously crashed, since it called super(...).getattr(..) and the
first ancestor in its mro was bases.Proxy and bases.Proxy doesn't implement
the .getattr method. Closes issue #91.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve the inference of Getattr nodes when dealing with abstract properties from the abc module.</title>
<updated>2015-04-17T15:03:21+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-17T15:03:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=04444f62d6828db538cc1b4a127407ca2886c22d'/>
<id>04444f62d6828db538cc1b4a127407ca2886c22d</id>
<content type='text'>
In astroid.bases.Instance._wrap_attr we had a detection
code for properties, which basically inferred whatever
a property returned, passing the results up the stack,
to the igetattr() method. It handled only the builtin property
but the new patch also handles abc.abstractproperty.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In astroid.bases.Instance._wrap_attr we had a detection
code for properties, which basically inferred whatever
a property returned, passing the results up the stack,
to the igetattr() method. It handled only the builtin property
but the new patch also handles abc.abstractproperty.
</pre>
</div>
</content>
</entry>
<entry>
<title>.slots() will return an empty list for classes with empty slots.</title>
<updated>2015-04-14T14:17:52+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-14T14:17:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=bc20fa60c0ec9cd9b63a14901d844f00c501a196'/>
<id>bc20fa60c0ec9cd9b63a14901d844f00c501a196</id>
<content type='text'>
Previously it returned None, which is the same value for
classes without slots at all. This was changed in order
to better reflect what's actually happening.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously it returned None, which is the same value for
classes without slots at all. This was changed in order
to better reflect what's actually happening.
</pre>
</div>
</content>
</entry>
<entry>
<title>Understand partially the 3-argument form of `type`.</title>
<updated>2015-04-13T18:27:14+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-13T18:27:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=b32aab809b265b536805242b7ecdb9c785edfaae'/>
<id>b32aab809b265b536805242b7ecdb9c785edfaae</id>
<content type='text'>
The only change is that astroid understands members
passed in as dictionaries as the third argument. This improves
the understanding of classes generated on-the-fly, using
the type function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only change is that astroid understands members
passed in as dictionaries as the third argument. This improves
the understanding of classes generated on-the-fly, using
the type function.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add brain tips for multiprocessing post Python 3.4+.</title>
<updated>2015-04-02T14:58:56+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-02T14:58:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=63dd380e4c0cb27e972e912ee65ff532cbd8e8f9'/>
<id>63dd380e4c0cb27e972e912ee65ff532cbd8e8f9</id>
<content type='text'>
In Python 3.4+, the module level functions are retrieved with getattr
from a context object, leading to many no-member errors
in Pylint. This patch ensures us that we can retrieve those attributes,
no matter what.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Python 3.4+, the module level functions are retrieved with getattr
from a context object, leading to many no-member errors
in Pylint. This patch ensures us that we can retrieve those attributes,
no matter what.
</pre>
</div>
</content>
</entry>
</feed>
