<feed xmlns='http://www.w3.org/2005/Atom'>
<title>freeipa.git/ipatests/test_ipapython, branch AD-binds</title>
<subtitle>FreeIPA patches</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/'/>
<entry>
<title>Remove Editable DN and DN component classes</title>
<updated>2015-04-23T11:34:39+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>pviktori@redhat.com</email>
</author>
<published>2015-04-10T12:22:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=2cafb47ed7e4eba354355fa3aed1d8bcbac5fb68'/>
<id>2cafb47ed7e4eba354355fa3aed1d8bcbac5fb68</id>
<content type='text'>
Make all DNs, RDNs and AVAs immutable.
Immutability makes reasoning about DN-handling code easier,
as value objects can't be changed once created.
Instead of mutable DNs, one can use a list (or even a generator)
of RDNs that's converted to a DN on output.

Reviewed-By: Jan Cholasta &lt;jcholast@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make all DNs, RDNs and AVAs immutable.
Immutability makes reasoning about DN-handling code easier,
as value objects can't be changed once created.
Instead of mutable DNs, one can use a list (or even a generator)
of RDNs that's converted to a DN on output.

Reviewed-By: Jan Cholasta &lt;jcholast@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>performance: faster DN implementation</title>
<updated>2015-04-14T17:31:54+00:00</updated>
<author>
<name>Petr Vobornik</name>
<email>pvoborni@redhat.com</email>
</author>
<published>2015-03-25T12:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=11bd9d96f191066f7ba760549f00179c128a9787'/>
<id>11bd9d96f191066f7ba760549f00179c128a9787</id>
<content type='text'>
DN code was optimized to be faster if DNs are created from string. This is
the major use case, since most DNs come from LDAP.

With this patch, DN creation is almost 8-10x faster (with 30K-100K DNs).

Second mojor use case - deepcopy in LDAPEntry is about 20x faster - done by
custom __deepcopy__ function.

The major change is that DN is no longer internally composed  of RDNs and
AVAs but it rather keeps the data in open ldap format - the same as output
of str2dn function. Therefore, for immutable DNs, no other transformations
are required on instantiation.

The format is:

DN: [RDN, RDN,...]
RDN: [AVA, AVA,...]
AVA: ['utf-8 encoded str - attr', 'utf-8 encode str -value', FLAG]
FLAG: int

Further indexing of DN object constructs an RDN which is just an encapsulation
of the RDN part of open ldap representation. Indexing of RDN constructs AVA in
the same fashion.

Obtained EditableAVA, EditableRDN from EditableDN shares the respected lists
of the open ldap repr. so that the change of value or attr is reflected in
parent object.

Reviewed-By: Petr Viktorin &lt;pviktori@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DN code was optimized to be faster if DNs are created from string. This is
the major use case, since most DNs come from LDAP.

With this patch, DN creation is almost 8-10x faster (with 30K-100K DNs).

Second mojor use case - deepcopy in LDAPEntry is about 20x faster - done by
custom __deepcopy__ function.

The major change is that DN is no longer internally composed  of RDNs and
AVAs but it rather keeps the data in open ldap format - the same as output
of str2dn function. Therefore, for immutable DNs, no other transformations
are required on instantiation.

The format is:

DN: [RDN, RDN,...]
RDN: [AVA, AVA,...]
AVA: ['utf-8 encoded str - attr', 'utf-8 encode str -value', FLAG]
FLAG: int

Further indexing of DN object constructs an RDN which is just an encapsulation
of the RDN part of open ldap representation. Indexing of RDN constructs AVA in
the same fashion.

Obtained EditableAVA, EditableRDN from EditableDN shares the respected lists
of the open ldap repr. so that the change of value or attr is reflected in
parent object.

Reviewed-By: Petr Viktorin &lt;pviktori@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipatests: port of p11helper test from github</title>
<updated>2015-04-02T08:51:27+00:00</updated>
<author>
<name>Milan Kubik</name>
<email>mkubik@redhat.com</email>
</author>
<published>2015-03-12T15:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=59f024487e0bcaedb773fd4066b2f95c733278c6'/>
<id>59f024487e0bcaedb773fd4066b2f95c733278c6</id>
<content type='text'>
Ported the github hosted [1] script to use pytest's abilities
and included it in ipatests/test_ipapython directory.

[1]: https://github.com/spacekpe/freeipa-pkcs11/blob/master/python/run.py

https://fedorahosted.org/freeipa/ticket/4829

Signed-off-by: Martin Basti &lt;mbasti@redhat.com&gt;
Reviewed-By: Martin Basti &lt;mbasti@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ported the github hosted [1] script to use pytest's abilities
and included it in ipatests/test_ipapython directory.

[1]: https://github.com/spacekpe/freeipa-pkcs11/blob/master/python/run.py

https://fedorahosted.org/freeipa/ticket/4829

Signed-off-by: Martin Basti &lt;mbasti@redhat.com&gt;
Reviewed-By: Martin Basti &lt;mbasti@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Run pylint on tests</title>
<updated>2015-01-14T10:40:28+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>pviktori@redhat.com</email>
</author>
<published>2014-12-16T13:45:37+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=61c4ecccc1df222b153236518c9be0ac3091f94a'/>
<id>61c4ecccc1df222b153236518c9be0ac3091f94a</id>
<content type='text'>
Drop support for pylint &lt; 1.0

Enable ignoring unknown attributes on modules (both nose and pytest
use advanced techniques, support for which only made it to pylint
recently)

Fix some bugs revealed by pylint

Do minor refactoring or add pylint:disable directives where the
linter complains.

Reviewed-By: Tomas Babej &lt;tbabej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drop support for pylint &lt; 1.0

Enable ignoring unknown attributes on modules (both nose and pytest
use advanced techniques, support for which only made it to pylint
recently)

Fix some bugs revealed by pylint

Do minor refactoring or add pylint:disable directives where the
linter complains.

Reviewed-By: Tomas Babej &lt;tbabej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test_ipapython: Use functions instead of classes in test generators</title>
<updated>2014-11-21T11:14:44+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>pviktori@redhat.com</email>
</author>
<published>2014-10-23T11:31:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=387b8b46b874f2b3be67226665f2fd89ed342690'/>
<id>387b8b46b874f2b3be67226665f2fd89ed342690</id>
<content type='text'>
pytest's support for Nose-style test generators is not bulletproof;
use a real function to please it.

https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej &lt;tbabej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pytest's support for Nose-style test generators is not bulletproof;
use a real function to please it.

https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej &lt;tbabej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Use PEP8-compliant setup/teardown method names</title>
<updated>2014-11-21T11:14:44+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>pviktori@redhat.com</email>
</author>
<published>2014-10-07T10:48:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=375e9f7c4b855ee8abbab6b5574d54bbd9fb1742'/>
<id>375e9f7c4b855ee8abbab6b5574d54bbd9fb1742</id>
<content type='text'>
The setUp/dearDown names are used in the unittest module, but there is no reason
to use them in non-`unittest` test cases.
Nose supports both styles (but mixing them can cause trouble when
calling super()'s methods).
Pytest only supports the new ones.

https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej &lt;tbabej@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The setUp/dearDown names are used in the unittest module, but there is no reason
to use them in non-`unittest` test cases.
Nose supports both styles (but mixing them can cause trouble when
calling super()'s methods).
Pytest only supports the new ones.

https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej &lt;tbabej@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use /usr/bin/python2</title>
<updated>2014-01-03T08:46:05+00:00</updated>
<author>
<name>Xiao-Long Chen</name>
<email>chenxiaolong@cxl.epac.to</email>
</author>
<published>2013-11-27T13:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=5e96fbc22afa02f08f71513e7b59d3d5c6a1f9dc'/>
<id>5e96fbc22afa02f08f71513e7b59d3d5c6a1f9dc</id>
<content type='text'>
Part of the effort to port FreeIPA to Arch Linux,
where Python 3 is the default.

FreeIPA hasn't been ported to Python 3, so the code must be modified to
run /usr/bin/python2

https://fedorahosted.org/freeipa/ticket/3438

Updated by pviktori@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of the effort to port FreeIPA to Arch Linux,
where Python 3 is the default.

FreeIPA hasn't been ported to Python 3, so the code must be modified to
run /usr/bin/python2

https://fedorahosted.org/freeipa/ticket/3438

Updated by pviktori@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Raise an error when updating CIDict with duplicate keys</title>
<updated>2013-09-25T08:13:56+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>pviktori@redhat.com</email>
</author>
<published>2013-09-23T08:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=a93fc02af6eb50ecb0cfc69174c9f385d60bbbb3'/>
<id>a93fc02af6eb50ecb0cfc69174c9f385d60bbbb3</id>
<content type='text'>
Updating a CIDict with data like {'A': 1, 'a': 2} would lead to data
loss since only one of the items would get to the CIDict.
This can result in non-obvious bugs similar to this one in python-ldap:
https://bugzilla.redhat.com/show_bug.cgi?id=1007820

Raise an error in this case; any resolution must be done by the caller.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updating a CIDict with data like {'A': 1, 'a': 2} would lead to data
loss since only one of the items would get to the CIDict.
This can result in non-obvious bugs similar to this one in python-ldap:
https://bugzilla.redhat.com/show_bug.cgi?id=1007820

Raise an error in this case; any resolution must be done by the caller.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing dict methods to CIDict</title>
<updated>2013-09-25T08:13:56+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>pviktori@redhat.com</email>
</author>
<published>2013-02-05T15:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=0226064baced57f09b899370752c63cce8009b61'/>
<id>0226064baced57f09b899370752c63cce8009b61</id>
<content type='text'>
Make the CIDict interface match standard dict (except view* methods).

Add __contains__, __iter__, clear.
Add keyword and iterable support for __init__, update.
Also add values() and itervalues(). Previously the dict versions were
used; the new ones guarantee that the order matches keys().
Mark view* methods as not implemented.
CIDict.copy() now returns a CIDict.

Test the above additions, and fromkeys() which worked but wasn't tested.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the CIDict interface match standard dict (except view* methods).

Add __contains__, __iter__, clear.
Add keyword and iterable support for __init__, update.
Also add values() and itervalues(). Previously the dict versions were
used; the new ones guarantee that the order matches keys().
Mark view* methods as not implemented.
CIDict.copy() now returns a CIDict.

Test the above additions, and fromkeys() which worked but wasn't tested.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert test_ipautil from unittest to nose</title>
<updated>2013-09-25T08:13:56+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>pviktori@redhat.com</email>
</author>
<published>2012-06-15T09:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/freeipa.git/commit/?id=468e5e40ccc9251cdb6b2d1ad95e32dc588be332'/>
<id>468e5e40ccc9251cdb6b2d1ad95e32dc588be332</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
