py3.7 async is a keyword

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

Bug Description

I'm working on packaging nova for rocky on ubuntu cosmic which is now at py3.7. In py3.7 "async" is a keyword, which results in issues such as:

Failed to import test module: nova.tests.unit
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/unittest2/loader.py", line 490, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3/dist-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/nova/tests/unit/__init__.py", line 30, in <module>
    objects.register_all()
  File "/<<PKGBUILDDIR>>/nova/objects/__init__.py", line 28, in register_all
    __import__(\'nova.objects.aggregate\')
  File "/<<PKGBUILDDIR>>/nova/objects/aggregate.py", line 23, in <module>
    from nova.db.sqlalchemy import api as db_api
  File "/<<PKGBUILDDIR>>/nova/db/sqlalchemy/api.py", line 218
    reader_mode = get_context_manager(context).async
                                                   ^
SyntaxError: invalid syntax

Revision history for this message
Corey Bryant (corey.bryant) wrote :

note that this will need to be paired with oslo.db commit df6bf3401266f42271627c1e408f87c71a06cef7 "Rename enginefacade.async to enginefacade.async_".

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/584365

Changed in nova:
assignee: nobody → Corey Bryant (corey.bryant)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/584365
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2d532963fa2e013e16cc403f2674a4488c4170ab
Submitter: Zuul
Branch: master

commit 2d532963fa2e013e16cc403f2674a4488c4170ab
Author: Corey Bryant <email address hidden>
Date: Fri Jul 20 09:01:56 2018 -0400

    In Python3.7 async is a keyword [1]

    Change all instances of "async" to "async_"

    [1] https://docs.python.org/3/whatsnew/3.7.html

    Change-Id: I974b1177ba8313ac502910ca358cf386ef00bc02
    Closes-Bug: #1782746

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.0rc1

This issue was fixed in the openstack/nova 18.0.0.0rc1 release candidate.

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.