adafruit / adafruit/Adafruit_CircuitPython_PortalBase

Update Portalbase to use with so close() isn't needed

Open
#104 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Portalbase hasn't received the same treatment that adafruit_requests has with Connection Manager using `with` and still requires explicit `close()` for most cases. Needs to have the adafruit_requests treatment for `fetch` and other functions so explicit close isn't necessary to remember. It would be nice to have Portalbase take care of closing the connection automatically after use. It could help with cutting down retries, failed connections, and crashes from too many sockets open.

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare Portalbase's fetch and other functions with the adafruit_requests implementation that uses Connection Manager; the issue names these as the starting points. Done means Portalbase closes connections automatically after use so callers no longer need to remember explicit close().

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.