zopefoundation / zope.publisher

Map requests from HTTP/WebDAV clients, web browsers, XML-RPC and FTP clients onto Python objects
Other
3 stars 13 forks source link

Fix test compatibility with zope.interface 5.4 #61

Closed jamadden closed 3 years ago

jamadden commented 3 years ago

Explicitly use the repr of interfaces so we can work with any version of zope.interface.

See https://github.com/zopefoundation/zope.interface/pull/237#issuecomment-807188771

(skinnable.py was using dos line endings so the diff had weird chars—^M— in it. I converted to standard line endings. Suggest viewing with whitespace changes off.)

There was a flaky test that didn't run in my environment because my virtual environment had zope.annotation installed. I tweaked it to work either way because I didn't want to add a new test dependency. I'm not sure how much value asserting the exact number of registered utilities/adapters adds though, so if there's a consensus about simplifying (e.g., before loading configure.zcml, there should be nothing registered, afterwards there should be at least something) I'm happy to try that instead. Or if the whole thing is too invasive I'll back it out..but it was confusing to find what the issue was.

jamadden commented 3 years ago

Thank you.