paulc / dnslib

A Python library to encode/decode DNS wire-format packets
https://github.com/paulc/dnslib
BSD 2-Clause "Simplified" License
295 stars 84 forks source link

threading.Thread.isAlive has been depreacated and removed in Python 3.9 #7

Closed tirkarthi closed 4 years ago

tirkarthi commented 4 years ago

The dnslib/server.py implements isAlive but checks for self.thread.isAlive which should be self.thread.is_alive. The isAlive method on DNSserver class can remain for backwards compatibility reasons.

dnslib/shellresolver.py
114:    while udp_server.isAlive():

dnslib/server.py
358:    def isAlive(self):
359:        return self.thread.isAlive()

dnslib/fixedresolver.py
96:    while udp_server.isAlive():

dnslib/zoneresolver.py
116:    while udp_server.isAlive():

dnslib/proxy.py
156:    while udp_server.isAlive():

dnslib/intercept.py
161:    while udp_server.isAlive():
paulc commented 4 years ago

I don't have 3.9 but have made the change in 0.9.13 - could you check if this works in 3.9?

Thanks, Paul