Opened 11 years ago

Closed 8 years ago

#1916 defect closed wontfix (wontfix)

Pyflakes errors in twisted.web2 need fixing

Reported by: Stephen Thorne Owned by:
Priority: low Milestone:
Component: web2 Keywords:
Cc: Thijs Triemstra Branch:
Author:

Description

trunk/twisted/web2 $ pyflakes *.py | grep undef
error.py:9: 'from twisted.web2.responsecode import *' used; unable to detect undefined names
requtil.py:56: undefined name 'self'
requtil.py:64: undefined name 'site'
stream.py:201: undefined name 'SendfileBuffer'
stream.py:1009: undefined name 'LineTooLongException'
stream.py:1012: undefined name 'LineTooLongException'
tap.py:146: undefined name 'isintance'

Attachments (1)

pyflakes-web2-1916.patch (503 bytes) - added by Thijs Triemstra 9 years ago.
patch against r24264

Download all attachments as: .zip

Change History (13)

comment:1 Changed 11 years ago by Stephen Thorne

Type: enhancementdefect

comment:2 Changed 11 years ago by David Reid

Milestone: Web2-0.3

comment:3 Changed 9 years ago by collab

Cc: collab added
Owner: changed from jknight to collab
Status: newassigned

comment:4 Changed 9 years ago by Thijs Triemstra

Cc: Thijs Triemstra added; collab removed
Owner: changed from collab to Thijs Triemstra
Status: assignednew

comment:5 Changed 9 years ago by Thijs Triemstra

Status: newassigned

Status of web2 is currently:

twisted/web2$ pyflakes *.py | grep undef
error.py:9: 'from twisted.web2.responsecode import *' used; unable to detect undefined names
stream.py:201: undefined name 'SendfileBuffer'
tap.py:141: undefined name 'isintance'

Changed 9 years ago by Thijs Triemstra

Attachment: pyflakes-web2-1916.patch added

patch against r24264

comment:6 in reply to:  5 Changed 9 years ago by Thijs Triemstra

Keywords: review added
Owner: Thijs Triemstra deleted
Status: assignednew

Replying to thijs:

error.py:9: 'from twisted.web2.responsecode import *' used; unable to detect undefined names

Don't think we can fix this easily without the risk of breaking stuff, unless someone has a good suggestion to figure out which vars are imported.

stream.py:201: undefined name 'SendfileBuffer'

What to do about this one? It's marked with comments like:

# XXX: Yay using non-existent sendfile support!
# FIXME: if we return a SendfileBuffer, and then sendfile
#        fails, then what? Or, what if file is too short?

tap.py:141: undefined name 'isintance'

See attached patch that fixes this line.

comment:7 Changed 9 years ago by therve

Owner: set to Thijs Triemstra
Priority: normallow

The change should be accompanied by a test. Don't spend too much time on this tough, as web2 is being phased out.

comment:8 Changed 9 years ago by therve

Keywords: review removed

comment:9 Changed 9 years ago by Thijs Triemstra

Owner: Thijs Triemstra deleted

comment:10 Changed 9 years ago by Jean-Paul Calderone

Milestone: Twisted-8.2+1

I can't see any reason this needs to be targeted at 9.0 (8.2+1).

comment:11 Changed 8 years ago by Thijs Triemstra

Resolution: wontfix
Status: newclosed

I'm closing it because it's being phased out and should be fixed in a other ticket that makes changes in the same module/class.

comment:12 Changed 7 years ago by <automation>

Note: See TracTickets for help on using tickets.