annotate dev_requirements.txt @ 7846:d68b77e4e4ab

tg2: move routing mapper initialization from RootController class definition time to instantiation time Things happened to work before, despite unfortunate code executation at import time. TurboGears 2.4 changed something, so actual serving works, but pytest fails with: collecting ... ... data/env/lib/python2.7/site-packages/_pytest/config/__init__.py:463: in _importconftest raise ConftestImportFailure(conftestpath, sys.exc_info()) E ConftestImportFailure: (local('.../kallithea/tests/conftest.py'), (<type 'exceptions.KeyError'>, KeyError('paths',), <traceback object at 0x7fb6679030e0>)) or more useful, if raising the real exception instead of obfuscating with ConftestImportFailure: ... kallithea/tests/conftest.py:15: in <module> from kallithea.controllers.root import RootController kallithea/controllers/root.py:29: in <module> class RootController(RoutedController, BaseController): kallithea/controllers/root.py:31: in RootController mapper = make_map(config) kallithea/config/routing.py:32: in make_map rmap = Mapper(directory=config['paths']['controllers'], data/env/lib/python2.7/site-packages/tg/configuration/tgconfig.py:28: in __getitem__ return self.config_proxy.current_conf()[key] E KeyError: 'paths' _importconftest <_pytest.config.PytestPluginManager object at 0x7f20c770a3d0> .../conftest.py In this example, in RootController, the global config object is at this time just: {'debug': False, 'package': None, 'i18n.lang': None, 'tg.strict_tmpl_context': True, 'tg.app_globals': None} Solved by moving the mapper initialization to __init__.
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 28 Aug 2019 12:07:37 +0200
parents 5698307382de
children 4dad662fe6fd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7735
50b376bcdcda setup: bump py.test version
Mads Kiilerich <mads@kiilerich.com>
parents: 7611
diff changeset
1 pytest >= 3.3.0, < 4.7
7741
3330ffb6326a setup: bump some dev_requirements.txt versions
Mads Kiilerich <mads@kiilerich.com>
parents: 7735
diff changeset
2 pytest-runner < 5.2
7372
55fc0bcce916 setup: bump all upper pip dependency versions to minor updates of what currently is available and testable on pypi
Mads Kiilerich <mads@kiilerich.com>
parents: 7347
diff changeset
3 pytest-sugar >= 0.7.0, < 0.10
7735
50b376bcdcda setup: bump py.test version
Mads Kiilerich <mads@kiilerich.com>
parents: 7611
diff changeset
4 pytest-benchmark < 3.3
7741
3330ffb6326a setup: bump some dev_requirements.txt versions
Mads Kiilerich <mads@kiilerich.com>
parents: 7735
diff changeset
5 pytest-localserver < 0.6
3330ffb6326a setup: bump some dev_requirements.txt versions
Mads Kiilerich <mads@kiilerich.com>
parents: 7735
diff changeset
6 mock < 3.1
3330ffb6326a setup: bump some dev_requirements.txt versions
Mads Kiilerich <mads@kiilerich.com>
parents: 7735
diff changeset
7 Sphinx < 1.9
7372
55fc0bcce916 setup: bump all upper pip dependency versions to minor updates of what currently is available and testable on pypi
Mads Kiilerich <mads@kiilerich.com>
parents: 7347
diff changeset
8 WebTest < 2.1
7810
5698307382de scripts: introduce import cleanup using isort
Mads Kiilerich <mads@kiilerich.com>
parents: 7741
diff changeset
9 isort == 4.3.21