<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/astroid.git, 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>Add basic unit test for enum support</title>
<updated>2015-05-01T08:30:57+00:00</updated>
<author>
<name>Philip Lorenz</name>
<email>philip@bithub.de</email>
</author>
<published>2015-05-01T08:30:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=738a5cef5d0b08a373bf67b2c40d8f8adb070a7a'/>
<id>738a5cef5d0b08a373bf67b2c40d8f8adb070a7a</id>
<content type='text'>
This test verifies that the generated enum member stubs behave
implement the correct interface.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test verifies that the generated enum member stubs behave
implement the correct interface.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't let ResolveError leak out from local_attr, when using .mro().</title>
<updated>2015-04-30T16:34:20+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-30T16:34:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=020a62ef90e6c9c5134c5f367f8f77695d25dc45'/>
<id>020a62ef90e6c9c5134c5f367f8f77695d25dc45</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>SyncManager is a context manager as well.</title>
<updated>2015-04-29T07:41:04+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-29T07:41:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=952bb8ee5575980e46fe11297fca636efa1822a2'/>
<id>952bb8ee5575980e46fe11297fca636efa1822a2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>remove set_context line</title>
<updated>2015-04-24T08:21:23+00:00</updated>
<author>
<name>jarradhope</name>
<email>devnull@localhost</email>
</author>
<published>2015-04-24T08:21:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=d5075734df02cf1aa60da97a2f68b73b97d41558'/>
<id>d5075734df02cf1aa60da97a2f68b73b97d41558</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add six tips for vendorized requests library.</title>
<updated>2015-04-23T21:40:35+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-23T21:40:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=de75edb166c9d318b4e558fb9081369986f89459'/>
<id>de75edb166c9d318b4e558fb9081369986f89459</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>Handle empty strings as arguments to StopIteration when looking for slots().</title>
<updated>2015-04-18T12:34:10+00:00</updated>
<author>
<name>Claudiu Popa</name>
<email>cpopa@cloudbasesolutions.com</email>
</author>
<published>2015-04-18T12:34:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/astroid.git/commit/?id=e7b8030955757b9746418644d5bc5f16306df148'/>
<id>e7b8030955757b9746418644d5bc5f16306df148</id>
<content type='text'>
StopIteration can have an empty string as an argument on Jython,
which lead to an incorrect result when calling .slots().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
StopIteration can have an empty string as an argument on Jython,
which lead to an incorrect result when calling .slots().
</pre>
</div>
</content>
</entry>
</feed>
