Bug 1583818

Summary: python-paste FTBFS on python 3.7
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-pasteAssignee: Randy Barlow <rbarlow>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: kylev, lewk, pviktori, rbarlow
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.0.3-6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-10 18:28:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1565020    
Attachments:
Description Flags
build.log from copr
none
root.log from copr none

Description Miro Hrončok 2018-05-29 18:58:23 UTC
Created attachment 1445508 [details]
build.log from copr

Description of problem: python-paste FTBFS on python 3.7, the test fail with RuntimeError: generator raised StopIteration

+ nosetests-3.7 -e '.*test_paste_website'
BUILDSTDERR: ...E.....................................................................................................................................
======================================================================
ERROR: tests.test_auth.test_auth_digest.test_digest
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-paste-2.0.3-5.fc29/paste/auth/digest.py", line 60, in _split_auth_string
    raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/python3-python-paste-2.0.3-5.fc29/tests/test_auth/test_auth_digest.py", line 52, in test_digest
    assert b'bing' == check("bing","gnib")
  File "/builddir/build/BUILD/python3-python-paste-2.0.3-5.fc29/tests/test_auth/test_auth_digest.py", line 44, in check
    HTTP_AUTHORIZATION=response)
  File "/builddir/build/BUILD/python3-python-paste-2.0.3-5.fc29/paste/wsgilib.py", line 348, in raw_interactive
    app_iter = application(basic_environ, start_response)
  File "/builddir/build/BUILD/python3-python-paste-2.0.3-5.fc29/paste/httpexceptions.py", line 640, in __call__
    return self.application(environ, start_response)
  File "/builddir/build/BUILD/python3-python-paste-2.0.3-5.fc29/paste/auth/digest.py", line 222, in __call__
    result = self.authenticate(environ)
  File "/builddir/build/BUILD/python3-python-paste-2.0.3-5.fc29/paste/auth/digest.py", line 144, in authenticate
    amap = dict(_auth_to_kv_pairs(auth))
  File "/builddir/build/BUILD/python3-python-paste-2.0.3-5.fc29/paste/auth/digest.py", line 64, in _auth_to_kv_pairs
    for item in _split_auth_string(auth_string):
RuntimeError: generator raised StopIteration
----------------------------------------------------------------------
Ran 137 tests in 0.747s
FAILED (errors=1)

This has been changed in 3.7: seek for PEP 479 in https://docs.python.org/3.7/whatsnew/3.7.html#changes-in-python-behavior


Version-Release number of selected component (if applicable): 2.0.3-5.fc29

Logs attached.

Comment 1 Miro Hrončok 2018-05-29 18:58:59 UTC
Created attachment 1445509 [details]
root.log from copr

Comment 2 Miro Hrončok 2018-05-29 19:03:04 UTC
Assigning to Randy, because I don't believe Luke would respond.

Similar fix from other project:

https://github.com/erikrose/more-itertools/commit/e38574428c952b143fc4e0e42cb99b242c7b7977

Comment 3 Petr Viktorin (pviktori) 2018-05-30 07:09:53 UTC
Complete documentation for the change is in [PEP 479].

[PEP 479]: https://www.python.org/dev/peps/pep-0479/


> When StopIteration is raised inside a generator, it is replaced it with RuntimeError. (More precisely, this happens when the exception is about to bubble out of the generator's stack frame.)

Comment 4 Miro Hrončok 2018-06-04 13:10:00 UTC
Randy?

Comment 5 Miro Hrončok 2018-06-08 10:43:27 UTC
Randy, 3.7.0c1 is expected in 3 days (2018-06-11, [1]). I'd like to start building stuff in a side tag soon after that.

This blocks the "packager stack", hence a bit critical. Could you please respond?


[1] https://www.python.org/dev/peps/pep-0537/

Comment 6 Miro Hrončok 2018-06-08 16:40:00 UTC
This blocks webtest and pyramid.

Comment 9 Randy Barlow 2018-06-11 14:28:00 UTC
Hi Miro,

I apologize for not responding quickly. I didn't realize it was blocking the packaging stack, and I also have about 3-4x the workload I can handle at the moment :/

Comment 10 Miro Hrončok 2018-06-11 14:47:14 UTC
Randy, don't worry. I know the feeling, that's why I went ahead and did this myself.

Comment 11 Randy Barlow 2018-06-11 17:47:13 UTC
(In reply to Miro Hrončok from comment #10)
> Randy, don't worry. I know the feeling, that's why I went ahead and did this
> myself.

Thanks so much for taking care of that for me. Collaboration for the win!