DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

Bug #1280435 reported by Jason Dunsmore
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
oslo-incubator
In Progress
Medium
Andrew Lazarev

Bug Description

When running the Heat unit tests, most of the output is deprecation warnings from line 526 of openstack/common/db/sqlalchemy/session.py:

$ tox -e py27
py27 develop-inst-nodeps: /home/jason/github/heat
py27 runtests: commands[0] | python setup.py testr --slowest --testr-args=
[pbr] Excluding argparse: Python 2.6 only dependency
running testr
running=
PYTHON=$(echo ${PYTHON:-python} | sed 's/--source heat//g')
${PYTHON} -m subunit.run discover -s . --list
${PYTHON} -m subunit.run discover -s contrib --list
running=
PYTHON=$(echo ${PYTHON:-python} | sed 's/--source heat//g')
${PYTHON} -m subunit.run discover -s . --load-list /tmp/tmpz6YpAT
${PYTHON} -m subunit.run discover -s contrib --load-list /tmp/tmpz6YpAT
running=
PYTHON=$(echo ${PYTHON:-python} | sed 's/--source heat//g')
${PYTHON} -m subunit.run discover -s . --load-list /tmp/tmpcnciAj
${PYTHON} -m subunit.run discover -s contrib --load-list /tmp/tmpcnciAj
running=
PYTHON=$(echo ${PYTHON:-python} | sed 's/--source heat//g')
${PYTHON} -m subunit.run discover -s . --load-list /tmp/tmplrOgMv
${PYTHON} -m subunit.run discover -s contrib --load-list /tmp/tmplrOgMv
running=
PYTHON=$(echo ${PYTHON:-python} | sed 's/--source heat//g')
${PYTHON} -m subunit.run discover -s . --load-list /tmp/tmppQoXeI
${PYTHON} -m subunit.run discover -s contrib --load-list /tmp/tmppQoXeI
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
heat/openstack/common/db/sqlalchemy/session.py:526: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  match = pattern.match(integrity_error.message)
Ran 2316 (+1265) tests in 44.138s (+9.695s)
PASSED (id=4014)
Slowest Tests
Test id Runtime (s)
--------------------------------------------------------------------------------------------------------------------------- -----------
heat.tests.test_autoscaling_update_policy.AutoScalingGroupTest.test_autoscaling_group_update_replace_huge_min_in_service 2.264
heat.tests.test_instance_group_update_policy.InstanceGroupTest.test_instance_group_update_replace_huge_min_in_service 1.598
heat.tests.test_autoscaling_update_policy.AutoScalingGroupTest.test_autoscaling_group_update_replace 1.588
heat.tests.test_autoscaling_update_policy.AutoScalingGroupTest.test_autoscaling_group_update_replace_with_adjusted_capacity 1.474
heat.tests.test_autoscaling_update_policy.AutoScalingGroupTest.test_autoscaling_group_update_no_replace 1.312
heat.tests.test_autoscaling_update_policy.AutoScalingGroupTest.test_autoscaling_group_update_replace_huge_batch_size 1.222
heat.tests.test_autoscaling_update_policy.AutoScalingGroupTest.test_instance_group_update_no_replace_with_adjusted_capacity 1.144
heat.tests.test_instance_group_update_policy.InstanceGroupTest.test_instance_group_update_replace 1.046
heat.tests.test_instance_group_update_policy.InstanceGroupTest.test_instance_group_update_replace_with_adjusted_capacity 0.936
heat.tests.test_instance_group_update_policy.InstanceGroupTest.test_instance_group_update_replace_huge_batch_size 0.860
___________________________________ summary ____________________________________
  py27: commands succeeded
  congratulations :)

There's a comment in openstack/common/db/sqlalchemy/session.py describing what needs to be done: https://github.com/openstack/oslo-incubator/commit/df3f2bafb

Revision history for this message
Jason Dunsmore (jasondunsmore) wrote :
Revision history for this message
Ben Nemec (bnemec) wrote :

Yeah, we need to do something about this or I believe we can't support Python 3. Probably something to do early in Juno so we have time to work out any kinks that result from changed messages.

Changed in oslo:
status: New → Triaged
importance: Undecided → Medium
Changed in oslo:
assignee: nobody → Andrew Lazarev (alazarev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

Changed in oslo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.db (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo-incubator (master)

Change abandoned by Andrew Lazarev (<email address hidden>) on branch: master
Review: https://review.openstack.org/96637
Reason: There is a review for it in oslo.db. Abandoning.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.db (master)

Change abandoned by Andrew Lazarev (<email address hidden>) on branch: master
Review: https://review.openstack.org/96813
Reason: There is a discussion in https://review.openstack.org/#/c/94054/. Abandoning this one.

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.