Skip to content

No context manager for socket #195

Closed
@anecdata

Description

@anecdata

Lack of with context manager makes it harder to write code / use libraries, compatible across radios (sources of sockets; e.g., native wifi, WIZnet, ESP32SPI).

Example:
adafruit/Adafruit_CircuitPython_NTP#31

Traceback (most recent call last):
  File "<stdin>", line 38, in <module>
  File "adafruit_ntp.py", line 77, in datetime
AttributeError: 'socket' object has no attribute '__exit__'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions