t.i.endpoints.ProcessEndpoint doesn't work with LineReceiver because _ProcessEndpointTransport object has no attribute disconnecting
Open
Nobody has claimed this yet.
bug
core
new
priority-normal
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @wallrj reported | |
|---|---|
| Trac ID | trac#6606 |
| Type | defect |
| Created | 2013-06-30 10:48:53Z |
I was trying to write an example for ProcessEndpoints:
...but got this error from LineReceiver.
[richard@zorin udp-port-from-fd-5574-3]$ python doc/core/howto/listings/process/pingbars.py example.com
Unhandled Error
Traceback (most recent call last):
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/python/log.py", line 88, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/python/log.py", line 73, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/internet/process.py", line 257, in doRead
return fdesc.readFromFD(self.fd, self.dataReceived)
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/internet/fdesc.py", line 94, in readFromFD
callback(output)
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/internet/process.py", line 260, in dataReceived
self.proc.childDataReceived(self.name, data)
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/internet/process.py", line 887, in childDataReceived
self.proto.childDataReceived(name, data)
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/internet/endpoints.py", line 336, in childDataReceived
return self.protocol.dataReceived(data)
File "/home/richard/projects/Twisted/branches/udp-port-from-fd-5574-3/twisted/protocols/basic.py", line 445, in dataReceived
if self.transport.disconnecting:
exceptions.AttributeError: '_ProcessEndpointTransport' object has no attribute 'disconnecting'
Searchable metadata
trac-id__6606 6606
type__defect defect
reporter__rwall rwall
priority__normal normal
milestone__
branch__
branch_author__
status__new new
resolution__None None
component__core core
keywords__
time__1372589333000000 1372589333000000
changetime__1560836636252726 1560836636252726
version__None None
owner__None None
cc__wiml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with twisted/internet/endpoints.py, where _ProcessEndpointTransport handles child data, and twisted/protocols/basic.py, where LineReceiver accesses disconnecting. Reproduce the failure with doc/core/howto/listings/process/pingbars.py; done when the ProcessEndpoint example works with LineReceiver without the reported AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100