diff --git a/requirements.in b/requirements.in index 4309c1d7..80d4072e 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ --e file:.[docker-compose,mysql,oracle,postgresql,selenium,google-cloud-pubsub,mongo,redis,mssqlserver,neo4j,kafka,rabbitmq,clickhouse,keycloak,arangodb] +-e file:.[docker-compose,mysql,oracle,postgresql,selenium,google-cloud-pubsub,mongo,redis,mssqlserver,neo4j,kafka,rabbitmq,clickhouse,keycloak,arangodb,cosmosdb-emulator] codecov>=2.1.0 cryptography<37 flake8<3.8.0 # 3.8.0 adds a dependency on importlib-metadata which conflicts with other packages. diff --git a/requirements/3.10.txt b/requirements/3.10.txt index 09d9c9fa..92212059 100644 --- a/requirements/3.10.txt +++ b/requirements/3.10.txt @@ -16,34 +16,37 @@ async-generator==1.10 # trio-websocket async-timeout==4.0.2 # via redis -attrs==21.4.0 +attrs==22.1.0 # via # jsonschema # outcome # pytest # trio -babel==2.10.1 +azure-core==1.25.1 + # via azure-cosmos +azure-cosmos==4.3.0 + # via testcontainers +babel==2.10.3 # via sphinx -bcrypt==3.2.2 +bcrypt==4.0.0 # via paramiko cachetools==5.2.0 # via google-auth -certifi==2022.5.18.1 +certifi==2022.9.14 # via # requests - # urllib3 -cffi==1.15.0 + # selenium +cffi==1.15.1 # via - # bcrypt # cryptography # pynacl -charset-normalizer==2.0.12 +charset-normalizer==2.1.1 # via requests -clickhouse-driver==0.2.3 +clickhouse-driver==0.2.4 # via testcontainers codecov==2.1.12 # via -r requirements.in -coverage[toml]==6.4.1 +coverage[toml]==6.4.4 # via # codecov # pytest-cov @@ -51,8 +54,6 @@ cryptography==36.0.2 # via # -r requirements.in # paramiko - # pyopenssl - # urllib3 cx-oracle==8.3.0 # via testcontainers deprecated==1.2.13 @@ -61,7 +62,7 @@ deprecation==2.1.0 # via testcontainers distro==1.7.0 # via docker-compose -docker[ssh]==5.0.3 +docker[ssh]==6.0.0 # via # docker-compose # testcontainers @@ -71,45 +72,44 @@ dockerpty==0.4.1 # via docker-compose docopt==0.6.2 # via docker-compose -docutils==0.18.1 +docutils==0.19 # via sphinx -ecdsa==0.17.0 +ecdsa==0.18.0 # via python-jose entrypoints==0.3 # via flake8 flake8==3.7.9 # via -r requirements.in -google-api-core[grpc]==2.8.1 +google-api-core[grpc]==2.10.1 # via google-cloud-pubsub -google-auth==2.6.6 +google-auth==2.11.0 # via google-api-core -google-cloud-pubsub==1.7.1 +google-cloud-pubsub==1.7.2 # via testcontainers -googleapis-common-protos[grpc]==1.56.2 +googleapis-common-protos[grpc]==1.56.4 # via # google-api-core # grpc-google-iam-v1 # grpcio-status -greenlet==1.1.2 +greenlet==1.1.3 # via sqlalchemy grpc-google-iam-v1==0.12.4 # via google-cloud-pubsub -grpcio==1.46.3 +grpcio==1.48.1 # via # google-api-core # googleapis-common-protos # grpc-google-iam-v1 # grpcio-status -grpcio-status==1.46.3 +grpcio-status==1.48.1 # via google-api-core h11==0.13.0 # via wsproto -idna==3.3 +idna==3.4 # via # requests # trio - # urllib3 -imagesize==1.3.0 +imagesize==1.4.1 # via sphinx iniconfig==1.1.1 # via pytest @@ -123,13 +123,14 @@ markupsafe==2.1.1 # via jinja2 mccabe==0.6.1 # via flake8 -neo4j==4.4.4 +neo4j==5.0.0 # via testcontainers -outcome==1.1.0 +outcome==1.2.0 # via trio packaging==21.3 # via # deprecation + # docker # pytest # redis # sphinx @@ -137,13 +138,14 @@ paramiko==2.11.0 # via docker pg8000==1.29.1 # via -r requirements.in -pika==1.2.1 +pika==1.3.0 # via testcontainers pluggy==1.0.0 # via pytest -protobuf==3.20.1 +protobuf==3.20.2 # via # google-api-core + # google-cloud-pubsub # googleapis-common-protos # grpcio-status psycopg2-binary==2.9.3 @@ -163,11 +165,11 @@ pycparser==2.21 # via cffi pyflakes==2.1.1 # via flake8 -pygments==2.12.0 +pygments==2.13.0 # via sphinx pyjwt==2.4.0 # via python-arango -pymongo==4.1.1 +pymongo==4.2.0 # via testcontainers pymssql==2.2.5 # via testcontainers @@ -175,29 +177,27 @@ pymysql==1.0.2 # via testcontainers pynacl==1.5.0 # via paramiko -pyopenssl==22.0.0 - # via urllib3 pyparsing==3.0.9 # via packaging pyrsistent==0.18.1 # via jsonschema pysocks==1.7.1 # via urllib3 -pytest==7.1.2 +pytest==7.1.3 # via # -r requirements.in # pytest-cov pytest-cov==3.0.0 # via -r requirements.in -python-arango==7.3.4 +python-arango==7.4.1 # via testcontainers -python-dotenv==0.20.0 +python-dotenv==0.21.0 # via docker-compose python-jose==3.3.0 # via python-keycloak -python-keycloak==1.5.0 +python-keycloak==2.5.0 # via testcontainers -pytz==2022.1 +pytz==2022.2.1 # via # babel # clickhouse-driver @@ -206,10 +206,11 @@ pytz-deprecation-shim==0.1.0.post0 # via tzlocal pyyaml==5.4.1 # via docker-compose -redis==4.3.3 +redis==4.3.4 # via testcontainers -requests==2.27.1 +requests==2.28.1 # via + # azure-core # codecov # docker # docker-compose @@ -219,17 +220,20 @@ requests==2.27.1 # requests-toolbelt # sphinx requests-toolbelt==0.9.1 - # via python-arango -rsa==4.8 + # via + # python-arango + # python-keycloak +rsa==4.9 # via # google-auth # python-jose scramp==1.4.1 # via pg8000 -selenium==4.2.0 +selenium==4.4.3 # via testcontainers six==1.16.0 # via + # azure-core # dockerpty # ecdsa # google-auth @@ -237,13 +241,13 @@ six==1.16.0 # jsonschema # paramiko # websocket-client -sniffio==1.2.0 +sniffio==1.3.0 # via trio snowballstemmer==2.2.0 # via sphinx sortedcontainers==2.4.0 # via trio -sphinx==5.0.1 +sphinx==5.1.1 # via -r requirements.in sphinxcontrib-applehelp==1.0.2 # via sphinx @@ -257,7 +261,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sqlalchemy==1.4.37 +sqlalchemy==1.4.41 # via testcontainers texttable==1.6.4 # via docker-compose @@ -265,18 +269,21 @@ tomli==2.0.1 # via # coverage # pytest -trio==0.20.0 +trio==0.21.0 # via # selenium # trio-websocket trio-websocket==0.9.2 # via selenium -tzdata==2022.1 +typing-extensions==4.3.0 + # via azure-core +tzdata==2022.2 # via pytz-deprecation-shim tzlocal==4.2 # via clickhouse-driver -urllib3[secure,socks]==1.26.9 +urllib3[socks]==1.26.12 # via + # docker # python-arango # python-keycloak # requests @@ -289,7 +296,7 @@ wrapt==1.14.1 # via # deprecated # testcontainers -wsproto==1.1.0 +wsproto==1.2.0 # via trio-websocket # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/3.7.txt b/requirements/3.7.txt index ebc2f128..f229085e 100644 --- a/requirements/3.7.txt +++ b/requirements/3.7.txt @@ -16,40 +16,43 @@ async-generator==1.10 # trio-websocket async-timeout==4.0.2 # via redis -attrs==21.4.0 +attrs==22.1.0 # via # jsonschema # outcome # pytest # trio -babel==2.10.1 +azure-core==1.25.1 + # via azure-cosmos +azure-cosmos==4.3.0 + # via testcontainers +babel==2.10.3 # via sphinx backports-zoneinfo==0.2.1 # via # pytz-deprecation-shim # tzlocal -bcrypt==3.2.2 +bcrypt==4.0.0 # via paramiko cached-property==1.5.2 # via docker-compose cachetools==5.2.0 # via google-auth -certifi==2022.5.18.1 +certifi==2022.9.14 # via # requests - # urllib3 -cffi==1.15.0 + # selenium +cffi==1.15.1 # via - # bcrypt # cryptography # pynacl -charset-normalizer==2.0.12 +charset-normalizer==2.1.1 # via requests -clickhouse-driver==0.2.3 +clickhouse-driver==0.2.4 # via testcontainers codecov==2.1.12 # via -r requirements.in -coverage[toml]==6.4.1 +coverage[toml]==6.4.4 # via # codecov # pytest-cov @@ -57,8 +60,6 @@ cryptography==36.0.2 # via # -r requirements.in # paramiko - # pyopenssl - # urllib3 cx-oracle==8.3.0 # via testcontainers deprecated==1.2.13 @@ -67,7 +68,7 @@ deprecation==2.1.0 # via testcontainers distro==1.7.0 # via docker-compose -docker[ssh]==5.0.3 +docker[ssh]==6.0.0 # via # docker-compose # testcontainers @@ -77,47 +78,46 @@ dockerpty==0.4.1 # via docker-compose docopt==0.6.2 # via docker-compose -docutils==0.18.1 +docutils==0.19 # via sphinx -ecdsa==0.17.0 +ecdsa==0.18.0 # via python-jose entrypoints==0.3 # via flake8 flake8==3.7.9 # via -r requirements.in -google-api-core[grpc]==2.8.1 +google-api-core[grpc]==2.10.1 # via google-cloud-pubsub -google-auth==2.6.6 +google-auth==2.11.0 # via google-api-core -google-cloud-pubsub==1.7.1 +google-cloud-pubsub==1.7.2 # via testcontainers -googleapis-common-protos[grpc]==1.56.2 +googleapis-common-protos[grpc]==1.56.4 # via # google-api-core # grpc-google-iam-v1 # grpcio-status -greenlet==1.1.2 +greenlet==1.1.3 # via sqlalchemy grpc-google-iam-v1==0.12.4 # via google-cloud-pubsub -grpcio==1.46.3 +grpcio==1.48.1 # via # google-api-core # googleapis-common-protos # grpc-google-iam-v1 # grpcio-status -grpcio-status==1.46.3 +grpcio-status==1.48.1 # via google-api-core h11==0.13.0 # via wsproto -idna==3.3 +idna==3.4 # via # requests # trio - # urllib3 -imagesize==1.3.0 +imagesize==1.4.1 # via sphinx -importlib-metadata==4.11.4 +importlib-metadata==4.12.0 # via # jsonschema # pg8000 @@ -138,13 +138,14 @@ markupsafe==2.1.1 # via jinja2 mccabe==0.6.1 # via flake8 -neo4j==4.4.4 +neo4j==5.0.0 # via testcontainers -outcome==1.1.0 +outcome==1.2.0 # via trio packaging==21.3 # via # deprecation + # docker # pytest # redis # sphinx @@ -152,13 +153,14 @@ paramiko==2.11.0 # via docker pg8000==1.29.1 # via -r requirements.in -pika==1.2.1 +pika==1.3.0 # via testcontainers pluggy==1.0.0 # via pytest -protobuf==3.20.1 +protobuf==3.20.2 # via # google-api-core + # google-cloud-pubsub # googleapis-common-protos # grpcio-status psycopg2-binary==2.9.3 @@ -178,11 +180,11 @@ pycparser==2.21 # via cffi pyflakes==2.1.1 # via flake8 -pygments==2.12.0 +pygments==2.13.0 # via sphinx pyjwt==2.4.0 # via python-arango -pymongo==4.1.1 +pymongo==4.2.0 # via testcontainers pymssql==2.2.5 # via testcontainers @@ -190,29 +192,27 @@ pymysql==1.0.2 # via testcontainers pynacl==1.5.0 # via paramiko -pyopenssl==22.0.0 - # via urllib3 pyparsing==3.0.9 # via packaging pyrsistent==0.18.1 # via jsonschema pysocks==1.7.1 # via urllib3 -pytest==7.1.2 +pytest==7.1.3 # via # -r requirements.in # pytest-cov pytest-cov==3.0.0 # via -r requirements.in -python-arango==7.3.4 +python-arango==7.4.1 # via testcontainers -python-dotenv==0.20.0 +python-dotenv==0.21.0 # via docker-compose python-jose==3.3.0 # via python-keycloak -python-keycloak==1.5.0 +python-keycloak==2.5.0 # via testcontainers -pytz==2022.1 +pytz==2022.2.1 # via # babel # clickhouse-driver @@ -221,10 +221,11 @@ pytz-deprecation-shim==0.1.0.post0 # via tzlocal pyyaml==5.4.1 # via docker-compose -redis==4.3.3 +redis==4.3.4 # via testcontainers -requests==2.27.1 +requests==2.28.1 # via + # azure-core # codecov # docker # docker-compose @@ -234,17 +235,20 @@ requests==2.27.1 # requests-toolbelt # sphinx requests-toolbelt==0.9.1 - # via python-arango -rsa==4.8 + # via + # python-arango + # python-keycloak +rsa==4.9 # via # google-auth # python-jose scramp==1.4.1 # via pg8000 -selenium==4.2.0 +selenium==4.4.3 # via testcontainers six==1.16.0 # via + # azure-core # dockerpty # ecdsa # google-auth @@ -252,13 +256,13 @@ six==1.16.0 # jsonschema # paramiko # websocket-client -sniffio==1.2.0 +sniffio==1.3.0 # via trio snowballstemmer==2.2.0 # via sphinx sortedcontainers==2.4.0 # via trio -sphinx==5.0.1 +sphinx==5.1.1 # via -r requirements.in sphinxcontrib-applehelp==1.0.2 # via sphinx @@ -272,7 +276,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sqlalchemy==1.4.37 +sqlalchemy==1.4.41 # via testcontainers texttable==1.6.4 # via docker-compose @@ -280,24 +284,26 @@ tomli==2.0.1 # via # coverage # pytest -trio==0.20.0 +trio==0.21.0 # via # selenium # trio-websocket trio-websocket==0.9.2 # via selenium -typing-extensions==4.2.0 +typing-extensions==4.3.0 # via # async-timeout + # azure-core # h11 # importlib-metadata # redis -tzdata==2022.1 +tzdata==2022.2 # via pytz-deprecation-shim tzlocal==4.2 # via clickhouse-driver -urllib3[secure,socks]==1.26.9 +urllib3[socks]==1.26.12 # via + # docker # python-arango # python-keycloak # requests @@ -310,9 +316,9 @@ wrapt==1.14.1 # via # deprecated # testcontainers -wsproto==1.1.0 +wsproto==1.2.0 # via trio-websocket -zipp==3.8.0 +zipp==3.8.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/3.8.txt b/requirements/3.8.txt index 823b0a9d..b43f7a14 100644 --- a/requirements/3.8.txt +++ b/requirements/3.8.txt @@ -16,38 +16,41 @@ async-generator==1.10 # trio-websocket async-timeout==4.0.2 # via redis -attrs==21.4.0 +attrs==22.1.0 # via # jsonschema # outcome # pytest # trio -babel==2.10.1 +azure-core==1.25.1 + # via azure-cosmos +azure-cosmos==4.3.0 + # via testcontainers +babel==2.10.3 # via sphinx backports-zoneinfo==0.2.1 # via # pytz-deprecation-shim # tzlocal -bcrypt==3.2.2 +bcrypt==4.0.0 # via paramiko cachetools==5.2.0 # via google-auth -certifi==2022.5.18.1 +certifi==2022.9.14 # via # requests - # urllib3 -cffi==1.15.0 + # selenium +cffi==1.15.1 # via - # bcrypt # cryptography # pynacl -charset-normalizer==2.0.12 +charset-normalizer==2.1.1 # via requests -clickhouse-driver==0.2.3 +clickhouse-driver==0.2.4 # via testcontainers codecov==2.1.12 # via -r requirements.in -coverage[toml]==6.4.1 +coverage[toml]==6.4.4 # via # codecov # pytest-cov @@ -55,8 +58,6 @@ cryptography==36.0.2 # via # -r requirements.in # paramiko - # pyopenssl - # urllib3 cx-oracle==8.3.0 # via testcontainers deprecated==1.2.13 @@ -65,7 +66,7 @@ deprecation==2.1.0 # via testcontainers distro==1.7.0 # via docker-compose -docker[ssh]==5.0.3 +docker[ssh]==6.0.0 # via # docker-compose # testcontainers @@ -75,47 +76,46 @@ dockerpty==0.4.1 # via docker-compose docopt==0.6.2 # via docker-compose -docutils==0.18.1 +docutils==0.19 # via sphinx -ecdsa==0.17.0 +ecdsa==0.18.0 # via python-jose entrypoints==0.3 # via flake8 flake8==3.7.9 # via -r requirements.in -google-api-core[grpc]==2.8.1 +google-api-core[grpc]==2.10.1 # via google-cloud-pubsub -google-auth==2.6.6 +google-auth==2.11.0 # via google-api-core -google-cloud-pubsub==1.7.1 +google-cloud-pubsub==1.7.2 # via testcontainers -googleapis-common-protos[grpc]==1.56.2 +googleapis-common-protos[grpc]==1.56.4 # via # google-api-core # grpc-google-iam-v1 # grpcio-status -greenlet==1.1.2 +greenlet==1.1.3 # via sqlalchemy grpc-google-iam-v1==0.12.4 # via google-cloud-pubsub -grpcio==1.46.3 +grpcio==1.48.1 # via # google-api-core # googleapis-common-protos # grpc-google-iam-v1 # grpcio-status -grpcio-status==1.46.3 +grpcio-status==1.48.1 # via google-api-core h11==0.13.0 # via wsproto -idna==3.3 +idna==3.4 # via # requests # trio - # urllib3 -imagesize==1.3.0 +imagesize==1.4.1 # via sphinx -importlib-metadata==4.11.4 +importlib-metadata==4.12.0 # via sphinx iniconfig==1.1.1 # via pytest @@ -129,13 +129,14 @@ markupsafe==2.1.1 # via jinja2 mccabe==0.6.1 # via flake8 -neo4j==4.4.4 +neo4j==5.0.0 # via testcontainers -outcome==1.1.0 +outcome==1.2.0 # via trio packaging==21.3 # via # deprecation + # docker # pytest # redis # sphinx @@ -143,13 +144,14 @@ paramiko==2.11.0 # via docker pg8000==1.29.1 # via -r requirements.in -pika==1.2.1 +pika==1.3.0 # via testcontainers pluggy==1.0.0 # via pytest -protobuf==3.20.1 +protobuf==3.20.2 # via # google-api-core + # google-cloud-pubsub # googleapis-common-protos # grpcio-status psycopg2-binary==2.9.3 @@ -169,11 +171,11 @@ pycparser==2.21 # via cffi pyflakes==2.1.1 # via flake8 -pygments==2.12.0 +pygments==2.13.0 # via sphinx pyjwt==2.4.0 # via python-arango -pymongo==4.1.1 +pymongo==4.2.0 # via testcontainers pymssql==2.2.5 # via testcontainers @@ -181,29 +183,27 @@ pymysql==1.0.2 # via testcontainers pynacl==1.5.0 # via paramiko -pyopenssl==22.0.0 - # via urllib3 pyparsing==3.0.9 # via packaging pyrsistent==0.18.1 # via jsonschema pysocks==1.7.1 # via urllib3 -pytest==7.1.2 +pytest==7.1.3 # via # -r requirements.in # pytest-cov pytest-cov==3.0.0 # via -r requirements.in -python-arango==7.3.4 +python-arango==7.4.1 # via testcontainers -python-dotenv==0.20.0 +python-dotenv==0.21.0 # via docker-compose python-jose==3.3.0 # via python-keycloak -python-keycloak==1.5.0 +python-keycloak==2.5.0 # via testcontainers -pytz==2022.1 +pytz==2022.2.1 # via # babel # clickhouse-driver @@ -212,10 +212,11 @@ pytz-deprecation-shim==0.1.0.post0 # via tzlocal pyyaml==5.4.1 # via docker-compose -redis==4.3.3 +redis==4.3.4 # via testcontainers -requests==2.27.1 +requests==2.28.1 # via + # azure-core # codecov # docker # docker-compose @@ -225,17 +226,20 @@ requests==2.27.1 # requests-toolbelt # sphinx requests-toolbelt==0.9.1 - # via python-arango -rsa==4.8 + # via + # python-arango + # python-keycloak +rsa==4.9 # via # google-auth # python-jose scramp==1.4.1 # via pg8000 -selenium==4.2.0 +selenium==4.4.3 # via testcontainers six==1.16.0 # via + # azure-core # dockerpty # ecdsa # google-auth @@ -243,13 +247,13 @@ six==1.16.0 # jsonschema # paramiko # websocket-client -sniffio==1.2.0 +sniffio==1.3.0 # via trio snowballstemmer==2.2.0 # via sphinx sortedcontainers==2.4.0 # via trio -sphinx==5.0.1 +sphinx==5.1.1 # via -r requirements.in sphinxcontrib-applehelp==1.0.2 # via sphinx @@ -263,7 +267,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sqlalchemy==1.4.37 +sqlalchemy==1.4.41 # via testcontainers texttable==1.6.4 # via docker-compose @@ -271,18 +275,21 @@ tomli==2.0.1 # via # coverage # pytest -trio==0.20.0 +trio==0.21.0 # via # selenium # trio-websocket trio-websocket==0.9.2 # via selenium -tzdata==2022.1 +typing-extensions==4.3.0 + # via azure-core +tzdata==2022.2 # via pytz-deprecation-shim tzlocal==4.2 # via clickhouse-driver -urllib3[secure,socks]==1.26.9 +urllib3[socks]==1.26.12 # via + # docker # python-arango # python-keycloak # requests @@ -295,9 +302,9 @@ wrapt==1.14.1 # via # deprecated # testcontainers -wsproto==1.1.0 +wsproto==1.2.0 # via trio-websocket -zipp==3.8.0 +zipp==3.8.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/3.9.txt b/requirements/3.9.txt index 8d9d6a15..e282ff00 100644 --- a/requirements/3.9.txt +++ b/requirements/3.9.txt @@ -16,34 +16,37 @@ async-generator==1.10 # trio-websocket async-timeout==4.0.2 # via redis -attrs==21.4.0 +attrs==22.1.0 # via # jsonschema # outcome # pytest # trio -babel==2.10.1 +azure-core==1.25.1 + # via azure-cosmos +azure-cosmos==4.3.0 + # via testcontainers +babel==2.10.3 # via sphinx -bcrypt==3.2.2 +bcrypt==4.0.0 # via paramiko cachetools==5.2.0 # via google-auth -certifi==2022.5.18.1 +certifi==2022.9.14 # via # requests - # urllib3 -cffi==1.15.0 + # selenium +cffi==1.15.1 # via - # bcrypt # cryptography # pynacl -charset-normalizer==2.0.12 +charset-normalizer==2.1.1 # via requests -clickhouse-driver==0.2.3 +clickhouse-driver==0.2.4 # via testcontainers codecov==2.1.12 # via -r requirements.in -coverage[toml]==6.4.1 +coverage[toml]==6.4.4 # via # codecov # pytest-cov @@ -51,8 +54,6 @@ cryptography==36.0.2 # via # -r requirements.in # paramiko - # pyopenssl - # urllib3 cx-oracle==8.3.0 # via testcontainers deprecated==1.2.13 @@ -61,7 +62,7 @@ deprecation==2.1.0 # via testcontainers distro==1.7.0 # via docker-compose -docker[ssh]==5.0.3 +docker[ssh]==6.0.0 # via # docker-compose # testcontainers @@ -71,47 +72,46 @@ dockerpty==0.4.1 # via docker-compose docopt==0.6.2 # via docker-compose -docutils==0.18.1 +docutils==0.19 # via sphinx -ecdsa==0.17.0 +ecdsa==0.18.0 # via python-jose entrypoints==0.3 # via flake8 flake8==3.7.9 # via -r requirements.in -google-api-core[grpc]==2.8.1 +google-api-core[grpc]==2.10.1 # via google-cloud-pubsub -google-auth==2.6.6 +google-auth==2.11.0 # via google-api-core -google-cloud-pubsub==1.7.1 +google-cloud-pubsub==1.7.2 # via testcontainers -googleapis-common-protos[grpc]==1.56.2 +googleapis-common-protos[grpc]==1.56.4 # via # google-api-core # grpc-google-iam-v1 # grpcio-status -greenlet==1.1.2 +greenlet==1.1.3 # via sqlalchemy grpc-google-iam-v1==0.12.4 # via google-cloud-pubsub -grpcio==1.46.3 +grpcio==1.48.1 # via # google-api-core # googleapis-common-protos # grpc-google-iam-v1 # grpcio-status -grpcio-status==1.46.3 +grpcio-status==1.48.1 # via google-api-core h11==0.13.0 # via wsproto -idna==3.3 +idna==3.4 # via # requests # trio - # urllib3 -imagesize==1.3.0 +imagesize==1.4.1 # via sphinx -importlib-metadata==4.11.4 +importlib-metadata==4.12.0 # via sphinx iniconfig==1.1.1 # via pytest @@ -125,13 +125,14 @@ markupsafe==2.1.1 # via jinja2 mccabe==0.6.1 # via flake8 -neo4j==4.4.4 +neo4j==5.0.0 # via testcontainers -outcome==1.1.0 +outcome==1.2.0 # via trio packaging==21.3 # via # deprecation + # docker # pytest # redis # sphinx @@ -139,13 +140,14 @@ paramiko==2.11.0 # via docker pg8000==1.29.1 # via -r requirements.in -pika==1.2.1 +pika==1.3.0 # via testcontainers pluggy==1.0.0 # via pytest -protobuf==3.20.1 +protobuf==3.20.2 # via # google-api-core + # google-cloud-pubsub # googleapis-common-protos # grpcio-status psycopg2-binary==2.9.3 @@ -165,11 +167,11 @@ pycparser==2.21 # via cffi pyflakes==2.1.1 # via flake8 -pygments==2.12.0 +pygments==2.13.0 # via sphinx pyjwt==2.4.0 # via python-arango -pymongo==4.1.1 +pymongo==4.2.0 # via testcontainers pymssql==2.2.5 # via testcontainers @@ -177,29 +179,27 @@ pymysql==1.0.2 # via testcontainers pynacl==1.5.0 # via paramiko -pyopenssl==22.0.0 - # via urllib3 pyparsing==3.0.9 # via packaging pyrsistent==0.18.1 # via jsonschema pysocks==1.7.1 # via urllib3 -pytest==7.1.2 +pytest==7.1.3 # via # -r requirements.in # pytest-cov pytest-cov==3.0.0 # via -r requirements.in -python-arango==7.3.4 +python-arango==7.4.1 # via testcontainers -python-dotenv==0.20.0 +python-dotenv==0.21.0 # via docker-compose python-jose==3.3.0 # via python-keycloak -python-keycloak==1.5.0 +python-keycloak==2.5.0 # via testcontainers -pytz==2022.1 +pytz==2022.2.1 # via # babel # clickhouse-driver @@ -208,10 +208,11 @@ pytz-deprecation-shim==0.1.0.post0 # via tzlocal pyyaml==5.4.1 # via docker-compose -redis==4.3.3 +redis==4.3.4 # via testcontainers -requests==2.27.1 +requests==2.28.1 # via + # azure-core # codecov # docker # docker-compose @@ -221,17 +222,20 @@ requests==2.27.1 # requests-toolbelt # sphinx requests-toolbelt==0.9.1 - # via python-arango -rsa==4.8 + # via + # python-arango + # python-keycloak +rsa==4.9 # via # google-auth # python-jose scramp==1.4.1 # via pg8000 -selenium==4.2.0 +selenium==4.4.3 # via testcontainers six==1.16.0 # via + # azure-core # dockerpty # ecdsa # google-auth @@ -239,13 +243,13 @@ six==1.16.0 # jsonschema # paramiko # websocket-client -sniffio==1.2.0 +sniffio==1.3.0 # via trio snowballstemmer==2.2.0 # via sphinx sortedcontainers==2.4.0 # via trio -sphinx==5.0.1 +sphinx==5.1.1 # via -r requirements.in sphinxcontrib-applehelp==1.0.2 # via sphinx @@ -259,7 +263,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sqlalchemy==1.4.37 +sqlalchemy==1.4.41 # via testcontainers texttable==1.6.4 # via docker-compose @@ -267,18 +271,21 @@ tomli==2.0.1 # via # coverage # pytest -trio==0.20.0 +trio==0.21.0 # via # selenium # trio-websocket trio-websocket==0.9.2 # via selenium -tzdata==2022.1 +typing-extensions==4.3.0 + # via azure-core +tzdata==2022.2 # via pytz-deprecation-shim tzlocal==4.2 # via clickhouse-driver -urllib3[secure,socks]==1.26.9 +urllib3[socks]==1.26.12 # via + # docker # python-arango # python-keycloak # requests @@ -291,9 +298,9 @@ wrapt==1.14.1 # via # deprecated # testcontainers -wsproto==1.1.0 +wsproto==1.2.0 # via trio-websocket -zipp==3.8.0 +zipp==3.8.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/setup.py b/setup.py index 5eb48545..9468f56b 100644 --- a/setup.py +++ b/setup.py @@ -68,6 +68,7 @@ 'clickhouse': ['clickhouse-driver'], 'keycloak': ['python-keycloak'], 'arangodb': ['python-arango'], + 'cosmosdb-emulator': ['azure-cosmos'] }, long_description_content_type="text/x-rst", long_description=long_description, diff --git a/testcontainers/cosmosdbemulator.py b/testcontainers/cosmosdbemulator.py new file mode 100644 index 00000000..fdeacd75 --- /dev/null +++ b/testcontainers/cosmosdbemulator.py @@ -0,0 +1,70 @@ +import os +import socket + +from azure.core.exceptions import ServiceRequestError +from azure.cosmos import DatabaseProxy, CosmosClient, ContainerProxy, PartitionKey + +from testcontainers.core.container import DockerContainer +from testcontainers.core.waiting_utils import wait_container_is_ready + + +class CosmosDbEmulatorContainer(DockerContainer): + """ + The azure Cosmos DB emulator is still in preview. + See: https://docs.microsoft.com/en-us/azure/cosmos-db/linux-emulator + Due to the added complexity of installing ca certs on the local machine so that the emulators cert is trusted, this + module only runs with ssl_verify = False and is intended for testing purposes + """ + + AZURE_COSMOS_EMULATOR_PARTITION_COUNT = os.environ.get("AZURE_COSMOS_EMULATOR_PARTITION_COUNT", 3) + AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE = os.environ.get("AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE", + False) + IP_ADDRESS = socket.gethostbyname(socket.gethostname()) + + def __init__(self, + image: str = "mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator", + ssl_verify: bool = False, + port_to_expose: int = 8081, + **kwargs): + super(CosmosDbEmulatorContainer, self).__init__(image=image, **kwargs) + self.ssl_verify = ssl_verify + self.port_to_expose = port_to_expose + self.with_exposed_ports(self.port_to_expose) + self.with_bind_ports(port_to_expose, port_to_expose) + self._configure() + + def _configure(self): + # Additional Ports required by the emulator + for p in range(10251, 10254): + self.with_bind_ports(p, p) + # Other emulator based config as per microsoft docs + self.with_env("AZURE_COSMOS_EMULATOR_PARTITION_COUNT", self.AZURE_COSMOS_EMULATOR_PARTITION_COUNT) + self.with_env("AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE", + self.AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE) + # Bind to ip address + self.with_env("IP_ADDRESS", self.IP_ADDRESS) + + def get_account_key(self): + # This is a static key + return "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" + + def get_connection_url(self): + return f"https://localhost:{self.port_to_expose}/" + + @wait_container_is_ready(ServiceRequestError) + def _connect(self) -> CosmosClient: + client = CosmosClient(self.get_connection_url(), credential=self.get_account_key(), + connection_verify=self.ssl_verify) + return client + + def get_connection_client(self) -> CosmosClient: + return self._connect() + + def boostrap_container(self, db_name: str, container_name: str, container_partition_key: str) -> ContainerProxy: + client = self._connect() + db: DatabaseProxy = client.create_database_if_not_exists(db_name) + print(f"Database '{db_name}' created") + partitioning: PartitionKey = PartitionKey(path=f"/{container_partition_key}", kind='Hash') + container: ContainerProxy = db.create_container(id=container_name, partition_key=partitioning) + print(f"Container '{container_name}' created") + return container diff --git a/tests/test_cosmosdbemulator.py b/tests/test_cosmosdbemulator.py new file mode 100644 index 00000000..1bdf349d --- /dev/null +++ b/tests/test_cosmosdbemulator.py @@ -0,0 +1,27 @@ +from testcontainers.cosmosdbemulator import CosmosDbEmulatorContainer +from azure.cosmos import ContainerProxy + + +def test_cosmosdb_emulator(): + + with CosmosDbEmulatorContainer() as cosmos: + + # Create a new cosmos database as well as container + container_client: ContainerProxy = cosmos.boostrap_container(db_name="mydb", + container_name="mycontainer", + container_partition_key="id") + + # Insert some test data + container_client.create_item({"id": "1", "name": "sally"}) + container_client.create_item({"id": "2", "name": "paul"}) + + # read the newly inserted data + documents = container_client.read_all_items() + + # we expect: to have retrieved 2 documents + count: int = 0 + for document in documents: + count += 1 + assert document['id'] is not None + assert document['name'] is not None + assert count == 2