zopefoundation / ZODB

Python object-oriented database
https://zodb-docs.readthedocs.io/
Other
683 stars 92 forks source link

5.7.0: pytest warning and ZODB/tests should not be installed #364

Closed kloczek closed 8 months ago

kloczek commented 2 years ago

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.

Here is pytest output:

```console + 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.

kloczek commented 2 years ago

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
kloczek commented 2 years ago

And not installing ZODB/tests doid not fix that warning.

icemac commented 2 years ago

Use zope.testrunner to run the tests.

kloczek commented 8 months ago

BTW would you accept PR dropping six and python<=3.7 support? 🤔

dataflake commented 8 months ago

Requests to drop Python 3.7 support will have to wait until Zope itself drops it.

kloczek commented 8 months ago

What about drop use six? 🤔

dataflake commented 8 months ago

Feel free to create a PR. Have you signed the contributor agreement? -> https://www.zope.dev/developer/becoming-a-committer.html

icemac commented 8 months ago

Searching for six in ZODB does not show any hits regarding that library: https://github.com/search?q=repo%3Azopefoundation%2FZODB%20six&type=code

kloczek commented 8 months ago

Searching for six in 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? 🤔

icemac commented 8 months ago

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.

dataflake commented 8 months ago

ZODB 6.0 is now released.

kloczek commented 8 months ago

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).

dataflake commented 8 months ago

No. See my previous comment.