Opened 8 years ago

Closed 5 years ago

#1916 defect closed wontfix (wontfix)

Pyflakes errors in twisted.web2 need fixing

Reported by: jerub Owned by:
Priority: low Milestone:
Component: web2 Keywords:
Cc: thijs Branch:
Author: Launchpad Bug:

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 6 years ago.
patch against r24264

Download all attachments as: .zip

Change History (13)

comment:1 Changed 8 years ago by jerub

  • Type changed from enhancement to defect

comment:2 Changed 8 years ago by dreid

  • Milestone set to Web2-0.3

comment:3 Changed 6 years ago by collab

  • Cc collab added
  • Owner changed from jknight to collab
  • Status changed from new to assigned

comment:4 Changed 6 years ago by thijs

  • Cc thijs added; collab removed
  • Owner changed from collab to thijs
  • Status changed from assigned to new

comment:5 follow-up: Changed 6 years ago by thijs

  • Status changed from new to assigned

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 6 years ago by thijs

patch against r24264

comment:6 in reply to: ↑ 5 Changed 6 years ago by thijs

  • Keywords review added
  • Owner thijs deleted
  • Status changed from assigned to new

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 6 years ago by therve

  • Owner set to thijs
  • Priority changed from normal to low

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 6 years ago by therve

  • Keywords review removed

comment:9 Changed 6 years ago by thijs

  • Owner thijs deleted

comment:10 Changed 5 years ago by exarkun

  • Milestone Twisted-8.2+1 deleted

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

comment:11 Changed 5 years ago by thijs

  • Resolution set to wontfix
  • Status changed from new to closed

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 4 years ago by <automation>

Note: See TracTickets for help on using tickets.