Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarnings with Python 3.11a1 #112

Closed
icemac opened this issue Oct 18, 2021 · 0 comments · Fixed by #119
Closed

DeprecationWarnings with Python 3.11a1 #112

icemac opened this issue Oct 18, 2021 · 0 comments · Fixed by #119

Comments

@icemac
Copy link
Member

icemac commented Oct 18, 2021

What I did:

tox -e py311

What I expect to happen:

Successful run without deprecation warnings.

What actually happened:

Successful run (yeah!) but a load of deprecation warnings like this:

.../lib/python3.11/unittest/case.py:646: DeprecationWarning: It is deprecated to return a value!=None from a test case (<bound method InterfaceConformanceTestsMixin.test_class_conforms_to_iface of <zope.schema.tests.test__bootstrapfields.BoolTests testMethod=test_class_conforms_to_iface>>)
  return self.run(*args, **kwds)

The reason seems to be:

def test_class_conforms_to_iface(self):
from zope.interface.verify import verifyClass
cls = self._getTargetClass()
__traceback_info__ = cls
for iface in self._getTargetInterfaces():
verifyClass(iface, cls)
return verifyClass
def test_instance_conforms_to_iface(self):
from zope.interface.verify import verifyObject
instance = self._makeOne()
__traceback_info__ = instance
for iface in self._getTargetInterfaces():
verifyObject(iface, instance)
return verifyObject

Those methods are used in some child classes for super calls but in others they are not overwritten.

What version of Python and Zope/Addons I am using:

Python 3.11a1 on master of zope.schema.

@icemac icemac assigned dhavlik and unassigned dhavlik Apr 13, 2022
cjwatson added a commit to cjwatson/zope.schema that referenced this issue Dec 23, 2022
cjwatson added a commit to cjwatson/zope.schema that referenced this issue Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants