nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails fails in 3.6 because py3 check is limited to 3.5

Bug #1750355 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Chris Dent

Bug Description

nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails fails in 3.6 because py3 check is limited to 3.5 with:

```
Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/Users/cdent/src/nova/nova/api/validation/validators.py", line 300, in validate'
    b' self.validator.validate(*args, **kwargs)'
    b' File "/Users/cdent/src/nova/.tox/py36/lib/python3.6/site-packages/jsonschema/validators.py", line 129, in validate'
    b' for error in self.iter_errors(*args, **kwargs):'
    b' File "/Users/cdent/src/nova/.tox/py36/lib/python3.6/site-packages/jsonschema/validators.py", line 105, in iter_errors'
    b' for error in errors:'
    b' File "/Users/cdent/src/nova/.tox/py36/lib/python3.6/site-packages/jsonschema/_validators.py", line 14, in patternProperties'
    b' if re.search(pattern, k):'
    b' File "/Users/cdent/src/nova/.tox/py36/lib/python3.6/re.py", line 182, in search'
    b' return _compile(pattern, flags).search(string)'
    b'TypeError: expected string or bytes-like object'
```

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/545798

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/545798
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3017531c82f611b5572079753f7ea3c74c3dd71e
Submitter: Zuul
Branch: master

commit 3017531c82f611b5572079753f7ea3c74c3dd71e
Author: Chris Dent <email address hidden>
Date: Mon Feb 19 11:06:45 2018 +0000

    Fix PatternPropertiesTestCase for py 3.6

    A python version check was only checking for 3.5. As noted
    in the pre-existing comment, an exception message is not a
    particularly stable interface so specific-to-minor-version
    check is maintained.

    Change-Id: I441b90e911fbac033e8cdea96114db22cba96ac5
    Closes-Bug: #1750355

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b1

This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.

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.