Pytype 2022.01.07 only supports 3.7+.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
I guess this stack can go on stable. There are a few other things that get flagged that I worked around for now by disabling the modules (hgweb/__init__.py, subrepo.py, and url.py), and it would be nice to just upgrade the CI image to one thing that makes both branches happy.
Comment Actions
Is there something to be done in the CI images? We're about to change them anyway due to D12368 needing a new version of black.
Comment Actions
Updating to a new version of pytype would be a good idea then. I think what's there is ~a year old. Before doing that, we'll either need to apply this patch or fix the underlying issues:
diff --git a/tests/test-check-pytype.t b/tests/test-check-pytype.t --- a/tests/test-check-pytype.t +++ b/tests/test-check-pytype.t @@ -45,6 +45,7 @@ development, but may be a hinderance for > -x mercurial/debugcommands.py \ > -x mercurial/dispatch.py \ > -x mercurial/exchange.py \ + > -x mercurial/hgweb/__init__.py \ > -x mercurial/hgweb/hgweb_mod.py \ > -x mercurial/hgweb/server.py \ > -x mercurial/hgweb/wsgicgi.py \ @@ -57,10 +58,12 @@ development, but may be a hinderance for > -x mercurial/pure/osutil.py \ > -x mercurial/pure/parsers.py \ > -x mercurial/repoview.py \ + > -x mercurial/subrepo.py \ > -x mercurial/testing/storage.py \ > -x mercurial/thirdparty \ > -x mercurial/ui.py \ > -x mercurial/unionrepo.py \ + > -x mercurial/url.py \ > -x mercurial/win32.py \ > -x mercurial/wireprotoframing.py \ > -x mercurial/wireprotov1peer.py \
The url module may have some real issues, but the other two almost look like internal errors:
+ /usr/bin/python3.8 -m pytype.single --imports_info /mnt/c/Users/Matt/hg/.pytype/imports/mercurial.hgweb.__init__.imports --module-name mercurial.hgweb.__init__ -V 3.7 -o /mnt/c/Users/Matt/hg/.pytype/pyi/mercurial/hgweb/__init__.pyi --analyze-annotated --nofail --quick /mnt/c/Users/Matt/hg/mercurial/hgweb/__init__.py + File "/mnt/c/Users/Matt/hg/mercurial/hgweb/__init__.py", line 21, in <module>: Couldn't import pyi for 'mercurial.hgweb.hgweb_mod' [pyi-error] + No request in module mercurial.hgweb, referenced from 'mercurial.hgweb.hgweb_mod' + File "/mnt/c/Users/Matt/hg/mercurial/hgweb/__init__.py", line 21, in <module>: Couldn't import pyi for 'mercurial.hgweb.hgwebdir_mod' [pyi-error] + No request in module mercurial.hgweb, referenced from 'mercurial.hgweb.hgwebdir_mod' + /usr/bin/python3.8 -m pytype.single --imports_info /mnt/c/Users/Matt/hg/.pytype/imports/mercurial.subrepo.imports --module-name mercurial.subrepo -V 3.7 -o /mnt/c/Users/Matt/hg/.pytype/pyi/mercurial/subrepo.pyi --analyze-annotated --nofail --quick /mnt/c/Users/Matt/hg/mercurial/subrepo.py + File "/mnt/c/Users/Matt/hg/mercurial/subrepo.py", line 1153, in _wcrevs: Couldn't import pyi for 'xml.dom.minidom' [pyi-error] + No Node.TEXT_NODE in module xml.dom.minidom, referenced from 'xml.dom.expatbuilder' + File "/mnt/c/Users/Matt/hg/mercurial/subrepo.py", line 1177, in _wcchanged: Couldn't import pyi for 'xml.dom.minidom' [pyi-error] + No Node.TEXT_NODE in module xml.dom.minidom, referenced from 'xml.dom.expatbuilder' + File "/mnt/c/Users/Matt/hg/mercurial/subrepo.py", line 1322, in files: Couldn't import pyi for 'xml.dom.minidom' [pyi-error] + No Node.TEXT_NODE in module xml.dom.minidom, referenced from 'xml.dom.expatbuilder'