I am plannig to upgrade twisted's buildbot in the near future. In
preperation for that, I am going to take down the production buildbot
on Tuesday, June 26, around 1600 UTC[1].
During that time, the result of any builds done will be lost. Thus, I'd
ask that people avoid committing to trunk during that time.
I will send a reminder before I take down the buildbot both here, and on
#twisted and #twisted-dev.
Tom
[1] http://timeanddate.com/worldclock/meetingtime.html?iso=20120626&p1=80&p2=22…
On behalf of the Twisted contributors I announce the release candidate
of Twisted 22.1.0
This is mainly a bugfix release.
The main bug is:
- twisted.web.client.RedirectAgent and
twisted.web.client.BrowserLikeRedirectAgent now properly remove
sensitive headers when redirecting to a different origin. (#10294)
The only new feature is:
- twisted.conch.ssh now supports SSH extension negotiation (RFC 8308). (#10266)
The release and NEWS file is available for review at
https://github.com/…
[View More]twisted/twisted/pull/1686/files
Release candidate documentation is available at
https://twisted--1686.org.readthedocs.build/en/1686/
Wheels for the release candidate are available on PyPI
https://pypi.org/project/Twisted/22.1.0rc1/
python -m pip install Twisted==22.1.0rc1
Please test it and report any issues.
If nothing comes up in one week,
22.1.0 will be released based on the latest release candidate.
Many thanks to everyone who had a part in Twisted development,
the supporters of the Twisted Software Foundation,
the developers, and all the people testing and building great things
with Twisted!
--
Adi Roiban
[View Less]
Hi
I am using twistd to run a daemon which manage a device
The issue occur in a LoopingCall
# Create a looping call and assign waiting_update function to it
self.waiting_loop = task.LoopingCall(self.waiting_update)
def send(self):
# If client isn't waiting for response and frame queue of the
NetworkManager is not empty :
if not self.waiting_response and self.network_manager.queue:
# If first element of the queue is None :
if self.network_manager.queue[0] == None:
…
[View More] # Delete first element
del self.network_manager.queue[0]
# Recall the function
self.send()
# If first element of the queue is different than None :
else:
# Copy first element of the queue
frame = self.network_manager.queue[0]
# If debug is enabled print debugging string and frame
if self.network_manager.debug:
print(self.network_manager.lang['keypanel_sending_frame'], "
".join(frame[i:i+2] for i in range(0, len(frame), 2)))
# Send frame to the KeyPanel
self.transport.write(bytes.fromhex(frame))
# Set waiting response to True
self.waiting_response = True
def print_test(self):
print ("Test errback ")
# If loop isn't already running, start the loop
if not self.waiting_loop.running:
self.waiting_time = time.time()
d = self.waiting_loop.start(1)
d.addErrback(print_test)
def waiting_update(self):
# If waiting time is equal or greater than the limit :
if time.time() >= self.waiting_time +
self.network_manager.waiting_response_time:
# Increment retry by 1
self.retry += 1
# If retry is equal or greater than the limit :
if self.retry >= self.network_manager.send_retry_max:
# If debug is enabled print debugging string
if self.network_manager.debug:
print(self.network_manager.lang['keypanel_fail_sending_frame'],
self.network_manager.queue[0])
# Delete first element of the NetworkManager queue
del self.network_manager.queue[0]
# Reset retry variable
self.retry = 0
# Reset waiting state
self.waiting_reset()
# If waiting time is lesser than the limit :
else:
# Waiting 1/2 second
time.sleep(0.5)
# Increment waiting time
self.waiting_time = time.time()
def waiting_reset(self):
# Disable response waiting
self.waiting_response = False
# Stop the loop
self.waiting_loop.stop()
# Reset waiting time
self.waiting_time = time.time()
# Send the next frame in the queue
self.send()
When the internet connection is good everything works but if the cable
is disconnected an error occurs in twisted.internet.defer which I can't
catch
Error message is
[twisted.internet.defer#critical] Unhandled error in Deferred:
[twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/base.py",
line 913, in runUntilCurrent call.func(*call.args, **call.kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/task.py",
line 241, in __call__ d.addErrback(eb)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py",
line 333, in addErrback errbackKeywords=kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py",
line 311, in addCallbacks self._runCallbacks()
--- <exception caught here> ---
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py",
line 654, in _runCallbacks current.result = callback(current.result,
*args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/task.py",
line 236, in eb
d.errback(failure) builtins.AttributeError: 'NoneType' object has no
attribute 'errback'
Do you have a proposal to resolve this issue
Thank you
[View Less]