D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread mjpieters (Martijn Pieters)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8cf459d8b111: py3: use py3 as the test tag, dropping the k 
(authored by mjpieters, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5079?vs=12091=12093

REVISION DETAIL
  https://phab.mercurial-scm.org/D5079

AFFECTED FILES
  mercurial/help.py
  tests/hghave.py
  tests/run-tests.py
  tests/test-archive.t
  tests/test-bad-extension.t
  tests/test-check-py3-compat.t
  tests/test-debugcommands.t
  tests/test-extension.t
  tests/test-globalopts.t

CHANGE DETAILS

diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -267,7 +267,7 @@
 #if no-chg
   $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
   Traceback (most recent call last):
-  Traceback (most recent call last): (py3k !)
+  Traceback (most recent call last): (py3 !)
 #else
 Traceback for '--config' errors not supported with chg.
   $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -222,7 +222,7 @@
   ambigabs.s=libroot/ambig.py
   $TESTTMP/a
 
-#if no-py3k
+#if no-py3
   $ cat > $TESTTMP/libroot/mod/ambigrel.py < from __future__ import print_function
   > import ambig # should load "libroot/mod/ambig.py"
@@ -290,7 +290,7 @@
   (extroot) import extroot.bar in func(): this is extroot.bar
   $TESTTMP/a
 
-#if no-py3k
+#if no-py3
   $ rm "$TESTTMP"/extroot/foo.*
   $ rm -Rf "$TESTTMP/extroot/__pycache__"
   $ cat > $TESTTMP/extroot/foo.py < -X hgdemandimport/demandimportpy2.py \
   > -X mercurial/thirdparty/cbor \
@@ -24,7 +24,7 @@
   setup.py not using absolute_import
 #endif
 
-#if py3k
+#if py3
   $ testrepohg files 'set:(**.py) - grep(pygments)' \
   > -X hgdemandimport/demandimportpy2.py \
   > -X hgext/fsmonitor/pywatchman \
@@ -41,7 +41,7 @@
   mercurial/scmposix.py: error importing:  No module 
named 'fcntl' (error at scmposix.py:*) (windows !)
 #endif
 
-#if py3k pygments
+#if py3 pygments
   $ testrepohg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
   > | xargs "$PYTHON" contrib/check-py3-compat.py \
   > | sed 's/[0-9][0-9]*)$/*)/'
diff --git a/tests/test-bad-extension.t b/tests/test-bad-extension.t
--- a/tests/test-bad-extension.t
+++ b/tests/test-bad-extension.t
@@ -57,12 +57,12 @@
   Exception: bit bucket overflow
   *** failed to import extension badext2: No module named *badext2* (glob)
   Traceback (most recent call last):
-  ImportError: No module named badext2 (no-py3k !)
-  ModuleNotFoundError: No module named 'hgext.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'badext2' (py3k !)
+  ImportError: No module named badext2 (no-py3 !)
+  ModuleNotFoundError: No module named 'hgext.badext2' (py3 !)
+  Traceback (most recent call last): (py3 !)
+  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3 !)
+  Traceback (most recent call last): (py3 !)
+  ModuleNotFoundError: No module named 'badext2' (py3 !)
 
 names of extensions failed to load can be accessed via extensions.notloaded()
 
@@ -102,22 +102,22 @@
   debug.extensions:   - loading extension: 'badext2'
   debug.extensions: - could not import hgext.badext2 (No module named 
*badext2*): trying hgext3rd.badext2 (glob)
   Traceback (most recent call last):
-  ImportError: No module named badext2 (no-py3k !)
-  ModuleNotFoundError: No module named 'hgext.badext2' (py3k !)
+  ImportError: No module named badext2 (no-py3 !)
+  ModuleNotFoundError: No module named 'hgext.badext2' (py3 !)
   debug.extensions: - could not import hgext3rd.badext2 (No module named 
*badext2*): trying badext2 (glob)
   Traceback (most recent call last):
-  ImportError: No module named badext2 (no-py3k !)
-  ModuleNotFoundError: No module named 'hgext.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3k !)
+  ImportError: No module named badext2 (no-py3 !)
+  ModuleNotFoundError: No module named 'hgext.badext2' (py3 !)
+  Traceback (most recent call last): (py3 !)
+  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3 !)
   *** failed to import extension badext2: No module named *badext2* (glob)
   Traceback (most recent call last):
-  ModuleNotFoundError: No module named 'hgext.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'badext2' (py3k !)
-  ImportError: No module named badext2 (no-py3k !)
+  ModuleNotFoundError: No module named 'hgext.badext2' (py3 !)
+  Traceback (most recent call 

D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters added a comment.


  Note: I undid the change to `mercurial/thirdparty/zope/interface/_compat.py` 
as it should not have been changed to begin with.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5079

To: mjpieters, #hg-reviewers, pulkit, durin42
Cc: durin42, pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters updated this revision to Diff 12091.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5079?vs=12068=12091

REVISION DETAIL
  https://phab.mercurial-scm.org/D5079

AFFECTED FILES
  mercurial/help.py
  tests/hghave.py
  tests/run-tests.py
  tests/test-archive.t
  tests/test-bad-extension.t
  tests/test-check-py3-compat.t
  tests/test-debugcommands.t
  tests/test-extension.t
  tests/test-globalopts.t

CHANGE DETAILS

diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -267,7 +267,7 @@
 #if no-chg
   $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
   Traceback (most recent call last):
-  Traceback (most recent call last): (py3k !)
+  Traceback (most recent call last): (py3 !)
 #else
 Traceback for '--config' errors not supported with chg.
   $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -222,7 +222,7 @@
   ambigabs.s=libroot/ambig.py
   $TESTTMP/a
 
-#if no-py3k
+#if no-py3
   $ cat > $TESTTMP/libroot/mod/ambigrel.py < from __future__ import print_function
   > import ambig # should load "libroot/mod/ambig.py"
@@ -290,7 +290,7 @@
   (extroot) import extroot.bar in func(): this is extroot.bar
   $TESTTMP/a
 
-#if no-py3k
+#if no-py3
   $ rm "$TESTTMP"/extroot/foo.*
   $ rm -Rf "$TESTTMP/extroot/__pycache__"
   $ cat > $TESTTMP/extroot/foo.py < -X hgdemandimport/demandimportpy2.py \
   > -X mercurial/thirdparty/cbor \
@@ -24,7 +24,7 @@
   setup.py not using absolute_import
 #endif
 
-#if py3k
+#if py3
   $ testrepohg files 'set:(**.py) - grep(pygments)' \
   > -X hgdemandimport/demandimportpy2.py \
   > -X hgext/fsmonitor/pywatchman \
@@ -41,7 +41,7 @@
   mercurial/scmposix.py: error importing:  No module 
named 'fcntl' (error at scmposix.py:*) (windows !)
 #endif
 
-#if py3k pygments
+#if py3 pygments
   $ testrepohg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
   > | xargs "$PYTHON" contrib/check-py3-compat.py \
   > | sed 's/[0-9][0-9]*)$/*)/'
diff --git a/tests/test-bad-extension.t b/tests/test-bad-extension.t
--- a/tests/test-bad-extension.t
+++ b/tests/test-bad-extension.t
@@ -57,12 +57,12 @@
   Exception: bit bucket overflow
   *** failed to import extension badext2: No module named *badext2* (glob)
   Traceback (most recent call last):
-  ImportError: No module named badext2 (no-py3k !)
-  ModuleNotFoundError: No module named 'hgext.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'badext2' (py3k !)
+  ImportError: No module named badext2 (no-py3 !)
+  ModuleNotFoundError: No module named 'hgext.badext2' (py3 !)
+  Traceback (most recent call last): (py3 !)
+  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3 !)
+  Traceback (most recent call last): (py3 !)
+  ModuleNotFoundError: No module named 'badext2' (py3 !)
 
 names of extensions failed to load can be accessed via extensions.notloaded()
 
@@ -102,22 +102,22 @@
   debug.extensions:   - loading extension: 'badext2'
   debug.extensions: - could not import hgext.badext2 (No module named 
*badext2*): trying hgext3rd.badext2 (glob)
   Traceback (most recent call last):
-  ImportError: No module named badext2 (no-py3k !)
-  ModuleNotFoundError: No module named 'hgext.badext2' (py3k !)
+  ImportError: No module named badext2 (no-py3 !)
+  ModuleNotFoundError: No module named 'hgext.badext2' (py3 !)
   debug.extensions: - could not import hgext3rd.badext2 (No module named 
*badext2*): trying badext2 (glob)
   Traceback (most recent call last):
-  ImportError: No module named badext2 (no-py3k !)
-  ModuleNotFoundError: No module named 'hgext.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3k !)
+  ImportError: No module named badext2 (no-py3 !)
+  ModuleNotFoundError: No module named 'hgext.badext2' (py3 !)
+  Traceback (most recent call last): (py3 !)
+  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3 !)
   *** failed to import extension badext2: No module named *badext2* (glob)
   Traceback (most recent call last):
-  ModuleNotFoundError: No module named 'hgext.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3k !)
-  Traceback (most recent call last): (py3k !)
-  ModuleNotFoundError: No module named 'badext2' (py3k !)
-  ImportError: No module named badext2 (no-py3k !)
+  ModuleNotFoundError: No module named 'hgext.badext2' (py3 !)
+  Traceback (most recent call last): (py3 !)
+  ModuleNotFoundError: No module named 'hgext3rd.badext2' (py3 !)
+  Traceback (most recent call last): (py3 !)
+  

D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread durin42 (Augie Fackler)
durin42 requested changes to this revision.
durin42 added a comment.
This revision now requires changes to proceed.


  (Requesting changes per new instances of py3k in the tests since you wrote 
this - it's a heckuva treadmill right now.)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5079

To: mjpieters, #hg-reviewers, pulkit, durin42
Cc: durin42, pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  There are few more occurences of py3k if you rebase it on @, can you please 
have a look. :)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5079

To: mjpieters, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread pulkit (Pulkit Goyal)
pulkit accepted this revision.
pulkit added a comment.


  I feel priviliged to review my mentors patch and push it. :)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5079

To: mjpieters, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5079: py3: use py3 as the test tag, dropping the k

2018-10-13 Thread mjpieters (Martijn Pieters)
mjpieters created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5079

AFFECTED FILES
  mercurial/help.py
  mercurial/thirdparty/zope/interface/_compat.py
  tests/hghave.py
  tests/run-tests.py
  tests/test-check-py3-compat.t
  tests/test-debugcommands.t
  tests/test-extension.t
  tests/test-globalopts.t

CHANGE DETAILS

diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -267,7 +267,7 @@
 #if no-chg
   $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
   Traceback (most recent call last):
-  Traceback (most recent call last): (py3k !)
+  Traceback (most recent call last): (py3 !)
 #else
 Traceback for '--config' errors not supported with chg.
   $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -222,7 +222,7 @@
   ambigabs.s=libroot/ambig.py
   $TESTTMP/a
 
-#if no-py3k
+#if no-py3
   $ cat > $TESTTMP/libroot/mod/ambigrel.py < from __future__ import print_function
   > import ambig # should load "libroot/mod/ambig.py"
@@ -290,7 +290,7 @@
   (extroot) import extroot.bar in func(): this is extroot.bar
   $TESTTMP/a
 
-#if no-py3k
+#if no-py3
   $ rm "$TESTTMP"/extroot/foo.*
   $ rm -Rf "$TESTTMP/extroot/__pycache__"
   $ cat > $TESTTMP/extroot/foo.py < -X hgdemandimport/demandimportpy2.py \
   > -X mercurial/thirdparty/cbor \
@@ -24,7 +24,7 @@
   setup.py not using absolute_import
 #endif
 
-#if py3k
+#if py3
   $ testrepohg files 'set:(**.py) - grep(pygments)' \
   > -X hgdemandimport/demandimportpy2.py \
   > -X hgext/fsmonitor/pywatchman \
@@ -41,7 +41,7 @@
   mercurial/scmposix.py: error importing:  No module 
named 'fcntl' (error at scmposix.py:*) (windows !)
 #endif
 
-#if py3k pygments
+#if py3 pygments
   $ testrepohg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
   > | xargs "$PYTHON" contrib/check-py3-compat.py \
   > | sed 's/[0-9][0-9]*)$/*)/'
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -424,7 +424,7 @@
 help="prefer IPv6 to IPv4 for network related tests")
 hgconf.add_argument("--pure", action="store_true",
 help="use pure Python code instead of C extensions")
-hgconf.add_argument("-3", "--py3k-warnings", action="store_true",
+hgconf.add_argument("-3", "--py3-warnings", action="store_true",
 help="enable Py3k warnings on Python 2.7+")
 hgconf.add_argument("--with-chg", metavar="CHG",
 help="use specified chg wrapper in place of hg")
@@ -561,10 +561,10 @@
 'warning: --slowtimeout option ignored with --debug\n')
 options.timeout = 0
 options.slowtimeout = 0
-if options.py3k_warnings:
+if options.py3_warnings:
 if PYTHON3:
 parser.error(
-'--py3k-warnings can only be used on Python 2.7')
+'--py3-warnings can only be used on Python 2.7')
 
 if options.blacklist:
 options.blacklist = parselistfiles(options.blacklist, 'blacklist')
@@ -688,7 +688,7 @@
  first=False,
  timeout=None,
  startport=None, extraconfigopts=None,
- py3kwarnings=False, shell=None, hgcommand=None,
+ py3warnings=False, shell=None, hgcommand=None,
  slowtimeout=None, usechg=False,
  useipv6=False):
 """Create a test from parameters.
@@ -717,7 +717,7 @@
 must have the form "key=value" (something understood by hgrc). Values
 of the form "foo.key=value" will result in "[foo] key=value".
 
-py3kwarnings enables Py3k warnings.
+py3warnings enables Py3k warnings.
 
 shell is the shell to execute tests in.
 """
@@ -743,7 +743,7 @@
 self._slowtimeout = slowtimeout
 self._startport = startport
 self._extraconfigopts = extraconfigopts or []
-self._py3kwarnings = py3kwarnings
+self._py3warnings = py3warnings
 self._shell = _bytespath(shell)
 self._hgcommand = hgcommand or b'hg'
 self._usechg = usechg
@@ -1217,8 +1217,8 @@
 return os.path.join(self._testdir, b'%s.out' % self.bname)
 
 def _run(self, env):
-py3kswitch = self._py3kwarnings and b' -3' or b''
-cmd = b'"%s"%s "%s"' % (PYTHON, py3kswitch, self.path)
+py3switch = self._py3warnings and b' -3' or b''
+cmd = b'%s%s "%s"' % (PYTHON, py3switch, self.path)
 vlog("# Running", cmd)
 normalizenewlines = os.name == 'nt'
 result = self._runcommand(cmd, env,
@@ -2891,7 +2891,7 @@
 timeout=self.options.timeout,
 startport=self._getport(count),