RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1389113 - py.test INTERNALERROR due to python-py bug
Summary: py.test INTERNALERROR due to python-py bug
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-py
Version: 7.2
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Charalampos Stratakis
QA Contact: Jan Kepler
URL:
Whiteboard:
Depends On:
Blocks: 1380359 1393868
TreeView+ depends on / blocked
 
Reported: 2016-10-26 21:37 UTC by Orion Poplawski
Modified: 2017-08-01 16:22 UTC (History)
7 users (show)

Fixed In Version: python-py-1.4.32-1.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-08-01 16:22:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Minimal reproducer (30 bytes, text/plain)
2017-01-31 14:51 UTC, Charalampos Stratakis
no flags Details
build.log with fixed python-py (476.80 KB, text/plain)
2017-01-31 15:03 UTC, Charalampos Stratakis
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1930 0 normal SHIPPED_LIVE python-py bug fix update 2017-08-01 17:54:51 UTC

Description Orion Poplawski 2016-10-26 21:37:41 UTC
Description of problem:

python-ruamel-yaml tests fail on EPEL7:

platform linux2 -- Python 2.7.5 -- py-1.4.27 -- pytest-2.7.0
rootdir: /builddir/build/BUILD/ruamel-yaml-171c3653fc01, inifile: tox.ini
collected 185 items
_test/test_a_dedent.py ......
_test/test_anchor.py ............F.....
_test/test_comment_manipulation.py ......................
_test/test_comments.py .......................................
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 84, in wrap_session
INTERNALERROR>     doit(config, session)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 122, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 521, in __call__
INTERNALERROR>     return self._docall(self.methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 528, in _docall
INTERNALERROR>     firstresult=self.firstresult).execute()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 394, in execute
INTERNALERROR>     res = method(*args)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 521, in __call__
INTERNALERROR>     return self._docall(self.methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 528, in _docall
INTERNALERROR>     firstresult=self.firstresult).execute()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 393, in execute
INTERNALERROR>     return wrapped_call(method(*args), self.execute)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 113, in wrapped_call
INTERNALERROR>     return call_outcome.get_result()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 138, in get_result
INTERNALERROR>     py.builtin._reraise(*ex)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 123, in __init__
INTERNALERROR>     self.result = func()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 394, in execute
INTERNALERROR>     res = method(*args)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
INTERNALERROR>     runtestprotocol(item, nextitem=nextitem)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/runner.py", line 75, in runtestprotocol
INTERNALERROR>     reports.append(call_and_report(item, "call", log))
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/runner.py", line 121, in call_and_report
INTERNALERROR>     report = hook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 521, in __call__
INTERNALERROR>     return self._docall(self.methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 528, in _docall
INTERNALERROR>     firstresult=self.firstresult).execute()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 393, in execute
INTERNALERROR>     return wrapped_call(method(*args), self.execute)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 109, in wrapped_call
INTERNALERROR>     wrap_controller.send(call_outcome)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/skipping.py", line 157, in pytest_runtest_makereport
INTERNALERROR>     rep = outcome.get_result()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 138, in get_result
INTERNALERROR>     py.builtin._reraise(*ex)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 123, in __init__
INTERNALERROR>     self.result = func()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 394, in execute
INTERNALERROR>     res = method(*args)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/runner.py", line 224, in pytest_runtest_makereport
INTERNALERROR>     longrepr = item.repr_failure(excinfo)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/python.py", line 625, in repr_failure
INTERNALERROR>     return self._repr_failure_py(excinfo, style=style)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/python.py", line 618, in _repr_failure_py
INTERNALERROR>     style=style)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 410, in _repr_failure_py
INTERNALERROR>     style=style, tbfilter=tbfilter)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 412, in getrepr
INTERNALERROR>     return fmt.repr_excinfo(self)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 590, in repr_excinfo
INTERNALERROR>     reprtraceback = self.repr_traceback(excinfo)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 582, in repr_traceback
INTERNALERROR>     reprentry = self.repr_traceback_entry(entry, einfo)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 543, in repr_traceback_entry
INTERNALERROR>     s = self.get_source(source, line_index, excinfo, short=short)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 484, in get_source
INTERNALERROR>     lines.append(self.flow_marker + "   " + source.lines[line_index])
INTERNALERROR> IndexError: list index out of range

this is fixed in later python-py - apparently in 1.49 according to https://github.com/pytest-dev/pytest/issues/752 and I can confirm fixed in 1.4.31.

Version-Release number of selected component (if applicable):
1.4.27-1.el7

Comment 2 Charalampos Stratakis 2017-01-16 11:07:51 UTC
Hi Orion.

When trying to reproduce the issue (aka build the package against epel7 as I understood), it can't find some packages:

https://kojipkgs.fedoraproject.org//work/tasks/594/17300594/mock_output.log

Comment 3 Orion Poplawski 2017-01-30 18:45:14 UTC
Finally have deps in the buildroot:

https://koji.fedoraproject.org/koji/taskinfo?taskID=17509010

Comment 4 Charalampos Stratakis 2017-01-31 14:51:10 UTC
Created attachment 1246302 [details]
Minimal reproducer

Comment 5 Charalampos Stratakis 2017-01-31 14:59:22 UTC
Reproducer:

1) Download the minimal reproducer test.py
2) yum install pytest
3) execute 'py.test test.py"

Without the fix the result is the same as the report on the first comment

With the fix the result should be:

============================= test session starts ==============================
platform linux2 -- Python 2.7.5 -- py-1.4.27 -- pytest-2.7.0
rootdir: /home, inifile: 
collected 1 items 

test.py F

=================================== FAILURES ===================================
_____________________________________ test _____________________________________

    def test():
        [
>   'valid',bad]
E       NameError: global name 'bad' is not defined

test.py:3: NameError
=========================== 1 failed in 0.00 seconds ===========================

Comment 6 Charalampos Stratakis 2017-01-31 15:03:49 UTC
Created attachment 1246336 [details]
build.log with fixed python-py

I backported the relevant commits and tried to rebuild the package against epel7 but it now fails on some other test cases. Attaching the build.log

Comment 7 Orion Poplawski 2017-01-31 18:51:41 UTC
Great.  The python2 error seems to be an issue with ruamel-yaml and an old pytest.  python3 errors were due to a problem with the python-typing packaging which should be fixed with python-typing-3.5.2.2-3.el7.

Thanks for working on this.

Comment 8 Charalampos Stratakis 2017-02-07 15:20:45 UTC
The fix is:

https://bitbucket.org/pytest-dev/py/commits/7fba3887a4e0

Comment 12 errata-xmlrpc 2017-08-01 16:22:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1930


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