Opened at 2016-12-08T19:05:41Z
Closed at 2020-01-17T16:54:44Z
#2846 closed defect (was already fixed)
nevow error against twisted-trunk
Reported by: | warner | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | soon |
Component: | code-frontend-web | Version: | 1.11.0 |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
The "deprecations" buildbot picked up a test failure (which will probably also be a runtime error) when running against Twisted trunk:
[ERROR] Traceback (most recent call last): File "/home/bb-tahoe/bb-tahoe/deprecations/build/.tox/upcoming-deprecations/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred result = f(*args, **kw) File "/home/bb-tahoe/bb-tahoe/deprecations/build/.tox/upcoming-deprecations/local/lib/python2.7/site-packages/nevow/static.py", line 311, in renderHTTP if request.setLastModified(self.fp.getmtime()) is http.CACHED: exceptions.AttributeError: 'FilePath' object has no attribute 'getmtime' allmydata.test.test_system.SystemTest.test_filesystem allmydata.test.web.test_web.Web.test_CSS_FILE
(see the log in https://tahoe-lafs.org/buildbot-tahoe-lafs/builders/deprecations/builds/140/steps/upcoming-deprecations/logs/stdio)
This is using tahoe at [5a5da0de2a4b23c6b9b5540e4675ee532a8addb2], Twisted at "1.6.0dev0" (they don't use Versioneer, but it's probably 0384682cad94bfa1d16a6fc80e795fa6765d7454), and Nevow-0.14.2 .
Twisted just removed several methods from FilePath which had been (informally) deprecated back in 2007 (twisted a8805a0162d8c67830c5353caa18b5e387cf8ea6), which would be the Twisted-2.6/8.0 era. Unfortunately, it appears that no actual DeprecationWarning was raised for these methods, so we didn't see any notice that they'd be going away: the only indication was in the docstring. The specific method that Nevow-0.14.2 is using is getmtime, which was replaced with a higher-precision variant named getModificationTime.
(interesting trivia note: they replaced getctime with getStatusChangeTime, which would help correct my perpetual misbelief that the c stands for creation).
This is a Nevow bug, but it's present in the most recent release (0.14.2), and the Nevow repo has no further commits. So either we need to help get a fixed Nevow release out ASAP, or Tahoe needs to avoid using Nevow in a way that triggers this code path. Otherwise Tahoe will stop working as soon as the next Twisted release comes out.
Change History (3)
comment:1 Changed at 2016-12-08T19:13:04Z by warner
comment:2 Changed at 2016-12-09T01:38:55Z by warner
- Milestone changed from 1.12.0 to soon
Deprioritizing this one: Twisted is going to revert the change, and start again with a real deprecation period. Nevow is going to stop using the Twisted API in question. That means we don't need to do anything. I'll leave it open for a while just in case something goes wrong, and we need to be able to find the context. Let's close it when Nevow has switched to getModificationTime, and we're not in danger of seeing any warnings.
comment:3 Changed at 2020-01-17T16:54:44Z by exarkun
- Resolution set to was already fixed
- Status changed from new to closed
The Nevow bug is fixed.
Just filed a Nevow bug: https://github.com/twisted/nevow/issues/96