Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecation warnings ? #203

Closed
srob1 opened this issue Sep 13, 2017 · 9 comments
Closed

deprecation warnings ? #203

srob1 opened this issue Sep 13, 2017 · 9 comments
Assignees
Labels
Milestone

Comments

@srob1
Copy link

srob1 commented Sep 13, 2017

I am using IPWhois on a raspberry pi under the Python 2.7.9 Shell and am getting deprecation warnings about allow_permutations and _parse_fields_dns() when running the lookup_rdap example from the examples page:

Warning (from warnings module):
File "/usr/local/lib/python2.7/dist-packages/ipwhois/net.py", line 138
warn('allow_permutations has been deprecated and will be removed. '
UserWarning: allow_permutations has been deprecated and will be removed. It is no longer needed, due to the deprecation of asn_alts, and the addition of the asn_methods argument.

Warning (from warnings module):
File "/usr/local/lib/python2.7/dist-packages/ipwhois/asn.py", line 178
warn('IPASN._parse_fields_dns() has been deprecated and will be '
UserWarning: IPASN._parse_fields_dns() has been deprecated and will be removed. You should now use IPASN.parse_fields_dns().

The warnings resulted from executing this code which pretty much comes straight from the RDAP basis usage example:

obj = IPWhois('74.125.225.229');
results = obj.lookup_rdap(depth=1);
print results['asn_cidr'];

@secynic secynic self-assigned this Sep 18, 2017
@secynic secynic added the bug label Sep 18, 2017
@secynic secynic added this to the 1.1.0 milestone Sep 18, 2017
@secynic
Copy link
Owner

secynic commented Sep 18, 2017

The core library is still calling these. I'll get it fixed next version. Nothing to worry about as far as functionality.

@brettus78
Copy link

/sub
/bump

@pmuller
Copy link

pmuller commented Feb 21, 2018

Same issue here. Reading the code it appears that's the way the library is designed. When calling lookup(), internals are made toward _parse_fields_*() functions. No way to bypass this.

Is there an ETA for a fix release?

Thanks :)

@secynic
Copy link
Owner

secynic commented Feb 23, 2018

Will work this one once the dedup branch is merged to dev (soon). I also just realized it is using UserWarning and not DeprecationWarning.

You can suppress these in the meantime:

import warnings
with warnings.catch_warnings():
    warnings.filterwarnings("ignore", category=UserWarning)
    # put your lookup call here

@brettus78
Copy link

brettus78 commented Sep 23, 2018

I still get this issue - any updates/idea when it will be resolved?
PS. I am using the suppression method for now - but this is probably not ideal?

@WalterMccan
Copy link

This is still not fixed. The temp solution works but it does introduce a little bloat to the code.

@joneswac
Copy link

Using temp solution is working, just posting to keep tabs on this issue.

@secynic
Copy link
Owner

secynic commented Jan 29, 2019

Sorry for the hiatus. I pushed some issues out of 1.1.0 to 1.2.0 to expedite this and a couple bug fixes.

Pending some fixes and testing...I should have it pushed to PyPi this week.

@secynic secynic closed this as completed Jan 29, 2019
@secynic secynic reopened this Jan 29, 2019
secynic added a commit that referenced this issue Jan 29, 2019
Fixed deprecation warnings in core code (#203 - cstranex)
@secynic
Copy link
Owner

secynic commented Jan 29, 2019

Merged to dev in #224

@secynic secynic closed this as completed Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants