nevow error against twisted-trunk #2846

Closed
opened 2016-12-08 19:05:41 +00:00 by warner · 3 comments
warner commented 2016-12-08 19:05:41 +00:00
Owner

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.

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](https://github.com/twisted/twisted/commit/0384682cad94bfa1d16a6fc80e795fa6765d7454)), and Nevow-0.14.2 . Twisted just removed several methods from `FilePath` which had been (informally) deprecated back in 2007 (twisted [a8805a0162d8c67830c5353caa18b5e387cf8ea6](https://github.com/twisted/twisted/commit/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](https://github.com/twisted/nevow/) 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.
tahoe-lafs added the
code-frontend-web
normal
defect
1.11.0
labels 2016-12-08 19:05:41 +00:00
tahoe-lafs added this to the 1.12.0 milestone 2016-12-08 19:05:41 +00:00
warner commented 2016-12-08 19:13:04 +00:00
Author
Owner
Just filed a Nevow bug: <https://github.com/twisted/nevow/issues/96>
warner commented 2016-12-09 01:38:55 +00:00
Author
Owner

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.

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.
tahoe-lafs modified the milestone from 1.12.0 to soon 2016-12-09 01:38:55 +00:00
exarkun commented 2020-01-17 16:54:44 +00:00
Author
Owner

The Nevow bug is fixed.

The Nevow bug is fixed.
tahoe-lafs added the
was already fixed
label 2020-01-17 16:54:44 +00:00
exarkun closed this issue 2020-01-17 16:54:44 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#2846
No description provided.