Patchwork py3: split check of pygments-using files from the rest of the tree

login
register
mail settings
Submitter Augie Fackler
Date Aug. 30, 2016, 5:34 p.m.
Message ID <3f0a2fc501f04fb5c80a.1472578440@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/16486/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 30, 2016, 5:34 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1472578428 14400
#      Tue Aug 30 13:33:48 2016 -0400
# Node ID 3f0a2fc501f04fb5c80a79943b4ff3846d3d3f75
# Parent  4e6fc4921eca722aa5c7967408d93ca3c59b1593
py3: split check of pygments-using files from the rest of the tree

If we don't do this, people without pygments installed in their Python
3 environment silently stop checking test-check-py3-compat, which
isn't really what we wanted. This preserves stability of the test
output while still letting anyone with a recent-enough Python 3 run
the majority of the Python 3 compat checking test.
Yuya Nishihara - Aug. 31, 2016, 1 p.m.
On Tue, 30 Aug 2016 13:34:00 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1472578428 14400
> #      Tue Aug 30 13:33:48 2016 -0400
> # Node ID 3f0a2fc501f04fb5c80a79943b4ff3846d3d3f75
> # Parent  4e6fc4921eca722aa5c7967408d93ca3c59b1593
> py3: split check of pygments-using files from the rest of the tree
> 
> If we don't do this, people without pygments installed in their Python
> 3 environment silently stop checking test-check-py3-compat, which
> isn't really what we wanted. This preserves stability of the test
> output while still letting anyone with a recent-enough Python 3 run
> the majority of the Python 3 compat checking test.

Nice. Queued, thanks.

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
@@ -12,8 +12,8 @@ 
   setup.py not using absolute_import
   tests/test-demandimport.py not using absolute_import
 
-#if py3exe py3pygments
-  $ hg files 'set:(**.py)' | sed 's|\\|/|g' \
+#if py3exe
+  $ hg files 'set:(**.py) - grep(pygments)' | sed 's|\\|/|g' \
   > | xargs $PYTHON3 contrib/check-py3-compat.py \
   > | sed 's/[0-9][0-9]*)$/*)/'
   doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *)
@@ -50,7 +50,6 @@ 
   hgext/gpg.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/graphlog.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/hgk.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
-  hgext/highlight/highlight.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/histedit.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/journal.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/keyword.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
@@ -172,3 +171,10 @@ 
   mercurial/wireproto.py: error importing module: <TypeError> unorderable types: str() >= tuple() (line *)
 
 #endif
+
+#if py3exe py3pygments
+  $ hg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
+  > | xargs $PYTHON3 contrib/check-py3-compat.py \
+  > | sed 's/[0-9][0-9]*)$/*)/'
+  hgext/highlight/highlight.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
+#endif