Patchwork [2,of,4] test-check-py3-compat: exclude thirdparty and cffi which are known to fail

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 1, 2018, 1:55 a.m.
Message ID <1f867d70459c469dcd78.1535766940@mimosa>
Download mbox | patch
Permalink /patch/34226/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 1, 2018, 1:55 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1535764428 -32400
#      Sat Sep 01 10:13:48 2018 +0900
# Node ID 1f867d70459c469dcd78e214b6cda41e2f2873e7
# Parent  875e635c201c1d1cf1c3f8d511ed32b791e8c419
test-check-py3-compat: exclude thirdparty and cffi which are known to fail

Otherwise the following errors would be spilled out:

  mercurial/cffi/bdiff.py: error importing: <ImportError> cannot import
  name '_bdiff' (error at bdiff.py:*)
  mercurial/cffi/bdiffbuild.py: error importing: <ModuleNotFoundError> No
  module named 'cffi' (error at bdiffbuild.py:*)
  mercurial/cffi/mpatch.py: error importing: <ImportError> cannot import
  name '_mpatch' (error at mpatch.py:*)
  mercurial/cffi/mpatchbuild.py: error importing: <ModuleNotFoundError> No
  module named 'cffi' (error at mpatchbuild.py:*)
  mercurial/cffi/osutilbuild.py: error importing: <ModuleNotFoundError> No
  module named 'cffi' (error at osutilbuild.py:*)
  mercurial/thirdparty/concurrent/futures/_base.py: invalid syntax: invalid
  syntax (<unknown>, line *)
  mercurial/thirdparty/concurrent/futures/process.py: error importing:
  <SyntaxError> invalid syntax (_base.py, line 416) (error at __init__.py:*)
  mercurial/thirdparty/concurrent/futures/thread.py: error importing:
  <SyntaxError> invalid syntax (_base.py, line 416) (error at __init__.py:*)
  mercurial/thirdparty/zope/interface/_flatten.py: error importing:
  <ImportError> cannot import name 'Declaration' (error at _flatten.py:*)

Some of them can be suppressed by building cffi modules for example, but
I don't think it's worth keeping these modules covered by the compatibility
checker.

Patch

diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -26,7 +26,8 @@ 
   $ testrepohg files 'set:(**.py) - grep(pygments)' \
   > -X hgdemandimport/demandimportpy2.py \
   > -X hgext/fsmonitor/pywatchman \
-  > -X mercurial/thirdparty/cbor \
+  > -X mercurial/cffi \
+  > -X mercurial/thirdparty \
   > | sed 's|\\|/|g' | xargs python3 contrib/check-py3-compat.py \
   > | sed 's/[0-9][0-9]*)$/*)/'