Py3.7 RuntimeError: generator raised StopIteration

Bug #1780827 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Wishlist
Corey Bryant
Python
Fix Released
Unknown

Bug Description

Running designate unit tests I hit the following: https://paste.ubuntu.com/p/p4BJWvbCDR/

I believe this is due to changes introduced by https://www.python.org/dev/peps/pep-0479/.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Python 3.7 has introduced incompatibilities for a lot of projects, but I feel it will be difficult to tackle these until we have a stable test environment for it. So this will probably have to wait until the next Ubuntu LTS release that includes 3.7 (or newer?) as default python3 version.

Testing with python3.6 on 18.04 I fail to see the deprecation warnings mentioned in the PEP, so I don't see how we could act on these at the current state.

Changed in designate:
status: New → Incomplete
importance: Undecided → Wishlist
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Jens, I have to disagree with wishlist here. While I understand gate is not running py3.7 tests, these are easy enough to recreate. I'm trying to tackle as many upstream py3.7 fixes as possible but it's a bit overwhelming without some help from others. Filing this under Incomplete/Wishlist will help to get no attention on this.

This can be recreated on Ubuntu Cosmic. Here are some steps that I've used:

1) lxc launch ubuntu-daily:cosmic c1
2) lxc exec c1 /bin/bash
3) root@c1:~# git clone https://github.com/openstack/designate
4) cd designate
5) # update tox.ini to have a py37 target
6) tox -e py37

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

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

Changed in designate:
assignee: nobody → Corey Bryant (corey.bryant)
status: Incomplete → In Progress
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Note that I'm getting hangs when running tests with py3.7 after this fix is applied. (I think the tests fail before reaching the hangs without the fix applied). It may be a separate issue. I'll provide more details shortly.

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

Pastebin of py3.7 hang/errors mentioned in comment #4:
https://paste.ubuntu.com/p/jY5V6gk9gG/

Revision history for this message
Graham Hayes (grahamhayes) wrote :

this looks like a new py3.7 change - https://bugs.python.org/issue33666

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

I've opened LP:#1782204 for the os.errno Py3.7 failures.

Revision history for this message
Corey Bryant (corey.bryant) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/583297
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=19b8a6e852da4e2f6b4236e502ed625b7869c271
Submitter: Zuul
Branch: master

commit 19b8a6e852da4e2f6b4236e502ed625b7869c271
Author: Corey Bryant <email address hidden>
Date: Tue Jul 17 09:14:55 2018 -0400

    Replace StopIteration with return for PEP 0479

    PEP 0479, https://www.python.org/dev/peps/pep-0479/, makes the
    following change: "when StopIteration is raised inside a generator,
    it is replaced it with RuntimeError".

    The PEP suggests that if raise StopIteration occurs directly in a
    generator, simply replace it with return.

    Change-Id: I9bb72936c8d56b338084bb0be7e75aecdf09f8b3
    Closes-Bug: #1780827

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

This issue was fixed in the openstack/designate 7.0.0.0b3 development milestone.

Changed in python:
status: Unknown → Fix Released
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.