[PATCH] Cache ordering is not stable in Python 2.7

Bug #641326 reported by Michel Lind
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
Fix Released
Undecided
Unassigned
Fedora
Fix Released
Medium

Bug Description

Fedora is switching to Python 2.7 for the next release, and one of the unit tests in Storm (tested with versions 0.15-0.17) fails because ordering inside a cache is not stable.

This patch sorts the initial objects and the cached ones before asserting that the two lists are equal.

Revision history for this message
In , Toshio (toshio-redhat-bugs) wrote :

Description of problem:
a unittest fails when rebuilding with python-2.7. Looks like the ordering inside of a cache is not stable but storm's test suite doesn't recognize that.

I'm fixing the test suite with the attached patch and rebuilding for f15 and f14. Please submit the patch upstream.

Revision history for this message
In , Toshio (toshio-redhat-bugs) wrote :

Created attachment 435718
fix ordering assumption in test suite

Revision history for this message
Michel Lind (michel-slm) wrote :
Revision history for this message
In , Michel (michel-redhat-bugs) wrote :

Reported; leaving this open until upstream makes a decision.

Revision history for this message
Jamu Kakar (jkakar) wrote :

Hi Michel,

Thanks for the patch. Have you signed the Canonical Contributors
Agreement? We'll need to to sign it before we can accept your patch:

http://www.canonical.com/contributors

Changed in storm:
milestone: none → 0.18
Revision history for this message
Michel Lind (michel-slm) wrote : Re: [Bug 641326] Re: [PATCH] Cache ordering is not stable in Python 2.7

Hi Jamu,

The patch actually comes from Toshio Kuratomi; I'm Cc: ing him.
Toshio, have you signed Canonical contributor agreement?

Alternatively, would it be fine to just declare the contribution
public domain? It's quite a small and, in this case, obvious fix.

On Fri, Sep 17, 2010 at 4:31 PM, Jamu Kakar <email address hidden> wrote:
> Hi Michel,
>
> Thanks for the patch.  Have you signed the Canonical Contributors
> Agreement?  We'll need to to sign it before we can accept your patch:
>
> http://www.canonical.com/contributors
>
>
> ** Changed in: storm
>    Milestone: None => 0.18
>
> --
> [PATCH] Cache ordering is not stable in Python 2.7
> https://bugs.launchpad.net/bugs/641326
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Storm: New
> Status in Fedora: Unknown
>
> Bug description:
> Fedora is switching to Python 2.7 for the next release, and one of the unit tests in Storm (tested with versions 0.15-0.17) fails because ordering inside a cache is not stable.
>
> This patch sorts the initial objects and the cached ones before asserting that the two lists are equal.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/storm/+bug/641326/+subscribe
>

Revision history for this message
Toshio Kuratomi (toshio) wrote :

I have signed the agreement and I'm on the list: https://launchpad.net/~contributor-agreement-canonical/+members#active

I confirm that I wrote the patch in question.

Gary Poster (gary)
Changed in storm:
milestone: 0.18 → 0.19
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.18-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/python-storm-0.18-1.fc14

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.18-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/python-storm-0.18-1.fc15

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.18-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/python-storm-0.18-1.fc13

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.18-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/python-storm-0.18-1.el6

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.18-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.18-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.18-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.18-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Barry Warsaw (barry)
Changed in storm:
milestone: 0.19 → 0.20
Revision history for this message
Michel Lind (michel-slm) wrote :

Could someone mark this bug closed? Storm 0.19 actually includes the patch (modulo some indentation changes)

Revision history for this message
Barry Warsaw (barry) wrote :

Unfortunately, milestone 0.19 is closed so this bug can't be targeted to it, but I changed the status to Fixed Release. Thanks for the update.

Changed in storm:
milestone: 0.20 → none
status: New → Fix Released
Changed in fedora:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.