peeringDB Python Module Issues with Python 3?
Hi All, Has anyone seen issues with the peeringDB python module when converting to Python 3.x? I was unable to get the module working during my python 3 conversion as it seemed to require a localDB and no longer performed remote calls properly. The documents seem a bit light. This is not a current issue for me, I just wanted to bring it up in case others were aware of the issue and/or a fix. I rewrote my code to make API calls instead of using the python module and all is working perfectly. Best Regards, -Bill
The only issue I had was with django-peeringdb needing to use Django < 3.x. A whole bunch of things don’t work with the latest version of the framework. I had to put this requirement into my python projects that used the django-peeringdb module and PY3. Django<=2.2.9
On Feb 11, 2020, at 8:38 AM, William Marantz <wmarantz@salesforce.com> wrote:
Hi All,
Has anyone seen issues with the peeringDB python module when converting to Python 3.x? I was unable to get the module working during my python 3 conversion as it seemed to require a localDB and no longer performed remote calls properly. The documents seem a bit light.
This is not a current issue for me, I just wanted to bring it up in case others were aware of the issue and/or a fix. I rewrote my code to make API calls instead of using the python module and all is working perfectly.
Best Regards,
-Bill _______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
Same here: https://github.com/peeringdb/django-peeringdb/issues/37 "errors with django 3 so limit to django 2 or fix them #37" Bill, if your issue is unique after review of: https://github.com/peeringdb/django-peeringdb/issues consider a new issue with details. The django 3 issue manifests as: - django.core.exceptions.SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async. Thanks, Chris On Tue, 11 Feb 2020, Milton Ngan wrote:
The only issue I had was with django-peeringdb needing to use Django < 3.x. A whole bunch of things don’t work with the latest version of the framework. I had to put this requirement into my python projects that used the django-peeringdb module and PY3.
Django<=2.2.9
On Feb 11, 2020, at 8:38 AM, William Marantz <wmarantz@salesforce.com> wrote:
Hi All,
Has anyone seen issues with the peeringDB python module when converting to Python 3.x? I was unable to get the module working during my python 3 conversion as it seemed to require a localDB and no longer performed remote calls properly. The documents seem a bit light.
This is not a current issue for me, I just wanted to bring it up in case others were aware of the issue and/or a fix. I rewrote my code to make API calls instead of using the python module and all is working perfectly.
Best Regards,
-Bill _______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
_______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
thanks Chris and Milton. I had a different error but it was so long ago that I don't recall the messages and I've changed my python setup significantly since so recreating won't be possible. Was django used in 2.7? I don't recall seeing it before and I always used the remote calls to peeringDB and never to a local DB clone. My colleague did see the below message yesterday. Traceback (most recent call last): File "./current_peer_analysis.py", line 36, in <module> sys.exit(main()) File "./current_peer_analysis.py", line 21, in main orgs = pdb.all('net') File "/usr/local/lib/python2.7/site-packages/peeringdb/client.py", line 84, in all return B.get_objects(B.get_concrete(res)) File "/usr/local/lib/python2.7/site-packages/peeringdb/backend.py", line 78, in get_concrete return self.RESOURCE_MAP[res] KeyError: 'net' I can open an issue but it is super low priority to resolve as we quickly converted to API and are fully functional. I was just wondering if others generally had issues when moving to python3. Thanks -Bill On Tue, Feb 11, 2020 at 12:03 PM Chris Caputo <ccaputo@alt.net> wrote:
Same here:
https://github.com/peeringdb/django-peeringdb/issues/37 "errors with django 3 so limit to django 2 or fix them #37"
Bill, if your issue is unique after review of:
https://github.com/peeringdb/django-peeringdb/issues
consider a new issue with details. The django 3 issue manifests as:
- django.core.exceptions.SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.
Thanks, Chris
On Tue, 11 Feb 2020, Milton Ngan wrote:
The only issue I had was with django-peeringdb needing to use Django < 3.x. A whole bunch of things don’t work with the latest version of the framework. I had to put this requirement into my python projects that used the django-peeringdb module and PY3.
Django<=2.2.9
On Feb 11, 2020, at 8:38 AM, William Marantz <wmarantz@salesforce.com> wrote:
Hi All,
Has anyone seen issues with the peeringDB python module when converting to Python 3.x? I was unable to get the module working during my python 3 conversion as it seemed to require a localDB and no longer performed remote calls properly. The documents seem a bit light.
This is not a current issue for me, I just wanted to bring it up in case others were aware of the issue and/or a fix. I rewrote my code to make API calls instead of using the python module and all is working perfectly.
Best Regards,
-Bill _______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
_______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com https://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
-- *Bill Marantz* Principal Network Engineer Backbone Engineering Mobile: 848-404-4613 email: wmarantz@salesforce.com <ihamilton@salesforce.com>
participants (3)
-
Chris Caputo -
Milton Ngan -
William Marantz