ZODB
ZODB copied to clipboard
5.7.0: pytest warning and ZODB/tests should not be installed
I'm trying to package 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
buildwith--no-isolationI'm using during all processes only locally installed modules - install .whl file in </install/prefix>
- run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-zodb-5.7.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-zodb-5.7.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
==================================================================== test session starts =====================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/ZODB-5.7.0
collected 96 items
src/ZODB/scripts/tests/test_doc.py . [ 1%]
src/ZODB/scripts/tests/test_fsdump_fsstats.py .. [ 3%]
src/ZODB/scripts/tests/test_fstest.py .. [ 5%]
src/ZODB/scripts/tests/test_repozo.py ........................................................................ [ 80%]
src/ZODB/tests/testConnectionSavepoint.txt . [ 81%]
src/ZODB/tests/test_TransactionMetaData.py ....... [ 88%]
src/ZODB/tests/test_cache.py . [ 89%]
src/ZODB/tests/test_doctest_files.py . [ 90%]
src/ZODB/tests/test_fsdump.py . [ 91%]
src/ZODB/tests/test_mvccadapter.py ... [ 94%]
src/ZODB/tests/test_prefetch.py .... [ 98%]
src/ZODB/tests/test_storage.py . [100%]
====================================================================== warnings summary ======================================================================
src/ZODB/scripts/tests/test_fsdump_fsstats.py::FsdumpFsstatsTests::test_fsstats
/usr/lib64/python3.8/runpy.py:127: RuntimeWarning: 'ZODB.scripts.fsstats' found in sys.modules after import of package 'ZODB.scripts', but prior to execution of 'ZODB.scripts.fsstats'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================== 96 passed, 1 warning in 1.19s ================================================================
Also looks like ZODB/test/ content is installed. I think that this warning may be related to fact that ZODB/tests is installed.
Here is fix to not install ZODB/tests
--- a/MANIFEST.in~ 2022-03-17 09:29:00.000000000 +0000
+++ b/MANIFEST.in 2022-06-15 19:12:33.681993377 +0000
@@ -20,3 +20,4 @@
recursive-include src *.test
recursive-include src *.txt
recursive-include src *.xml
+recursive-exclude ZODB/tests
And not installing ZODB/tests doid not fix that warning.
Use zope.testrunner to run the tests.
BTW would you accept PR dropping six and python<=3.7 support? 🤔
Requests to drop Python 3.7 support will have to wait until Zope itself drops it.
What about drop use six? 🤔
Feel free to create a PR. Have you signed the contributor agreement? -> https://www.zope.dev/developer/becoming-a-committer.html
Searching for six in ZODB does not show any hits regarding that library: https://github.com/search?q=repo%3Azopefoundation%2FZODB%20six&type=code
Searching for
sixin ZODB does not show any hits regarding that library: https://github.com/search?q=repo%3Azopefoundation%2FZODB%20six&type=code
Because that part new version with already merged https://github.com/zopefoundation/ZODB/pull/386 still is not released. Is it possible to make such release? 🤔
No, it is currently not possible, see https://status.python.org/incidents/dc9zsqzrs0bv Trying to upload the release I got:
Response status code: 403
Reason: New uploads are temporarily disabled. See https://pypi.org/help/#admin-intervention for more information.
Sorry.
ZODB 6.0 is now released.
Thank you looks like new version is OK now 👍
BTW would accept PR which drops python<=3.7 support? 🤔 (3.7 has been EOSed in June 2023).
No. See my previous comment.