Summary: | dev-python/pycairo-1.17.0-r1 fails test with pypy3: "undefined symbol: PyOS_FSPath" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paolo Pedroni <paolo.pedroni> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | Keywords: | TESTFAILURE |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/pygobject/pycairo/commit/e616e810fc3317e0b91d0b8cef52875a112d4e39 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
pycairo-1.17.0-r1:20190408-101131.log.gz
pycairo-1.7.0-r1-dont-use-PyOS_FSPath-with-pypy3.6.patch pycairo-1.17.0-r1:20190408-103516.log.gz |
Description
Paolo Pedroni
2019-04-08 10:45:47 UTC
Created attachment 572224 [details, diff] pycairo-1.7.0-r1-dont-use-PyOS_FSPath-with-pypy3.6.patch Signed-off-by: Paolo Pedroni <paolo.pedroni@iol.it> Created attachment 572226 [details]
pycairo-1.17.0-r1:20190408-103516.log.gz
With the patch above tests build fine, but then one fails: ======================================================= test session starts ======================================================== platform linux -- Python 3.6.1[pypy-7.1.0-beta], pytest-3.10.1, py-1.5.4, pluggy-0.7.1 rootdir: /var/tmp/portage/dev-python/pycairo-1.17.0-r1/work/pycairo-1.17.0, inifile: plugins: virtualenv-1.2.11, shutil-1.2.11, hypothesis-3.59.1, flaky-3.1.1 collected 263 items / 3 skipped tests/test_api.py ...............s. [ 6%] tests/test_cmod.py . [ 6%] tests/test_context.py .......s.............................s.....................s...... [ 31%] tests/test_device.py ........... [ 36%] tests/test_enums.py s...... [ 38%] tests/test_error.py .... [ 40%] tests/test_font.py ...............s.s........... [ 51%] tests/test_glyph.py .. [ 52%] tests/test_hypothesis.py F.......... [ 56%] tests/test_matrix.py ........... [ 60%] tests/test_path.py .... [ 61%] tests/test_pattern.py .............................. [ 73%] tests/test_rectangle.py ... [ 74%] tests/test_region.py ........... [ 78%] tests/test_surface.py ......s..........................s................... [ 98%] tests/test_textcluster.py . [ 99%] tests/test_textextents.py .. [100%] ============================================================= FAILURES ============================================================= ___________________________________________________________ test_fspaths ___________________________________________________________ tempdir_path = '/var/tmp/portage/dev-python/pycairo-1.17.0-r1/temp/tmpfy1el2ay' path = <tests.hypothesis_fspaths._PathLike object at 0x00007f9a8aa6ce90> @given(path=fspaths()) @settings(max_examples=500) def test_fspaths(tempdir_path, path): p = _to_temp_path(tempdir_path, path) assert not os.listdir(tempdir_path) # filter out "." if os.path.exists(p): return if cairo_ver() >= (1, 15, 10): def path_encode(p): return p.encode("utf-8") else: def path_encode(p): new = temp.encode("mbcs") if new.decode("mbcs") != p: raise ValueError return new # cairo up to 1.15.8 uses fopen, which only supports ANSI paths under # Windows. 1.15.10+ uses utf-8 like glib. is_valid = True if os.name == "nt": temp = os.path.join(p) if isinstance(temp, type(b"")): if sys.version_info[0] == 3: temp = os.fsdecode(temp) else: temp = temp.decode(sys.getfilesystemencoding(), "strict") if isinstance(temp, type(u"")): try: path_encode(temp) except ValueError: is_valid = False surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 10, 10) try: > surface.write_to_png(p) E TypeError: Surface.write_to_png takes one argument which must be a filename, file object, or a file-like object which has a "write" method (like StringIO) tests/test_hypothesis.py:80: TypeError During handling of the above exception, another exception occurred: tempdir_path = '/var/tmp/portage/dev-python/pycairo-1.17.0-r1/temp/tmpfy1el2ay' @given(path=fspaths()) > @settings(max_examples=500) def test_fspaths(tempdir_path, path): tests/test_hypothesis.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/pypy3.6/site-packages/hypothesis/core.py:587: in execute result = self.test_runner(data, run) /usr/lib/pypy3.6/site-packages/hypothesis/executors.py:58: in default_new_style_executor return function(data) /usr/lib/pypy3.6/site-packages/hypothesis/core.py:578: in run return test(*args, **kwargs) tests/test_hypothesis.py:43: in test_fspaths @settings(max_examples=500) /usr/lib/pypy3.6/site-packages/hypothesis/core.py:525: in test result = self.test(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tempdir_path = '/var/tmp/portage/dev-python/pycairo-1.17.0-r1/temp/tmpfy1el2ay' path = <tests.hypothesis_fspaths._PathLike object at 0x00007f9a8aa6ce90> @given(path=fspaths()) @settings(max_examples=500) def test_fspaths(tempdir_path, path): p = _to_temp_path(tempdir_path, path) assert not os.listdir(tempdir_path) # filter out "." if os.path.exists(p): return if cairo_ver() >= (1, 15, 10): def path_encode(p): return p.encode("utf-8") else: def path_encode(p): new = temp.encode("mbcs") if new.decode("mbcs") != p: raise ValueError return new # cairo up to 1.15.8 uses fopen, which only supports ANSI paths under # Windows. 1.15.10+ uses utf-8 like glib. is_valid = True if os.name == "nt": temp = os.path.join(p) if isinstance(temp, type(b"")): if sys.version_info[0] == 3: temp = os.fsdecode(temp) else: temp = temp.decode(sys.getfilesystemencoding(), "strict") if isinstance(temp, type(u"")): try: path_encode(temp) except ValueError: is_valid = False surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 10, 10) try: surface.write_to_png(p) except (TypeError, ValueError): > assert not is_valid E assert not True tests/test_hypothesis.py:82: AssertionError ------------------------------------------------------------ Hypothesis ------------------------------------------------------------ Falsifying example: test_fspaths(tempdir_path='/var/tmp/portage/dev-python/pycairo-1.17.0-r1/temp/tmpfy1el2ay', path=<tests.hypothesis_fspaths._PathLike at 0x7f9a8aa6ce90>) You can reproduce this example by temporarily adding @reproduce_failure('3.59.1', b'AAAAAAABAAABAQ==') as a decorator on your test case ===Flaky Test Report=== ===End Flaky Test Report=== ======================================== 1 failed, 253 passed, 12 skipped in 11.34 seconds ========================================= |