Closed kevincon closed 2 years ago
I successfully tested the version from this branch on PyPortal and CPython with the simpletest scripts in the repo.
The changes you've made and reasoning for them make sense to me. Thanks again for working on this.
This is great! The only question I have is how often this library gets used on CPython w/ Blinka if the CPython requests
module exists? Just trying to understand use cases.
Never mind, I caught up on the relevant Issue. Sounds like a cool project!
This PR fixes importing
adafruit_requests
in CPython by replacing the imports of various classes fromadafruit_esp32spi
,adafruit_wiznet5k
, etc. (which weren't specified as requirements ofadafruit_requests
and thus caused importingadafruit_requests
to fail due to not being available) with protocols that describe the common structure of those types.To help prevent the use of
adafruit_requests
in CPython from breaking in the future, this PR also adds a step to the Build CI job which uses tox to build the package and run its tests in a virtual environment.I also tested the changes to
adafruit_requests.py
in CircuitPython by copying the file to thelib/
folder of my MagTag device running the COVID tracking project and verifying that the display showed the COVID stats as expected (although note that project's data source has stopped reporting new data since March 7, 2021).Fixes #93.