2024-06-10 15:33:37 -04:00
|
|
|
# This file was autogenerated by uv via the following command:
|
|
|
|
|
# uv pip compile requirements-dev.in -o requirements-dev.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
asgiref==3.7.2
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# django
|
2023-06-27 12:23:08 +02:00
|
|
|
celery-types==0.18.0
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2024-08-20 10:29:01 -04:00
|
|
|
certifi==2024.7.4
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# requests
|
|
|
|
|
cfgv==3.4.0
|
|
|
|
|
# via pre-commit
|
|
|
|
|
charset-normalizer==3.3.2
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# requests
|
|
|
|
|
distlib==0.3.8
|
|
|
|
|
# via virtualenv
|
2025-04-21 14:23:37 -03:00
|
|
|
django==4.2.20
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# django-stubs
|
|
|
|
|
# django-stubs-ext
|
2023-06-12 18:50:33 +02:00
|
|
|
django-filter-stubs==0.1.3
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2025-03-12 16:52:30 +01:00
|
|
|
django-stubs[compatible-mypy]==4.2.2
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
# django-filter-stubs
|
|
|
|
|
# djangorestframework-stubs
|
|
|
|
|
django-stubs-ext==4.2.7
|
|
|
|
|
# via django-stubs
|
2025-03-12 16:52:30 +01:00
|
|
|
djangorestframework-stubs[compatible-mypy]==3.14.2
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
# django-filter-stubs
|
2024-06-10 15:33:37 -04:00
|
|
|
execnet==2.1.1
|
2024-02-20 14:44:15 -03:00
|
|
|
# via pytest-xdist
|
|
|
|
|
factory-boy==2.12.0
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# pytest-factoryboy
|
|
|
|
|
faker==23.1.0
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# factory-boy
|
|
|
|
|
filelock==3.13.1
|
|
|
|
|
# via virtualenv
|
|
|
|
|
httpretty==1.1.4
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
identify==2.5.34
|
|
|
|
|
# via pre-commit
|
2024-08-20 10:29:01 -04:00
|
|
|
idna==3.7
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# requests
|
|
|
|
|
inflection==0.5.1
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# pytest-factoryboy
|
|
|
|
|
iniconfig==2.0.0
|
|
|
|
|
# via pytest
|
2023-12-01 09:56:26 -05:00
|
|
|
mypy==1.4.1
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
# django-filter-stubs
|
|
|
|
|
# django-stubs
|
|
|
|
|
# djangorestframework-stubs
|
|
|
|
|
mypy-extensions==1.0.0
|
|
|
|
|
# via mypy
|
|
|
|
|
nodeenv==1.8.0
|
|
|
|
|
# via pre-commit
|
|
|
|
|
packaging==23.2
|
2024-06-10 15:33:37 -04:00
|
|
|
# via
|
|
|
|
|
# pytest
|
|
|
|
|
# pytest-factoryboy
|
2024-02-20 14:44:15 -03:00
|
|
|
platformdirs==4.2.0
|
|
|
|
|
# via virtualenv
|
2024-06-10 15:33:37 -04:00
|
|
|
pluggy==1.5.0
|
2024-02-20 14:44:15 -03:00
|
|
|
# via pytest
|
2023-12-01 09:56:26 -05:00
|
|
|
pre-commit==2.15.0
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
psutil==5.9.4
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# pytest-xdist
|
2024-06-10 15:33:37 -04:00
|
|
|
pytest==8.2.2
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
# pytest-django
|
|
|
|
|
# pytest-factoryboy
|
chore: add `pytest-socket` library + disable network calls in tests (#5315)
# What this PR does
Inspired by [this
discussion](https://github.com/grafana/oncall/pull/5307#discussion_r1862449480).
_tldr;_ ensures that if any of our tests try making an external network
call, they will fail.
Setup an example test:
```python
def test_external_network_call():
import requests
response = requests.get('https://www.example.com')
assert response.status_code == 200
```
and it worked (failed; [example CI test
run](https://github.com/grafana/oncall/actions/runs/12106416991/job/33752144727?pr=5315#step:6:389))
as expected:
```bash
__________________________ test_external_network_call __________________________
def test_external_network_call():
import requests
> response = requests.get('https://www.example.com')
requests = <module 'requests' from '/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/__init__.py'>
apps/test_joey.py:4:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/api.py:73: in get
return request("get", url, params=params, **kwargs)
kwargs = {}
params = None
url = 'https://www.example.com'
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/api.py:59: in request
return session.request(method=method, url=url, **kwargs)
kwargs = {'params': None}
method = 'get'
session = <requests.sessions.Session object at 0x7f10ebaada90>
url = 'https://www.example.com'
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/sessions.py:589: in request
resp = self.send(prep, **send_kwargs)
allow_redirects = True
auth = None
cert = None
cookies = None
data = None
files = None
headers = None
hooks = None
json = None
method = 'get'
params = None
prep = <PreparedRequest [GET]>
proxies = {}
req = <Request [GET]>
self = <requests.sessions.Session object at 0x7f10ebaada90>
send_kwargs = {'allow_redirects': True, 'cert': None, 'proxies': OrderedDict(), 'stream': False, ...}
settings = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'verify': True}
stream = None
timeout = None
url = 'https://www.example.com'
verify = None
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/sessions.py:703: in send
r = adapter.send(request, **kwargs)
adapter = <requests.adapters.HTTPAdapter object at 0x7f10ebaada30>
allow_redirects = True
hooks = {'response': []}
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
request = <PreparedRequest [GET]>
self = <requests.sessions.Session object at 0x7f10ebaada90>
start = 1733064371.649901
stream = False
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/adapters.py:667: in send
resp = conn.urlopen(
cert = None
chunked = False
conn = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f10ebaadd30>
proxies = OrderedDict()
request = <PreparedRequest [GET]>
self = <requests.adapters.HTTPAdapter object at 0x7f10ebaada30>
stream = False
timeout = Timeout(connect=None, read=None, total=None)
url = '/'
verify = True
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connectionpool.py:715: in urlopen
httplib_response = self._make_request(
assert_same_host = False
body = None
body_pos = None
chunked = False
clean_exit = False
conn = None
destination_scheme = None
err = None
headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}
http_tunnel_required = False
is_new_proxy_conn = False
method = 'GET'
parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/', query=None, fragment=None)
pool_timeout = None
redirect = False
release_conn = False
release_this_conn = True
response_kw = {'decode_content': False, 'preload_content': False}
retries = Retry(total=0, connect=None, read=False, redirect=None, status=None)
self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f10ebaadd30>
timeout = Timeout(connect=None, read=None, total=None)
timeout_obj = Timeout(connect=None, read=None, total=None)
url = '/'
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connectionpool.py:404: in _make_request
self._validate_conn(conn)
chunked = False
conn = <urllib3.connection.HTTPSConnection object at 0x7f10ebaadd60>
httplib_request_kw = {'body': None, 'headers': {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}}
method = 'GET'
self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f10ebaadd30>
timeout = Timeout(connect=None, read=None, total=None)
timeout_obj = Timeout(connect=None, read=None, total=None)
url = '/'
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connectionpool.py:1060: in _validate_conn
conn.connect()
__class__ = <class 'urllib3.connectionpool.HTTPSConnectionPool'>
conn = <urllib3.connection.HTTPSConnection object at 0x7f10ebaadd60>
self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f10ebaadd30>
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connection.py:363: in connect
self.sock = conn = self._new_conn()
self = <urllib3.connection.HTTPSConnection object at 0x7f10ebaadd60>
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connection.py:174: in _new_conn
conn = connection.create_connection(
extra_kw = {'socket_options': [(6, 1, 1)]}
self = <urllib3.connection.HTTPSConnection object at 0x7f10ebaadd60>
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/util/connection.py:85: in create_connection
sock.connect(sa)
address = ('www.example.com', 443)
af = <AddressFamily.AF_INET: 2>
canonname = ''
err = None
family = <AddressFamily.AF_UNSPEC: 0>
host = 'www.example.com'
port = 443
proto = 6
res = (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('93.184.215.14', 443))
sa = ('93.184.215.14', 443)
sock = <socket.socket fd=12, family=2, type=1, proto=6, laddr=('0.0.0.0', 0)>
socket_options = [(6, 1, 1)]
socktype = <SocketKind.SOCK_STREAM: 1>
source_address = None
timeout = None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
inst = <socket.socket fd=12, family=2, type=1, proto=6, laddr=('0.0.0.0', 0)>
args = (('93.184.215.14', 443),), host = '93.184.215.14'
def guarded_connect(inst, *args):
host = host_from_connect_args(args)
if host in allowed_ip_hosts_and_hostnames or (
_is_unix_socket(inst.family) and allow_unix_socket
):
return _true_connect(inst, *args)
> raise SocketConnectBlockedError(allowed_list, host)
E pytest_socket.SocketConnectBlockedError: A test tried to use socket.socket.connect() with host "93.184.215.14" (allowed: "calendar.google.com (142.251.167.100,142.251.167.101,142.251.167.102,142.251.167.113,142.251.167.138,142.251.167.139,2607:f8b0:4004:c09::65,2607:f8b0:4004:c09::66,2607:f8b0:4004:c09::71,2607:f8b0:4004:c09::8b),localhost (127.0.0.1,::1),oncall-dev-mariadb ()").
allow_unix_socket = False
allowed_ip_hosts_and_hostnames = {'127.0.0.1', '142.251.167.100', '142.251.167.101', '142.251.167.102', '142.251.167.113', '142.251.167.138', ...}
allowed_list = ['calendar.google.com (142.251.167.100,142.251.167.101,142.251.167.102,142.251.167.113,142.251.167.138,142.251.167.139...8b0:4004:c09::66,2607:f8b0:4004:c09::71,2607:f8b0:4004:c09::8b)', 'localhost (127.0.0.1,::1)', 'oncall-dev-mariadb ()']
args = (('93.184.215.14', 443),)
host = '93.184.215.14'
inst = <socket.socket fd=12, family=2, type=1, proto=6, laddr=('0.0.0.0', 0)>
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/pytest_socket.py:252: SocketConnectBlockedError
```
## Checklist
- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
show up in the autogenerated release notes.
2024-12-02 10:53:18 -05:00
|
|
|
# pytest-socket
|
2024-02-20 14:44:15 -03:00
|
|
|
# pytest-xdist
|
2024-06-10 15:33:37 -04:00
|
|
|
pytest-django==4.8.0
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2024-06-10 15:33:37 -04:00
|
|
|
pytest-factoryboy==2.7.0
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
chore: add `pytest-socket` library + disable network calls in tests (#5315)
# What this PR does
Inspired by [this
discussion](https://github.com/grafana/oncall/pull/5307#discussion_r1862449480).
_tldr;_ ensures that if any of our tests try making an external network
call, they will fail.
Setup an example test:
```python
def test_external_network_call():
import requests
response = requests.get('https://www.example.com')
assert response.status_code == 200
```
and it worked (failed; [example CI test
run](https://github.com/grafana/oncall/actions/runs/12106416991/job/33752144727?pr=5315#step:6:389))
as expected:
```bash
__________________________ test_external_network_call __________________________
def test_external_network_call():
import requests
> response = requests.get('https://www.example.com')
requests = <module 'requests' from '/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/__init__.py'>
apps/test_joey.py:4:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/api.py:73: in get
return request("get", url, params=params, **kwargs)
kwargs = {}
params = None
url = 'https://www.example.com'
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/api.py:59: in request
return session.request(method=method, url=url, **kwargs)
kwargs = {'params': None}
method = 'get'
session = <requests.sessions.Session object at 0x7f10ebaada90>
url = 'https://www.example.com'
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/sessions.py:589: in request
resp = self.send(prep, **send_kwargs)
allow_redirects = True
auth = None
cert = None
cookies = None
data = None
files = None
headers = None
hooks = None
json = None
method = 'get'
params = None
prep = <PreparedRequest [GET]>
proxies = {}
req = <Request [GET]>
self = <requests.sessions.Session object at 0x7f10ebaada90>
send_kwargs = {'allow_redirects': True, 'cert': None, 'proxies': OrderedDict(), 'stream': False, ...}
settings = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'verify': True}
stream = None
timeout = None
url = 'https://www.example.com'
verify = None
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/sessions.py:703: in send
r = adapter.send(request, **kwargs)
adapter = <requests.adapters.HTTPAdapter object at 0x7f10ebaada30>
allow_redirects = True
hooks = {'response': []}
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
request = <PreparedRequest [GET]>
self = <requests.sessions.Session object at 0x7f10ebaada90>
start = 1733064371.649901
stream = False
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/requests/adapters.py:667: in send
resp = conn.urlopen(
cert = None
chunked = False
conn = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f10ebaadd30>
proxies = OrderedDict()
request = <PreparedRequest [GET]>
self = <requests.adapters.HTTPAdapter object at 0x7f10ebaada30>
stream = False
timeout = Timeout(connect=None, read=None, total=None)
url = '/'
verify = True
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connectionpool.py:715: in urlopen
httplib_response = self._make_request(
assert_same_host = False
body = None
body_pos = None
chunked = False
clean_exit = False
conn = None
destination_scheme = None
err = None
headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}
http_tunnel_required = False
is_new_proxy_conn = False
method = 'GET'
parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/', query=None, fragment=None)
pool_timeout = None
redirect = False
release_conn = False
release_this_conn = True
response_kw = {'decode_content': False, 'preload_content': False}
retries = Retry(total=0, connect=None, read=False, redirect=None, status=None)
self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f10ebaadd30>
timeout = Timeout(connect=None, read=None, total=None)
timeout_obj = Timeout(connect=None, read=None, total=None)
url = '/'
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connectionpool.py:404: in _make_request
self._validate_conn(conn)
chunked = False
conn = <urllib3.connection.HTTPSConnection object at 0x7f10ebaadd60>
httplib_request_kw = {'body': None, 'headers': {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}}
method = 'GET'
self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f10ebaadd30>
timeout = Timeout(connect=None, read=None, total=None)
timeout_obj = Timeout(connect=None, read=None, total=None)
url = '/'
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connectionpool.py:1060: in _validate_conn
conn.connect()
__class__ = <class 'urllib3.connectionpool.HTTPSConnectionPool'>
conn = <urllib3.connection.HTTPSConnection object at 0x7f10ebaadd60>
self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f10ebaadd30>
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connection.py:363: in connect
self.sock = conn = self._new_conn()
self = <urllib3.connection.HTTPSConnection object at 0x7f10ebaadd60>
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/connection.py:174: in _new_conn
conn = connection.create_connection(
extra_kw = {'socket_options': [(6, 1, 1)]}
self = <urllib3.connection.HTTPSConnection object at 0x7f10ebaadd60>
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/urllib3/util/connection.py:85: in create_connection
sock.connect(sa)
address = ('www.example.com', 443)
af = <AddressFamily.AF_INET: 2>
canonname = ''
err = None
family = <AddressFamily.AF_UNSPEC: 0>
host = 'www.example.com'
port = 443
proto = 6
res = (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('93.184.215.14', 443))
sa = ('93.184.215.14', 443)
sock = <socket.socket fd=12, family=2, type=1, proto=6, laddr=('0.0.0.0', 0)>
socket_options = [(6, 1, 1)]
socktype = <SocketKind.SOCK_STREAM: 1>
source_address = None
timeout = None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
inst = <socket.socket fd=12, family=2, type=1, proto=6, laddr=('0.0.0.0', 0)>
args = (('93.184.215.14', 443),), host = '93.184.215.14'
def guarded_connect(inst, *args):
host = host_from_connect_args(args)
if host in allowed_ip_hosts_and_hostnames or (
_is_unix_socket(inst.family) and allow_unix_socket
):
return _true_connect(inst, *args)
> raise SocketConnectBlockedError(allowed_list, host)
E pytest_socket.SocketConnectBlockedError: A test tried to use socket.socket.connect() with host "93.184.215.14" (allowed: "calendar.google.com (142.251.167.100,142.251.167.101,142.251.167.102,142.251.167.113,142.251.167.138,142.251.167.139,2607:f8b0:4004:c09::65,2607:f8b0:4004:c09::66,2607:f8b0:4004:c09::71,2607:f8b0:4004:c09::8b),localhost (127.0.0.1,::1),oncall-dev-mariadb ()").
allow_unix_socket = False
allowed_ip_hosts_and_hostnames = {'127.0.0.1', '142.251.167.100', '142.251.167.101', '142.251.167.102', '142.251.167.113', '142.251.167.138', ...}
allowed_list = ['calendar.google.com (142.251.167.100,142.251.167.101,142.251.167.102,142.251.167.113,142.251.167.138,142.251.167.139...8b0:4004:c09::66,2607:f8b0:4004:c09::71,2607:f8b0:4004:c09::8b)', 'localhost (127.0.0.1,::1)', 'oncall-dev-mariadb ()']
args = (('93.184.215.14', 443),)
host = '93.184.215.14'
inst = <socket.socket fd=12, family=2, type=1, proto=6, laddr=('0.0.0.0', 0)>
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/pytest_socket.py:252: SocketConnectBlockedError
```
## Checklist
- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
show up in the autogenerated release notes.
2024-12-02 10:53:18 -05:00
|
|
|
pytest-socket==0.7.0
|
|
|
|
|
# via -r requirements-dev.in
|
2025-03-12 16:52:30 +01:00
|
|
|
pytest-xdist[psutil]==3.6.1
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
python-dateutil==2.8.2
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# faker
|
|
|
|
|
pyyaml==6.0.1
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# pre-commit
|
Fix missing `setuptools` dep (#4799)
# What this PR does
_tldr;_ I think we should install `setuptools` into our engine
`Dockerfile` + in our CI env because Python 3.12 no longer installs
`distutils` by default. This should unblock us from being able to merge
#4656 and #4555.
**More details**
I would like to be able to merge #4656 and #4555. _However_, in both of
these PRs `setuptools` is being removed from `requirements-dev.txt`
([here](https://github.com/grafana/oncall/pull/4555/files#diff-d8146d0816a943b0fa69a20399d7bbdb58e1c84c8b7933b2ba6dea7c10c410f5L113-L116)
and
[here](https://github.com/grafana/oncall/pull/4656/files#diff-d8146d0816a943b0fa69a20399d7bbdb58e1c84c8b7933b2ba6dea7c10c410f5L113-L116)).
This leads to things breaking because of:
```bash
File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/polymorphic/__init__.py", line 9, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
```
-
https://github.com/grafana/oncall/actions/runs/9865348392/job/27242117474?pr=4555#step:5:98
-
https://github.com/grafana/oncall/actions/runs/10078898966/job/27864920455?pr=4656#step:5:100
Python 3.12 made a change to no longer pre-install `distutils`
([relevant release
notes](https://docs.python.org/3/whatsnew/3.12.html#:~:text=The%20third%2Dparty%20Setuptools%20package%20continues%20to%20provide%20distutils%2C%20if%20you%20still%20require%20it%20in%20Python%203.12%20and%20beyond)):
> [PEP 632](https://peps.python.org/pep-0632/): Remove the distutils
package. See [the migration
guide](https://peps.python.org/pep-0632/#migration-advice) for advice
replacing the APIs it provided. The third-party
[Setuptools](https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html)
package continues to provide distutils, if you still require it in
Python 3.12 and beyond.
>
> [gh-95299](https://github.com/python/cpython/issues/95299): Do not
pre-install setuptools in virtual environments created with
[venv](https://docs.python.org/3/library/venv.html#module-venv). This
means that distutils, setuptools, pkg_resources, and easy_install will
no longer available by default; to access these run pip install
setuptools in the
[activated](https://docs.python.org/3/library/venv.html#venv-explanation)
virtual environment.
Additionally, `setuptools` is in `pip-tools` `UNSAFE_PACKAGES` list
([related GitHub
issue](https://github.com/pypa/pipenv/issues/1417#issuecomment-364795745)),
hence why I think Dependabot is removing it in #4656 and #4555.
## Checklist
- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
show up in the autogenerated release notes.
2024-08-09 16:09:47 -04:00
|
|
|
requests==2.32.3
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# djangorestframework-stubs
|
|
|
|
|
six==1.16.0
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# python-dateutil
|
2024-06-13 09:08:50 -04:00
|
|
|
sqlparse==0.5.0
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# django
|
|
|
|
|
toml==0.10.2
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# pre-commit
|
2023-06-12 18:50:33 +02:00
|
|
|
types-beautifulsoup4==4.12.0.5
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
types-html5lib==1.1.11.20240106
|
|
|
|
|
# via types-beautifulsoup4
|
|
|
|
|
types-pymysql==1.0.19.7
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2023-06-12 18:50:33 +02:00
|
|
|
types-python-dateutil==2.8.19.13
|
2024-03-19 21:14:44 +00:00
|
|
|
# via -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
types-pytz==2024.1.0.20240203
|
|
|
|
|
# via django-stubs
|
|
|
|
|
types-pyyaml==6.0.12.12
|
|
|
|
|
# via
|
|
|
|
|
# django-stubs
|
|
|
|
|
# djangorestframework-stubs
|
2023-06-27 12:23:08 +02:00
|
|
|
types-requests==2.31.0.1
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -r requirements-dev.in
|
2024-02-20 14:44:15 -03:00
|
|
|
# djangorestframework-stubs
|
|
|
|
|
types-urllib3==1.26.25.14
|
|
|
|
|
# via types-requests
|
|
|
|
|
typing-extensions==4.9.0
|
|
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# celery-types
|
|
|
|
|
# django-filter-stubs
|
|
|
|
|
# django-stubs
|
|
|
|
|
# django-stubs-ext
|
|
|
|
|
# djangorestframework-stubs
|
|
|
|
|
# mypy
|
|
|
|
|
# pytest-factoryboy
|
2024-08-09 16:30:38 -04:00
|
|
|
urllib3==1.26.19
|
2024-02-20 14:44:15 -03:00
|
|
|
# via
|
2024-03-19 21:14:44 +00:00
|
|
|
# -c requirements.txt
|
2024-02-20 14:44:15 -03:00
|
|
|
# requests
|
2025-03-12 16:52:30 +01:00
|
|
|
virtualenv==20.26.6
|
2024-02-20 14:44:15 -03:00
|
|
|
# via pre-commit
|