Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
chore: remove constraints related to db integrity errors (#464)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Chen <schen@edX-C02FW0GUML85.local>
  • Loading branch information
schenedx and Simon Chen authored Mar 16, 2022
1 parent f8fcc39 commit cb8162c
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 476 deletions.
8 changes: 6 additions & 2 deletions registrar/apps/api/v1/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,12 @@ def setUpClass(cls):
logging.getLogger(logger_name).setLevel(logging.INFO)
cls._s3_mock = moto.mock_s3()
cls._s3_mock.start()
conn = boto3.resource('s3', region_name='us-west-1')
conn.create_bucket(Bucket=cls.s3_bucket)
bucket_region = 'us-west-1'
conn = boto3.resource('s3', region_name=bucket_region)
conn.create_bucket(
Bucket=cls.s3_bucket,
CreateBucketConfiguration={'LocationConstraint': bucket_region},
)

@classmethod
def tearDownClass(cls):
Expand Down
8 changes: 3 additions & 5 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,8 @@ edx-rest-api-client==5.5.0
# via -r requirements/base.in
future==0.18.2
# via pyjwkest
idna==2.8
# via
# -c requirements/constraints.txt
# requests
idna==3.3
# via requests
inflection==0.5.1
# via drf-yasg
itypes==1.2.0
Expand All @@ -132,7 +130,7 @@ jinja2==3.0.3
# via coreschema
kombu==4.6.11
# via celery
markupsafe==2.1.0
markupsafe==2.1.1
# via jinja2
monotonic==1.6
# via analytics-python
Expand Down
10 changes: 0 additions & 10 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
# See BOM-2721 for more details.
# Below is the copied and edited version of common_constraints

# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-2721 for more details.
# Below is the copied and edited version of common_constraints

# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-2721 for more details.
# Below is the copied and edited version of common_constraints

# A central location for most common version constraints
# (across edx repos) for pip-installation.
#
Expand Down
3 changes: 0 additions & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ python-slugify<5.0.0
# From production.in
boto3>=1.4.4 # https://github.com/edx/registrar/pull/66

# Constraints required to resolve test failures due to database constraints
moto==1.3.8
idna==2.8

# Constraint responses library to be less than 0.18.0 because version 0.18.0 would remove response._is_string() member function.
# That _is_string() function is used by moto==1.3.8
Expand Down
117 changes: 5 additions & 112 deletions requirements/devstack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,7 @@ astroid==2.9.3
attrs==21.4.0
# via
# -r requirements/local.txt
# jschema-to-python
# jsonschema
# pytest
# sarif-om
aws-sam-translator==1.42.0
# via
# -r requirements/local.txt
# cfn-lint
aws-xray-sdk==2.9.0
# via
# -r requirements/local.txt
# moto
babel==2.9.1
# via
# -r requirements/local.txt
Expand All @@ -50,20 +39,14 @@ billiard==3.6.4.0
# via
# -r requirements/local.txt
# celery
boto==2.49.0
# via
# -r requirements/local.txt
# moto
boto3==1.21.19
# via
# -c requirements/constraints.txt
# -r requirements/local.txt
# aws-sam-translator
# moto
botocore==1.24.19
# via
# -r requirements/local.txt
# aws-xray-sdk
# boto3
# moto
# s3transfer
Expand All @@ -80,10 +63,6 @@ cffi==1.15.0
# via
# -r requirements/local.txt
# cryptography
cfn-lint==0.58.3
# via
# -r requirements/local.txt
# moto
charset-normalizer==2.0.12
# via
# -r requirements/local.txt
Expand Down Expand Up @@ -206,10 +185,6 @@ djangorestframework==3.11.1
# drf-yasg
# edx-api-doc-tools
# edx-drf-extensions
docker==5.0.3
# via
# -r requirements/local.txt
# moto
docutils==0.17.1
# via
# -r requirements/local.txt
Expand All @@ -222,10 +197,6 @@ drf-yasg==1.20.0
# via
# -r requirements/local.txt
# edx-api-doc-tools
ecdsa==0.17.0
# via
# -r requirements/local.txt
# python-jose
edx-api-doc-tools==1.6.0
# via -r requirements/local.txt
edx-auth-backends==4.1.0
Expand Down Expand Up @@ -267,7 +238,6 @@ freezegun==1.2.0
future==0.18.2
# via
# -r requirements/local.txt
# aws-xray-sdk
# pyjwkest
gitdb==4.0.9
# via
Expand All @@ -277,11 +247,9 @@ gitpython==3.1.27
# via
# -r requirements/local.txt
# transifex-client
idna==2.8
idna==3.3
# via
# -c requirements/constraints.txt
# -r requirements/local.txt
# moto
# requests
imagesize==1.3.0
# via
Expand Down Expand Up @@ -319,35 +287,6 @@ jmespath==0.10.0
# -r requirements/local.txt
# boto3
# botocore
jschema-to-python==1.2.3
# via
# -r requirements/local.txt
# cfn-lint
jsondiff==1.1.2
# via
# -r requirements/local.txt
# moto
jsonpatch==1.32
# via
# -r requirements/local.txt
# cfn-lint
jsonpickle==2.1.0
# via
# -r requirements/local.txt
# jschema-to-python
jsonpointer==2.2
# via
# -r requirements/local.txt
# jsonpatch
jsonschema==3.2.0
# via
# -r requirements/local.txt
# aws-sam-translator
# cfn-lint
junit-xml==1.9
# via
# -r requirements/local.txt
# cfn-lint
kombu==4.6.11
# via
# -r requirements/local.txt
Expand All @@ -356,32 +295,23 @@ lazy-object-proxy==1.7.1
# via
# -r requirements/local.txt
# astroid
markupsafe==2.1.0
markupsafe==2.1.1
# via
# -r requirements/local.txt
# jinja2
# moto
mccabe==0.6.1
# via
# -r requirements/local.txt
# pylint
mock==4.0.3
# via
# -r requirements/local.txt
# moto
monotonic==1.6
# via
# -r requirements/local.txt
# analytics-python
moto==1.3.8
# via
# -c requirements/constraints.txt
# -r requirements/local.txt
moto==3.1.0
# via -r requirements/local.txt
mysqlclient==2.1.0
# via -r requirements/nonlocal.txt
networkx==2.7.1
# via
# -r requirements/local.txt
# cfn-lint
newrelic==5.24.0.153
# via
# -c requirements/constraints.txt
Expand Down Expand Up @@ -411,8 +341,6 @@ pathspec==0.9.0
pbr==5.8.1
# via
# -r requirements/local.txt
# jschema-to-python
# sarif-om
# stevedore
platformdirs==2.5.1
# via
Expand All @@ -437,11 +365,6 @@ py==1.11.0
# -r requirements/local.txt
# pytest
# tox
pyasn1==0.4.8
# via
# -r requirements/local.txt
# python-jose
# rsa
pycodestyle==2.8.0
# via -r requirements/local.txt
pycparser==2.21
Expand Down Expand Up @@ -496,10 +419,6 @@ pyparsing==3.0.7
# via
# -r requirements/local.txt
# packaging
pyrsistent==0.18.1
# via
# -r requirements/local.txt
# jsonschema
pytest==7.1.0
# via
# -r requirements/local.txt
Expand All @@ -519,10 +438,6 @@ python-dateutil==2.8.2
# freezegun
# moto
# ruamel-yaml-convert
python-jose==3.3.0
# via
# -r requirements/local.txt
# moto
python-memcached==1.59
# via -r requirements/nonlocal.txt
python-slugify==4.0.1
Expand All @@ -547,11 +462,9 @@ pywatchman==1.4.1
pyyaml==6.0
# via
# -r requirements/local.txt
# cfn-lint
# code-annotations
# edx-django-release-util
# edx-i18n-tools
# moto
# yamllint
redis==4.1.4
# via -r requirements/local.txt
Expand All @@ -560,7 +473,6 @@ requests==2.27.1
# -r requirements/local.txt
# analytics-python
# coreapi
# docker
# edx-drf-extensions
# edx-rest-api-client
# moto
Expand All @@ -580,10 +492,6 @@ responses==0.17.0
# -c requirements/constraints.txt
# -r requirements/local.txt
# moto
rsa==4.8
# via
# -r requirements/local.txt
# python-jose
ruamel-yaml==0.17.21
# via
# -r requirements/local.txt
Expand All @@ -609,10 +517,6 @@ s3transfer==0.5.2
# via
# -r requirements/local.txt
# boto3
sarif-om==1.0.4
# via
# -r requirements/local.txt
# cfn-lint
semantic-version==2.9.0
# via
# -r requirements/local.txt
Expand All @@ -622,19 +526,13 @@ six==1.16.0
# -r requirements/local.txt
# -r requirements/nonlocal.txt
# analytics-python
# aws-sam-translator
# cfn-lint
# configobj
# django-dynamic-fixture
# ecdsa
# edx-auth-backends
# edx-django-release-util
# edx-drf-extensions
# edx-lint
# edx-sphinx-theme
# jsonschema
# junit-xml
# moto
# pyjwkest
# python-dateutil
# python-memcached
Expand Down Expand Up @@ -746,10 +644,6 @@ virtualenv==20.13.3
# via
# -r requirements/local.txt
# tox
websocket-client==1.3.1
# via
# -r requirements/local.txt
# docker
werkzeug==2.0.3
# via
# -r requirements/local.txt
Expand All @@ -759,7 +653,6 @@ wrapt==1.13.3
# -c requirements/constraints.txt
# -r requirements/local.txt
# astroid
# aws-xray-sdk
# deprecated
xmltodict==0.12.0
# via
Expand Down
8 changes: 3 additions & 5 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ docutils==0.17.1
# via sphinx
edx-sphinx-theme==3.0.0
# via -r requirements/docs.in
idna==2.8
# via
# -c requirements/constraints.txt
# requests
idna==3.3
# via requests
imagesize==1.3.0
# via sphinx
importlib-metadata==4.11.3
# via sphinx
jinja2==3.0.3
# via sphinx
markupsafe==2.1.0
markupsafe==2.1.1
# via jinja2
packaging==21.3
# via sphinx
Expand Down
Loading

0 comments on commit cb8162c

Please sign in to comment.