Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457740 - dev-python/webob-1.2.3-r1: fails tests with py3.3
Summary: dev-python/webob-1.2.3-r1: fails tests with py3.3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: python-3.3
  Show dependency tree
 
Reported: 2013-02-15 18:56 UTC by Michał Górny
Modified: 2013-06-07 16:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-15 18:56:04 UTC
Seems like a minor change, webob assuming keys are sorted. Not sure if it has further implications, though.

======================================================================
FAIL: test_headers2 (tests.test_request.TestRequest_functional)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-python/webob-1.2.3-r1/work/WebOb-1.2.3/tests/test_request.py", line 2665, in test_headers2
    self.assertEqual(list(r.environ.keys()), ['a',  'HTTP_SERVER'])
AssertionError: Lists differ: ['HTTP_SERVER', 'a'] != ['a', 'HTTP_SERVER']

First differing element 0:
HTTP_SERVER
a

- ['HTTP_SERVER', 'a']
?               -----

+ ['a', 'HTTP_SERVER']
?  +++++

    """Fail immediately, with the given message."""
>>  raise self.failureException("Lists differ: ['HTTP_SERVER', 'a'] != ['a', 'HTTP_SERVER']\n\nFirst differing element 0:\nHTTP_SERVER\na\n\n- ['HTTP_SERVER', 'a']\n?               -----\n\n+ ['a', 'HTTP_SERVER']\n?  +++++\n")


----------------------------------------------------------------------
Comment 1 Sean Santos 2013-06-02 18:37:55 UTC
This was fixed upstream by comparing sets instead of lists:

https://github.com/Pylons/webob/blob/master/tests/test_request.py

Doesn't look like there's been a new tag with the fix. You could patch it and see if tests pass, I suppose.
Comment 2 Sean Santos 2013-06-02 18:39:56 UTC
Oops. This was the actual commit:

https://github.com/Pylons/webob/commit/3a2c16f2f72dbca5ddfce7f649daf426c2125fed
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2013-06-06 11:31:25 UTC
emerge --info would have ascertained whether it ways py3.3 or 3.3.0-r1.  That is a possible diff to mine in which it passed the test under py3.3 without the patch. Mine is 3.3.0-r1, but it may be something else. Either way it passed with the patch too.

  06 Jun 2013; Ian Delaney <idella4@gentoo.org> +files/webob-1.2.3-tests.patch,
  webob-1.2.3-r1.ebuild:
  patch from upstream applied, fix to one tests, wrt Bug #457740 by mgorny
Comment 4 Sean Santos 2013-06-07 00:06:52 UTC
Re: Comment 3

According to the upstream ticket, this was due to hash randomization in Python 3.3 that scrambles the key order:

https://github.com/Pylons/webob/commit/3a2c16f2f72dbca5ddfce7f649daf426c2125fed

Since there's only 2 items in the list, I guess it has a 50% chance of being in the right order each time, so that may be why your tests passed.
Comment 5 Ian Delaney (RETIRED) gentoo-dev 2013-06-07 16:14:29 UTC
hmm makes sense