Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SocketPoolContants #205

Merged
merged 1 commit into from
May 20, 2024

Conversation

justmobilize
Copy link
Collaborator

@justmobilize justmobilize commented May 20, 2024

Remove mis-spelled SocketPoolContants and place the constants where they should be

@justmobilize
Copy link
Collaborator Author

@dhalbert closed #204 and re-opened

@justmobilize justmobilize marked this pull request as ready for review May 20, 2024 22:56
@@ -60,12 +56,12 @@ def getaddrinfo( # pylint: disable=too-many-arguments,unused-argument
if not isinstance(port, int):
raise ValueError("Port must be an integer")
ipaddr = self._interface.get_host_by_name(host)
return [(SocketPoolContants.AF_INET, socktype, proto, "", (ipaddr, port))]
return [(SocketPool.AF_INET, socktype, proto, "", (ipaddr, port))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be a qualified name now.

Suggested change
return [(SocketPool.AF_INET, socktype, proto, "", (ipaddr, port))]
return [(AF_INET, socktype, proto, "", (ipaddr, port))]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhalbert happy to add this and the pylint ignore, but thought this was cleaner (and it works):
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see, sorry. I was just testing by importing it into CPython, which did not complain. But it doesn't run.

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cleaner, yes.

@dhalbert dhalbert merged commit 098c0b3 into adafruit:main May 20, 2024
1 check passed
@justmobilize justmobilize deleted the remove-socket-pool-contants branch May 20, 2024 23:25
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 22, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 8.3.0 from 8.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#206 from justmobilize/remove-timeout-exception
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#205 from justmobilize/remove-socket-pool-contants

Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 7.1.1 from 7.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#162 from justmobilize/remove-socket-pool-contants
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#163 from justmobilize/remove-timeout-exception

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 7.8.1 from 7.8.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#217 from justmobilize/update-comments

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants