Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1578759 - python-astroid FTFBS with Python 3.7
Summary: python-astroid FTFBS with Python 3.7
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-astroid
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1578817 1578851
Blocks: PYTHON37
TreeView+ depends on / blocked
 
Reported: 2018-05-16 11:15 UTC by Miro Hrončok
Modified: 2018-06-13 13:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-13 13:30:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
build.log from copr (933.02 KB, text/plain)
2018-05-16 11:15 UTC, Miro Hrončok
no flags Details
build.log from copr (933.02 KB, text/plain)
2018-05-16 11:16 UTC, Miro Hrončok
no flags Details
root.log from copr (69.06 KB, text/plain)
2018-05-16 11:16 UTC, Miro Hrončok
no flags Details

Description Miro Hrončok 2018-05-16 11:15:20 UTC
Created attachment 1437259 [details]
build.log from copr

Description of problem: When I rebuild python-astroid with Python 3.7, the test fail with lot of erros.

Traceback (most recent call last):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/decorators.py", line 85, in wrapped
    res = next(generator)
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/decorators.py", line 100, in wrapped
    raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/tests/unittest_brain.py", line 519, in test_enum_func_form_is_class_not_instance
    inferred_instance = next(instance.infer())
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/decorators.py", line 138, in raise_if_nothing_inferred
    yield next(generator)
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/decorators.py", line 85, in wrapped
    res = next(generator)
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/inference.py", line 171, in infer_call
    for inferred in callee.infer_call_result(self, callcontext):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/bases.py", line 209, in infer_call_result
    for node in self._proxied.igetattr('__call__', context):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/scoped_nodes.py", line 1473, in igetattr
    attrs = self.getattr(name, context, class_context=class_context)
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/scoped_nodes.py", line 1411, in getattr
    for classnode in self.ancestors(recurs=True, context=context):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/scoped_nodes.py", line 1292, in ancestors
    context=context):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/scoped_nodes.py", line 1279, in ancestors
    for baseobj in stmt.infer(context):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/context.py", line 40, in cache_generator
    for result in generator:
RuntimeError: generator raised StopIteration
======================================================================
ERROR: test_enum_multiple_base_classes (astroid.tests.unittest_brain.EnumBrainTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/decorators.py", line 85, in wrapped
    res = next(generator)
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/decorators.py", line 100, in wrapped
    raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/tests/unittest_brain.py", line 490, in test_enum_multiple_base_classes
    clazz = one.getattr('__class__')[0]
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/bases.py", line 135, in getattr
    values = self._proxied.instance_attr(name, context)
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/scoped_nodes.py", line 1366, in instance_attr
    for class_node in self.instance_attr_ancestors(name, context):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/scoped_nodes.py", line 1326, in instance_attr_ancestors
    for astroid in self.ancestors(context=context):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/scoped_nodes.py", line 1279, in ancestors
    for baseobj in stmt.infer(context):
  File "/builddir/build/BUILD/astroid-1602965b4ef3ce54807de425bfc5bb2073d0c4d8/astroid/context.py", line 40, in cache_generator
    for result in generator:
RuntimeError: generator raised StopIteration


Version-Release number of selected component (if applicable): 1.5.3-3.fc29


This is blocking pylint and thus all packages that BR pylint.

Current upstream master works with Python 3.7, but has dropped Python 2 support entirely. I'll try to investigate whether there si a version that supports both.

Comment 1 Miro Hrončok 2018-05-16 11:16:21 UTC
Created attachment 1437260 [details]
build.log from copr

Comment 2 Miro Hrončok 2018-05-16 11:16:59 UTC
Created attachment 1437261 [details]
root.log from copr

Comment 3 Miro Hrončok 2018-05-16 11:25:08 UTC
1.6.x does not work with Python 3.7.
2.x does not work with Python 2.

There might be nothing in between: https://github.com/PyCQA/astroid/issues/539

Comment 4 Miro Hrončok 2018-05-16 11:38:59 UTC
We might need to (for both astroid and pylint):

 * update to 2.x (or whatever this the pylint version) in rawhide
   * alpha will be released this week
   * drop python2 subpackages
 * introduce python2-astroid and python2-pylint (source) packages (like we did with python2-ipython)

Comment 5 Miro Hrončok 2018-05-17 14:10:35 UTC
https://github.com/PyCQA/astroid/issues/540

Comment 6 Christian Dersch 2018-05-17 14:15:06 UTC
Do you already have the required changes to packaging prepared? At least I recognized your review requests for the python2-* packages.

If yes: Feel free to apply them to both packages when you think they're ready. I'm quite busy for the next weeks. Thanks!

Comment 7 Miro Hrončok 2018-05-17 14:54:27 UTC
The python2- packages are ready, the "main" packages with python3 are not yet ready, I'm waiting for upstream 2.x release actually. Will send a pagure PR and let cstratak review my changes before I merge them. Thanks for the approval.

Comment 9 Miro Hrončok 2018-05-22 20:59:37 UTC
Also https://github.com/PyCQA/astroid/issues/550

Comment 10 Miro Hrončok 2018-06-04 17:42:20 UTC
Upstream fix:

https://github.com/PyCQA/astroid/commit/be874a94b81f2b9404722937f1ea0e105c3c034a
https://github.com/PyCQA/astroid/commit/a4996b4ce7d2a1b651ae984ee3448b8913577c5f

I keep this open, let's wait for a release and if it doesn't happen, those pacthes apply "as is".


Note You need to log in before you can comment on or make changes to this bug.