enginefacade is not compatible with python 3.7

Bug #1775866 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.db
Fix Released
High
Mike Bayer

Bug Description

_TransactionContextManager has a @property/method named "async", which is a reserved keyword in python 3.7.

This results in:

--- import errors ---
Failed to import test module: oslo_db.tests.sqlalchemy
Traceback (most recent call last):
  File "/home/eharney/src/oslo.db/.tox/py37/lib/python3.7/site-packages/unittest2/loader.py", line 490, in _find_test_path
    package = self._get_module_from_name(name)
  File "/home/eharney/src/oslo.db/.tox/py37/lib/python3.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/home/eharney/src/oslo.db/oslo_db/tests/sqlalchemy/__init__.py", line 16, in <module>
    from oslo_db.sqlalchemy import test_fixtures
  File "/home/eharney/src/oslo.db/oslo_db/sqlalchemy/test_fixtures.py", line 22, in <module>
    from oslo_db.sqlalchemy import enginefacade
  File "/home/eharney/src/oslo.db/oslo_db/sqlalchemy/enginefacade.py", line 968
    def async(self):
            ^
SyntaxError: invalid syntax

Ben Nemec (bnemec)
Changed in oslo.db:
status: New → Confirmed
importance: Undecided → High
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/577323

Changed in oslo.db:
assignee: nobody → Herveberaud-pro (herveberaud-pro)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Change abandoned by Hervé Beraud (<email address hidden>) on branch: master
Review: https://review.openstack.org/577525
Reason: duplicate with https://review.openstack.org/#/c/577323/2

Changed in oslo.db:
assignee: Herveberaud-pro (herveberaud-pro) → Mike Bayer (zzzeek)
Changed in oslo.db:
assignee: Mike Bayer (zzzeek) → Herveberaud-pro (herveberaud-pro)
Changed in oslo.db:
assignee: Herveberaud-pro (herveberaud-pro) → Mike Bayer (zzzeek)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Hervé Beraud (<email address hidden>) on branch: master
Review: https://review.openstack.org/577323
Reason: duplicate patch I close this patch
cf. https://review.openstack.org/574833

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.db (master)

Reviewed: https://review.openstack.org/574833
Committed: https://git.openstack.org/cgit/openstack/oslo.db/commit/?id=df6bf3401266f42271627c1e408f87c71a06cef7
Submitter: Zuul
Branch: master

commit df6bf3401266f42271627c1e408f87c71a06cef7
Author: Mike Bayer <email address hidden>
Date: Tue Jun 12 13:26:39 2018 -0400

    Rename enginefacade.async to enginefacade.async_

    Python 3.7 now makes "async" a keyword, so deprecate the
    "async" name and replace with "async_". Additionally,
    use attribute name access only in order to implement and
    test "async" as it won't work under Python 3.7.

    Closes-Bug: #1775866
    Change-Id: Ifb2c59c2cfbd615b04570b31fcfe868f4ffea3c6

Changed in oslo.db:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.db 4.40.0

This issue was fixed in the openstack/oslo.db 4.40.0 release.

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.