tests/test-check-py3-compat.t
author Augie Fackler <augie@google.com>
Sat, 08 Oct 2016 08:36:39 -0400
changeset 30087 9b230a8e6008
parent 30085 2bde971474d2
child 30093 68010ed1636d
permissions -rw-r--r--
util: ensure forwarded attrs are set in globals() as sysstr Custom module importer strikes again.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27279
40eb385f798f tests: add test for Python 3 compatibility
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
#require test-repo
40eb385f798f tests: add test for Python 3 compatibility
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
29219
3c9066ed557c tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents: 29195
diff changeset
     3
  $ . "$TESTDIR/helpers-testrepo.sh"
27279
40eb385f798f tests: add test for Python 3 compatibility
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
  $ cd "$TESTDIR"/..
40eb385f798f tests: add test for Python 3 compatibility
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
27438
f121cf57ca9a tests: convert directory separators to '/' for MSYS in test-check-py-compat
Matt Harbison <matt_harbison@yahoo.com>
parents: 27361
diff changeset
     6
  $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
28432
2377c4ac4eec fsmonitor: dependencies for new experimental extension
Martijn Pieters <mjpieters@fb.com>
parents: 28417
diff changeset
     7
  hgext/fsmonitor/pywatchman/__init__.py not using absolute_import
2377c4ac4eec fsmonitor: dependencies for new experimental extension
Martijn Pieters <mjpieters@fb.com>
parents: 28417
diff changeset
     8
  hgext/fsmonitor/pywatchman/__init__.py requires print_function
2377c4ac4eec fsmonitor: dependencies for new experimental extension
Martijn Pieters <mjpieters@fb.com>
parents: 28417
diff changeset
     9
  hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import
2377c4ac4eec fsmonitor: dependencies for new experimental extension
Martijn Pieters <mjpieters@fb.com>
parents: 28417
diff changeset
    10
  hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
27279
40eb385f798f tests: add test for Python 3 compatibility
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    11
  i18n/check-translation.py not using absolute_import
40eb385f798f tests: add test for Python 3 compatibility
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    12
  setup.py not using absolute_import
40eb385f798f tests: add test for Python 3 compatibility
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    13
  tests/test-demandimport.py not using absolute_import
28583
260ce2eed951 tests: perform an ast parse with Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28564
diff changeset
    14
260ce2eed951 tests: perform an ast parse with Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28564
diff changeset
    15
#if py3exe
29886
e2c086f147ef py3: split check of pygments-using files from the rest of the tree
Augie Fackler <augie@google.com>
parents: 29810
diff changeset
    16
  $ hg files 'set:(**.py) - grep(pygments)' | sed 's|\\|/|g' \
29810
ceff91dea404 py3: automatically glob out line numbers from check-py3-compat output
Yuya Nishihara <yuya@tcha.org>
parents: 29809
diff changeset
    17
  > | xargs $PYTHON3 contrib/check-py3-compat.py \
ceff91dea404 py3: automatically glob out line numbers from check-py3-compat output
Yuya Nishihara <yuya@tcha.org>
parents: 29809
diff changeset
    18
  > | sed 's/[0-9][0-9]*)$/*)/'
30035
02328b5d775d py3: make i18n use encoding.environ
Yuya Nishihara <yuya@tcha.org>
parents: 30034
diff changeset
    19
  hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
30087
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    20
  hgext/convert/convcmd.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
30085
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    21
  hgext/convert/cvs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    22
  hgext/convert/darcs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
30035
02328b5d775d py3: make i18n use encoding.environ
Yuya Nishihara <yuya@tcha.org>
parents: 30034
diff changeset
    23
  hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
30085
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    24
  hgext/convert/git.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    25
  hgext/convert/gnuarch.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
30087
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    26
  hgext/convert/hg.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
30085
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    27
  hgext/convert/monotone.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    28
  hgext/convert/p4.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    29
  hgext/convert/subversion.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
29810
ceff91dea404 py3: automatically glob out line numbers from check-py3-compat output
Yuya Nishihara <yuya@tcha.org>
parents: 29809
diff changeset
    30
  hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *)
30085
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    31
  hgext/fsmonitor/watchmanclient.py: error importing module: <SystemError> Parent module 'hgext.fsmonitor' not loaded, cannot perform relative import (line *)
30087
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    32
  hgext/journal.py: error importing module: <SystemError> Parent module 'hgext' not loaded, cannot perform relative import (line *)
30085
2bde971474d2 i18n: make the locale directory name the same string type as the datapath
Augie Fackler <augie@google.com>
parents: 30077
diff changeset
    33
  hgext/largefiles/basestore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
30087
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    34
  hgext/largefiles/lfcommands.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
30035
02328b5d775d py3: make i18n use encoding.environ
Yuya Nishihara <yuya@tcha.org>
parents: 30034
diff changeset
    35
  hgext/largefiles/localstore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
30087
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    36
  hgext/largefiles/overrides.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    37
  hgext/largefiles/proto.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    38
  hgext/largefiles/remotestore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    39
  hgext/largefiles/reposetup.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    40
  hgext/largefiles/storefactory.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    41
  hgext/largefiles/uisetup.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
29810
ceff91dea404 py3: automatically glob out line numbers from check-py3-compat output
Yuya Nishihara <yuya@tcha.org>
parents: 29809
diff changeset
    42
  hgext/largefiles/wirestore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
30087
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    43
  hgext/mq.py: error importing: <TypeError> startswith first arg must be str or a tuple of str, not bytes (error at extensions.py:*)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    44
  hgext/rebase.py: error importing: <TypeError> Can't convert 'bytes' object to str implicitly (error at registrar.py:*)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    45
  hgext/record.py: error importing module: <KeyError> '^commit|ci' (line *)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    46
  hgext/shelve.py: error importing module: <SystemError> Parent module 'hgext' not loaded, cannot perform relative import (line *)
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    47
  hgext/transplant.py: error importing: <TypeError> Can't convert 'bytes' object to str implicitly (error at registrar.py:*)
30034
e4a6b439acc5 py3: provide encoding.environ which is a dict of bytes
Yuya Nishihara <yuya@tcha.org>
parents: 29890
diff changeset
    48
  mercurial/encoding.py: error importing module: <TypeError> bytes expected, not str (line *)
30087
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    49
  mercurial/fileset.py: error importing: <TypeError> Can't convert 'bytes' object to str implicitly (error at registrar.py:*)
30035
02328b5d775d py3: make i18n use encoding.environ
Yuya Nishihara <yuya@tcha.org>
parents: 30034
diff changeset
    50
  mercurial/i18n.py: error importing module: <TypeError> bytes expected, not str (line *)
30071
2def3d55b1b9 revset: build _syminitletters from a saner source: the string module
Augie Fackler <augie@google.com>
parents: 30057
diff changeset
    51
  mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *)
30054
8b89521a69ba util: use string.hexdigits instead of defining it ourselves
Augie Fackler <augie@google.com>
parents: 30053
diff changeset
    52
  mercurial/scmwindows.py: error importing module: <ImportError> No module named 'winreg' (line *)
30087
9b230a8e6008 util: ensure forwarded attrs are set in globals() as sysstr
Augie Fackler <augie@google.com>
parents: 30085
diff changeset
    53
  mercurial/store.py: error importing module: <TypeError> Can't convert 'bytes' object to str implicitly (line *)
29810
ceff91dea404 py3: automatically glob out line numbers from check-py3-compat output
Yuya Nishihara <yuya@tcha.org>
parents: 29809
diff changeset
    54
  mercurial/win32.py: error importing module: <ImportError> No module named 'msvcrt' (line *)
ceff91dea404 py3: automatically glob out line numbers from check-py3-compat output
Yuya Nishihara <yuya@tcha.org>
parents: 29809
diff changeset
    55
  mercurial/windows.py: error importing module: <ImportError> No module named 'msvcrt' (line *)
28583
260ce2eed951 tests: perform an ast parse with Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28564
diff changeset
    56
260ce2eed951 tests: perform an ast parse with Python 3
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28564
diff changeset
    57
#endif
29886
e2c086f147ef py3: split check of pygments-using files from the rest of the tree
Augie Fackler <augie@google.com>
parents: 29810
diff changeset
    58
e2c086f147ef py3: split check of pygments-using files from the rest of the tree
Augie Fackler <augie@google.com>
parents: 29810
diff changeset
    59
#if py3exe py3pygments
e2c086f147ef py3: split check of pygments-using files from the rest of the tree
Augie Fackler <augie@google.com>
parents: 29810
diff changeset
    60
  $ hg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
e2c086f147ef py3: split check of pygments-using files from the rest of the tree
Augie Fackler <augie@google.com>
parents: 29810
diff changeset
    61
  > | xargs $PYTHON3 contrib/check-py3-compat.py \
e2c086f147ef py3: split check of pygments-using files from the rest of the tree
Augie Fackler <augie@google.com>
parents: 29810
diff changeset
    62
  > | sed 's/[0-9][0-9]*)$/*)/'
e2c086f147ef py3: split check of pygments-using files from the rest of the tree
Augie Fackler <augie@google.com>
parents: 29810
diff changeset
    63
#endif