I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix> using 'installer` module
run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")
Here is pytest output:
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.25-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-bottle-0.12.25-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/bottle-0.12.25
collected 325 items
test/test_auth.py . [ 0%]
test/test_config.py ..... [ 1%]
test/test_configdict.py ....... [ 4%]
test/test_contextlocals.py .. [ 4%]
test/test_environ.py ..................................................................... [ 25%]
test/test_fileupload.py ......... [ 28%]
test/test_formsdict.py .... [ 29%]
test/test_importhook.py ..... [ 31%]
test/test_jinja2.py .......... [ 34%]
test/test_mdict.py .... [ 35%]
test/test_mount.py ......... [ 38%]
test/test_outputfilter.py ........................ [ 45%]
test/test_plugins.py ................... [ 51%]
test/test_resources.py ........ [ 54%]
test/test_route.py . [ 54%]
test/test_router.py ................................ [ 64%]
test/test_securecookies.py .... [ 65%]
test/test_sendfile.py ........... [ 68%]
test/test_server.py ............. [ 72%]
test/test_stpl.py ...................................................... [ 89%]
test/test_wsgi.py .................................. [100%]
===================================================================================== warnings summary ======================================================================================
test/test_server.py:53
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_server.py:53: SyntaxWarning: "is" with a literal. Did you mean "=="?
if rv is 128: # Import error
test/test_server.py:57
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_server.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
if rv is 3: # Port in use
test/test_configdict.py::TestConfigDict::test_attr_access
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:30: DeprecationWarning: Attribute assignment is deprecated.
c.test = 5
test/test_configdict.py::TestConfigDict::test_attr_access
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:31: DeprecationWarning: Attribute access is deprecated.
self.assertEqual(5, c.test)
test/test_configdict.py::TestConfigDict::test_attr_access
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:34: DeprecationWarning: Attribute access is deprecated.
self.assertEqual(6, c.test)
test/test_configdict.py::TestConfigDict::test_attr_access
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:38: DeprecationWarning: Attribute access is deprecated.
self.assertEqual(None, c.test)
test/test_configdict.py::TestConfigDict::test_call
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:61: DeprecationWarning: Calling ConfDict is deprecated. Use the update() method.
self.assertEqual(c, c(a=1))
test/test_configdict.py::TestConfigDict::test_call
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:63: DeprecationWarning: Attribute access is deprecated.
self.assertEqual(1, c.a)
test/test_configdict.py::TestConfigDict::test_isadict
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:12: DeprecationWarning: Constructor does no longer accept parameters.
d, m = dict(a=5), ConfigDict(a=5)
test/test_configdict.py::TestConfigDict::test_issue588
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:70: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"]
self.assertEqual('c', c['a']['b'])
test/test_configdict.py::TestConfigDict::test_issue588
/usr/lib64/python3.8/_collections_abc.py:744: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"]
yield (key, self._mapping[key])
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:43: DeprecationWarning: Attribute access is deprecated.
self.assertEqual(ConfigDict.Namespace, c.Name.Space.__class__)
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
/usr/lib64/python3.8/_collections_abc.py:660: DeprecationWarning: Accessing namespaces as dicts is discouraged. Only use flat item access: cfg["names"]["pace"]["key"] -> cfg["name.space.key"]
return self[key]
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:44: DeprecationWarning: Attribute access is deprecated.
c.Name.Space.value = 5
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:44: DeprecationWarning: Attribute assignment is deprecated.
c.Name.Space.value = 5
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:45: DeprecationWarning: Attribute access is deprecated.
self.assertEqual(5, c.Name.Space.value)
test/test_configdict.py::TestConfigDict::test_namespaces
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:46: DeprecationWarning: Attribute access is deprecated.
self.assertTrue('value' in c.Name.Space)
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:47: DeprecationWarning: Attribute access is deprecated.
self.assertTrue('Space' in c.Name)
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:51: DeprecationWarning: Attribute assignment is deprecated.
self.assertRaises(AttributeError, lambda: setattr(c, 'Name', 5))
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:53: DeprecationWarning: Attribute assignment is deprecated.
self.assertRaises(AttributeError, lambda: setattr(c, 'keys', 5))
test/test_configdict.py::TestConfigDict::test_namespaces
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/test/test_configdict.py:56: DeprecationWarning: Attribute access is deprecated.
self.assertEqual(5, c.Name)
test/test_jinja2.py::TestJinja2Template::test_file
test/test_jinja2.py::TestJinja2Template::test_notfound
test/test_stpl.py::TestSimpleTemplate::test_file
test/test_stpl.py::TestSimpleTemplate::test_notfound
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:3268: DeprecationWarning: The template lookup path list should not be empty.
self.filename = self.search(self.name, self.lookup)
test/test_jinja2.py::TestJinja2Template::test_file
test/test_stpl.py::TestSimpleTemplate::test_file
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:3268: DeprecationWarning: Absolute template path names are deprecated.
self.filename = self.search(self.name, self.lookup)
test/test_jinja2.py::TestJinja2Template::test_file
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:3383: DeprecationWarning: The template lookup path list should not be empty.
fname = self.search(name, self.lookup)
test/test_jinja2.py::TestJinja2Template::test_file
test/test_jinja2.py::TestJinja2Template::test_inherit
test/test_jinja2.py::TestJinja2Template::test_name
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:3383: DeprecationWarning: Absolute template path names are deprecated.
fname = self.search(name, self.lookup)
test/test_plugins.py: 15 warnings
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:539: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly.
context = self if api > 1 else self._context
test/test_router.py::TestRouter::testFloatFilter
test/test_router.py::TestRouterInCGIMode::testFloatFilter
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:392: RuntimeWarning: Route > overwrites a previously defined route
warnings.warn(msg % (method, rule), RuntimeWarning)
test/test_router.py::TestRouter::testParentheses
test/test_router.py::TestRouterInCGIMode::testParentheses
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:392: RuntimeWarning: Route overwrites a previously defined route
warnings.warn(msg % (method, rule), RuntimeWarning)
test/test_stpl.py::TestSimpleTemplate::test_coding_stress
test/test_stpl.py::TestSimpleTemplate::test_detect_pep263
test/test_stpl.py::TestSimpleTemplate::test_detect_pep263
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:3622: DeprecationWarning: PEP263 encoding strings in templates are deprecated.
line, comment = self.fix_backward_compatibility(line, comment)
test/test_stpl.py::TestSimpleTemplate::test_detect_pep263
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:201: DeprecationWarning: Template encodings other than utf8 are no longer supported.
value = obj.__dict__[self.func.__name__] = self.func(obj)
test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines
test/test_stpl.py::TestSimpleTemplate::test_escaped_codelines
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:3416: DeprecationWarning: Escape code lines with a backslash.
code = parser.translate()
test/test_stpl.py: 7 warnings
test/test_wsgi.py: 8 warnings
/home/tkloczko/rpmbuild/BUILD/bottle-0.12.25/bottle.py:3622: DeprecationWarning: The include and rebase keywords are functions now.
line, comment = self.fix_backward_compatibility(line, comment)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================= 325 passed, 80 warnings in 3.11s ==============================================================================
```
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
Here is list of installed modules in build env