zopefoundation / transaction

Generic transaction implementation for Python.
Other
70 stars 31 forks source link

Fix deprecation warning #115

Closed hugovk closed 1 year ago

hugovk commented 1 year ago

Testing with Python 3.11 via tox -e py311 we get two deprecation warnings:

...
/private/tmp/transaction/src/transaction/tests/test_weakset.py:140: DeprecationWarning: unittest.makeSuite() is deprecated and will be removed in Python 3.13. Please use unittest.TestLoader.loadTestsFromTestCase() instead.
  return unittest.makeSuite(WeakSetTests)
Running tests at level 1
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
  Running:
/private/tmp/transaction/src/transaction/tests/test__manager.py:711: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  self.setDaemon(True)
...

https://github.com/zopefoundation/transaction/actions/runs/5037515550/jobs/9034409507#step:6:25

Let's fix them.

Also Python 3.12 is now in beta and it's time to start testing it:

We strongly encourage maintainers of third-party Python projects to test with 3.12 during the beta phase and report issues found to the Python bug tracker as soon as possible.

https://discuss.python.org/t/python-3-12-beta-1-and-feature-freeze-is-here/26982

jugmac00 commented 1 year ago

Hi @hugovk, Thanks for your contribution.

As we maintain > 100 repositories, we have developed a tool to update them programmatically, at least the configuration, such as tox.ini and CI settings.

The only drawback is that we have to apply that tool ( https://github.com/zopefoundation/meta/tree/master/config ) manually to all repositories, and it looks like this repository had not been updated for a couple of months.

Could you please remove your "test 3.12 beta" commit?

In case you want to give the tool a go, we are certainly happy to accept such a PR. If not, we are in the process of applying the tool to all repositories and test against 3.12 already - it just takes some time.

hugovk commented 1 year ago

Could you please remove your "test 3.12 beta" commit?

Done!

In case you want to give the tool a go, we are certainly happy to accept such a PR.

Here's a quick attempt, but it didn't add 3.12: https://github.com/zopefoundation/transaction/pull/117

If not, we are in the process of applying the tool to all repositories and test against 3.12 already - it just takes some time.

Great to hear you've started! 👍

icemac commented 1 year ago

Python 3.12 is now tested in #118.

icemac commented 1 year ago

3.12 has some serious problems for some zopefoundation repositories which are already tested, so I am a bit shy to test against it in more ones.

icemac commented 1 year ago

Thank you for working on this PR. 😃