Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7, Windows: FAIL: with_outer_raising (pure_doctest__generators_py) #2454

Closed
matthew-brett opened this issue Jun 29, 2018 · 4 comments

Comments

@matthew-brett
Copy link
Contributor

A single test error when trying to generate Cython 0.28.3 Windows wheels for Python 3.7:

======================================================================
FAIL: with_outer_raising (pure_doctest__generators_py)
Doctest: pure_doctest__generators_py.with_outer_raising
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python37\lib\doctest.py", line 2198, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pure_doctest__generators_py.with_outer_raising
  File "C:\projects\cython-wheels\Cython\tests\run\generators_py.py", line 84, in with_outer_raising
----------------------------------------------------------------------
File "C:\projects\cython-wheels\Cython\tests\run\generators_py.py", line 87, in pure_doctest__generators_py.with_outer_raising
Failed example:
    list(x())
Exception raised:
    Traceback (most recent call last):
      File "C:\projects\cython-wheels\Cython\tests\run\generators_py.py", line 93, in generator
        raise StopIteration
    StopIteration
    The above exception was the direct cause of the following exception:
    Traceback (most recent call last):
      File "C:\Python37\lib\doctest.py", line 1329, in __run
        compileflags, 1), test.globs)
      File "<doctest pure_doctest__generators_py.with_outer_raising[1]>", line 1, in <module>
        list(x())
    RuntimeError: generator raised StopIteration

https://ci.appveyor.com/project/matthew-brett/cython-wheels/build/job/hw0umryi37mobb67#L18595

@matthew-brett
Copy link
Contributor Author

Sorry - goofed, was previously testing 0.27.3. But same errors for 0.28.3 : https://ci.appveyor.com/project/matthew-brett/cython-wheels/build/job/gmc5wc70ngfcqe83

@jrtc27
Copy link
Contributor

jrtc27 commented Jul 1, 2018

This affects any platform using Python 3.7 and is a result of PEP 479, which changes the default behaviour as of 3.7. Since the from itertools import allow_implicit_stop part of the proposal was rejected, I can't see a way to request the old behaviour, so I suggest this test is simply dropped.

@scoder
Copy link
Contributor

scoder commented Jul 3, 2018

I guess the quick-fix is really to ignore that error or remove the test.

However, since the test only fails in CPython and not in Cython, it's Cython that should follow CPython's behaviour here. (And the test should be fixed in that direction.)

@scoder scoder added this to the 0.29 milestone Jul 3, 2018
@scoder
Copy link
Contributor

scoder commented Aug 25, 2018

Test fixed here: eae3776
I created a follow-up ticket for the behavioural change: #2580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants