Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 7524766c6d8babf0220e2e35631c04c08f681f5a
https://github.com/tribe29/checkmk/commit/7524766c6d8babf0220e2e35631c04c08…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2020-04-07 (Tue, 07 Apr 2020)
Changed paths:
M cmk/gui/node_visualization.py
M cmk/gui/plugins/views/availability.py
Log Message:
-----------
Fix calls to not existing method html.request.get_text_input_mandatory
Change-Id: I02ca73a2e807b3aac7def47c6d662ade6e187a79
Commit: bb1fb2064bff46835b6c5321e83645d0c9c22aa4
https://github.com/tribe29/checkmk/commit/bb1fb2064bff46835b6c5321e83645d0c…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2020-04-07 (Tue, 07 Apr 2020)
Changed paths:
M cmk/gui/http.py
A tests-py3/typeshed/werkzeug/__init__.pyi
A tests-py3/typeshed/werkzeug/_compat.pyi
A tests-py3/typeshed/werkzeug/_internal.pyi
A tests-py3/typeshed/werkzeug/_reloader.pyi
A tests-py3/typeshed/werkzeug/contrib/__init__.pyi
A tests-py3/typeshed/werkzeug/contrib/atom.pyi
A tests-py3/typeshed/werkzeug/contrib/cache.pyi
A tests-py3/typeshed/werkzeug/contrib/fixers.pyi
A tests-py3/typeshed/werkzeug/contrib/iterio.pyi
A tests-py3/typeshed/werkzeug/contrib/jsrouting.pyi
A tests-py3/typeshed/werkzeug/contrib/limiter.pyi
A tests-py3/typeshed/werkzeug/contrib/lint.pyi
A tests-py3/typeshed/werkzeug/contrib/profiler.pyi
A tests-py3/typeshed/werkzeug/contrib/securecookie.pyi
A tests-py3/typeshed/werkzeug/contrib/sessions.pyi
A tests-py3/typeshed/werkzeug/contrib/testtools.pyi
A tests-py3/typeshed/werkzeug/contrib/wrappers.pyi
A tests-py3/typeshed/werkzeug/datastructures.pyi
A tests-py3/typeshed/werkzeug/debug/__init__.pyi
A tests-py3/typeshed/werkzeug/debug/console.pyi
A tests-py3/typeshed/werkzeug/debug/repr.pyi
A tests-py3/typeshed/werkzeug/debug/tbtools.pyi
A tests-py3/typeshed/werkzeug/exceptions.pyi
A tests-py3/typeshed/werkzeug/filesystem.pyi
A tests-py3/typeshed/werkzeug/formparser.pyi
A tests-py3/typeshed/werkzeug/http.pyi
A tests-py3/typeshed/werkzeug/local.pyi
A tests-py3/typeshed/werkzeug/middleware/__init__.pyi
A tests-py3/typeshed/werkzeug/middleware/dispatcher.pyi
A tests-py3/typeshed/werkzeug/middleware/http_proxy.pyi
A tests-py3/typeshed/werkzeug/middleware/lint.pyi
A tests-py3/typeshed/werkzeug/middleware/profiler.pyi
A tests-py3/typeshed/werkzeug/middleware/proxy_fix.pyi
A tests-py3/typeshed/werkzeug/middleware/shared_data.pyi
A tests-py3/typeshed/werkzeug/posixemulation.pyi
A tests-py3/typeshed/werkzeug/routing.pyi
A tests-py3/typeshed/werkzeug/script.pyi
A tests-py3/typeshed/werkzeug/security.pyi
A tests-py3/typeshed/werkzeug/serving.pyi
A tests-py3/typeshed/werkzeug/test.pyi
A tests-py3/typeshed/werkzeug/testapp.pyi
A tests-py3/typeshed/werkzeug/urls.pyi
A tests-py3/typeshed/werkzeug/useragents.pyi
A tests-py3/typeshed/werkzeug/utils.pyi
A tests-py3/typeshed/werkzeug/wrappers/__init__.pyi
A tests-py3/typeshed/werkzeug/wrappers/json.pyi
A tests-py3/typeshed/werkzeug/wsgi.pyi
Log Message:
-----------
First step to fix mypy checks for Request
The two ancestors json.JSONMixin and werkzeug.wrappers.Request
of cmk.gui.http.Request break mypy checking. For example access
to not existing members is not detected anymore.
This commit fixes the issue with the json.JSONMixin class. The
problem here is that the typesheds distributed with mypy, that
are normally available in our virtualenv
(lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/werkzeug/wrappers.pyi)
miss the typesheds for werkzeug.wrappers.json.
I tried hard to add partial typesheds for this single file to
tests-py3/typeshed, but did not find a working solution. If
you have a good solution, please let me know. I tried to make
use of the __getattr__ mechanic added in
https://github.com/python/mypy/pull/5231
and the PEP 561 "partial" feature.
The only working solution I came up with was copying the original
werkzeug typesheds and extending them. Sorry :/. At least it's
better than copying the werkzeug.wrappers.json implementation to
our code ;).
Change-Id: Ie2723ab286188faa67d4738c226462a162552421
Commit: e5064fa049024d02f8f37913a567330a6a2c8b63
https://github.com/tribe29/checkmk/commit/e5064fa049024d02f8f37913a567330a6…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2020-04-07 (Tue, 07 Apr 2020)
Changed paths:
M tests-py3/typeshed/werkzeug/wrappers/__init__.pyi
Log Message:
-----------
Second step to fix mypy checks for Request
A __setattr__ and __getattr__ in werkzeug.wrappers.BaseRequest
break the attr-defined check.
Change-Id: Ib45b8cd19912fcbe1de5c8f6ccc1b05f001bfb5f
See:
https://github.com/python/typeshed/issues/3913
Compare:
https://github.com/tribe29/checkmk/compare/7e799d4380b2...e5064fa04902