Murano uses sys.maxint which was removed in python 3

Bug #1628830 reported by Tatiana Kholkina
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Tatiana Kholkina
Mitaka
Won't Fix
Undecided
Unassigned
Newton
Fix Committed
High
Valerii Kovalchuk
Ocata
Fix Released
High
Tatiana Kholkina

Bug Description

sys.maxint was removed but murano still uses this constant.
It causes the following error:

    b'Traceback (most recent call last):'
    b' File "/home/tlashchova/murano/murano/murano/tests/unit/packages/hot_package/test_hot_package.py", line 166, in test_translate_ui'
    b' hot_package._translate_ui()'
    b' File "/home/tlashchova/murano/murano/murano/packages/hot_package.py", line 527, in _translate_ui'
    b' groups = HotPackage._translate_ui_parameters(hot, self.description)'
    b' File "/home/tlashchova/murano/murano/murano/packages/hot_package.py", line 386, in _translate_ui_parameters'
    b' parameter, parameter_value))'
    b' File "/home/tlashchova/murano/murano/murano/packages/hot_package.py", line 442, in _translate_ui_parameter'
    b" translated.get('minLength', -sys.maxint - 1),"
    b"AttributeError: 'module' object has no attribute 'maxint'"
    b''

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

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

Changed in murano:
assignee: nobody → Tetiana Lashchova (tlashchova)
status: New → In Progress
Changed in murano:
importance: Undecided → High
milestone: none → ocata-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/379285
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=6a8e88de823f562b3b785a13e5cc31523475cc49
Submitter: Jenkins
Branch: master

commit 6a8e88de823f562b3b785a13e5cc31523475cc49
Author: Tetiana Lashchova <email address hidden>
Date: Thu Sep 29 11:57:33 2016 +0300

    Use sys.maxsize instead of sys.maxint

    The sys.maxint constant was removed in python 3 and now it's
    better to use sys.maxsize.
    https://docs.python.org/3/whatsnew/3.0.html#integers

    Change-Id: I5af1537ae04a16454f20040e01ec64a6454171a2
    Closes-Bug: #1628830

Changed in murano:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/385838

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (stable/newton)

Reviewed: https://review.openstack.org/385838
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=a97cc33777a1fddc027eafad654ea79e77c92e98
Submitter: Jenkins
Branch: stable/newton

commit a97cc33777a1fddc027eafad654ea79e77c92e98
Author: Tetiana Lashchova <email address hidden>
Date: Thu Sep 29 11:57:33 2016 +0300

    Use sys.maxsize instead of sys.maxint

    The sys.maxint constant was removed in python 3 and now it's
    better to use sys.maxsize.
    https://docs.python.org/3/whatsnew/3.0.html#integers

    Change-Id: I5af1537ae04a16454f20040e01ec64a6454171a2
    Closes-Bug: #1628830
    (cherry picked from commit 6a8e88de823f562b3b785a13e5cc31523475cc49)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/murano 3.1.0

This issue was fixed in the openstack/murano 3.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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