adafruit / Adafruit_CircuitPython_Requests

Requests-like interface for web interfacing
MIT License
51 stars 36 forks source link

Remove pre 7.0 compatibility; other cleanup #102

Closed dhalbert closed 2 years ago

dhalbert commented 2 years ago

Simplify and shorten the current code. I will have a further PR later that changes a bunch of thrown exceptions to allow for easier error handling.

Please test with your own wifi code - thanks. I tested this with the simple wifi testing code, and with the Google calendar example, but not with other examples.

dhalbert commented 2 years ago

Re-pushed; due to git problems, the code that was pushed was wrong.

anecdata commented 2 years ago

Passes initial testing with my "production" code on PyPortal and Metro ESP32-S2 (CircuitPython 7.2.0). I'll load it on more devices and let it run.

askpatrickw commented 2 years ago

I ran pytest locally and hit the same failure as the CI.

Changing https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/main/tests/post_test.py#L83 to sock.send.assert_called_with(b'Date=July 25, 2019')

Fixes the test... well it passed. But I don't understand why. ;-)

dhalbert commented 2 years ago

Also tested with a PyPortal (ESP32 coprocessor) with the OpenWeather demo. Ready for re-review.