Comments (7)
Meh, why do people do this? If they deprecate something they should wait for a while til the replacement is widely deployed.
I think we'll have to do some magic to let it work with both versions. My "compatibility requirement" is usually "needs to work with what's shipped in debian stable". Which likely means we'll have to deal with this for a while.
from snallygaster.
What do you think about something like:
if 'resolve' in dir(dns.resolver):
ns = dns.resolver.resolve(qhost, 'NS')
else:
ns = dns.resolver.query(qhost, 'NS')
? And a big comment that once dnspython 2.0 or above is widely deployed this should be simplified again.
from snallygaster.
I agree that this kind of hard deprecations is not really the nicest way.
Your suggestion is probably the only way to get rid of the warnings and still remain compatible with older versions.
from snallygaster.
Just to quickly record this here:
It seems to me no matter what I do right now, the axfr test fails with dnspython 2.0. It may be the axfr functionality has some subtle changes as well. Have to look more into this.
About the other use of dnspython which is only called from the invalidsrc test: I'm not entirely sure if we need this at all, I don't remember my intentions when I implemented this, but it looks like it's just a fallback if the normal socket function does not work.
from snallygaster.
Ok, I'm not happy with the amount of changes required to make dnspython 2.0 happy, but here it is:
4a02f0f
It seems it no longer likes to do axfr queries on a hostname, so we need to first resolve IPs. I changed it to use multiple IPs on NS and also do v4/v6, so this also makes the test more thorough.
Can you please test?
from snallygaster.
I did some quick tests and didn't get any warnings or errors/exceptions anymore.
from snallygaster.
Ok, will consider this as fixed. Obviously if you see any other issues please open another bug.
from snallygaster.
Related Issues (20)
- test_backup_archive: add more filenames HOT 1
- False negatives for backup-archives HOT 2
- Release new version on pypi HOT 1
- useragent? HOT 2
- All checks are green if the hostname can't be resolved
- stuck invalidsrc check with streaming responses HOT 2
- test_invalidsrc picks the to be tested src url at random HOT 1
- Test tests versus doc (TESTS.md) HOT 1
- too long / invalid hostname gives unhandled UnicodeError exception HOT 1
- dns.exception.SyntaxError: Text input is malformed. HOT 2
- Exception after DNS timeout HOT 1
- Unhandled exception HOT 3
- pylint >= 2.7.2 gives error "deprecated method wrap_socket()"
- suggestion: adding check for .sql.gz files HOT 2
- Question about .tar.xz verification HOT 2
- Suggestion: Adding check for webserver version in response header, additionally check if version is outdated HOT 2
- Wait time between requests
- License change to 0BSD HOT 19
- False positive in Single Page Application (SPA) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snallygaster.