-
Notifications
You must be signed in to change notification settings - Fork 0
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
[TOOL-95] Add whois info to the host string. #2
base: main
Are you sure you want to change the base?
Conversation
@@ -1,5 +1,6 @@ | |||
import ipaddress | |||
import socket | |||
from ipwhois import IPWhois |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to declare this as a new dependency in pyproject.toml
super().__init__( | ||
"A test tried to use socket.socket.connect() " | ||
f'with host "{host}" (allowed: "{allowed}").' | ||
f'with host "{host_text}" (allowed: "{allowed}").' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't it break any test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_host_blocked
and test_parametrize_with_socket_enabled_and_allow_hosts
are matching with A test tried to use socket.socket.connect() with host*
, so no tests seem to be broken.
after finish this PR (hopefully with a test) we need to add a new tag and update it in core's requirements then recompile the requirements and we should ok. |
pyproject.toml
Outdated
@@ -33,6 +33,7 @@ classifiers = [ | |||
[tool.poetry.dependencies] | |||
python = "^3.7" | |||
pytest = ">=3.6.3" | |||
ipwhois = "~=1.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For libraries meant to be reused by many applications, strict dependencies are discouraged since they lock every dependent app to use that specific version and block them from upgrading to 1.4.0
for example.
We should be as lax as possible here, and as strict as possible in shiphero_app
.
For example here ipwhois = ">= 1.0.0"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This article is a good reference to understand why. setup.py
here would be our pyproject.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done. Good catch.
Diego could you show us how a traceback looks like with this change? |
I paused this after the hackaton but I really want to try and integrate this. I believe the current issue is when we hit Any suggestions on how to tackle this? |
No description provided.