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

chore: Upgrade Python requirements #11

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions registrar/apps/api/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
logger = logging.getLogger(__name__)


# pylint: disable=too-many-positional-arguments
def track(
user_id,
event,
Expand Down
1 change: 1 addition & 0 deletions registrar/apps/api/tests/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def delete(self, path, user):
"""
return self.request('delete', path, user)

# pylint: disable=too-many-positional-arguments
def request(self, method, path, user, data=None, file=None):
"""
Perform an HTTP request of the given method.
Expand Down
2 changes: 2 additions & 0 deletions registrar/apps/api/v1/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def _add_programs_to_cache(self):
self._add_program_to_cache(program)

@classmethod
# pylint: disable=too-many-positional-arguments
def _add_program_to_cache(cls, program, title=None, url=None, program_type="Masters", curricula=None):
"""
Adds the given program to the program cache
Expand Down Expand Up @@ -543,6 +544,7 @@ def test_details_loaded_only_for_necessary_program(self, get_details_wrapper):
},
)
@ddt.unpack
# pylint: disable=too-many-positional-arguments
def test_program_filters(
self,
groups=frozenset(),
Expand Down
2 changes: 1 addition & 1 deletion registrar/apps/core/management/commands/create_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def add_arguments(self, parser):
parser.add_argument('--staff', dest='is_staff', action='store_true')
parser.add_argument('-g', '--groups', dest='group_names', nargs='*', default=[])

# pylint: disable=arguments-differ
# pylint: disable=arguments-differ, too-many-positional-arguments
@transaction.atomic
def handle(self, username, email, is_superuser, is_staff, group_names, *args, **options):
user = self.make_user(username, email, is_superuser, is_staff)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def setUpTestData(cls):
cls.org3group = OrganizationGroupFactory().name
cls.all_groups = [cls.org1group_1, cls.org1group_2, cls.org2group, cls.org3group]

# pylint: disable=too-many-positional-arguments
def assert_user(
self,
user,
Expand Down
2 changes: 1 addition & 1 deletion registrar/apps/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def access_token(self):
"""
try:
return self.social_auth.first().extra_data['access_token'] # pylint: disable=no-member
except Exception: # pylint: disable=broad-except
except Exception:
return None

class Meta:
Expand Down
4 changes: 2 additions & 2 deletions registrar/apps/core/rest_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def make_request(method, url, client, **kwargs):
an authN'd client.
"""
if method not in ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']: # pragma: no cover
raise Exception('invalid http method: ' + method) # pylint: disable=broad-exception-raised
raise Exception('invalid http method: ' + method)

if not client:
client = get_client(settings.LMS_BASE_URL)
Expand All @@ -102,5 +102,5 @@ def get_client(host_base_url):
)
client._ensure_authentication() # pylint: disable=protected-access
if not client.auth.token: # pragma: no cover
raise Exception('No Auth Token') # pylint: disable=broad-exception-raised
raise Exception('No Auth Token')
return client
2 changes: 1 addition & 1 deletion registrar/apps/core/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def groups(self, create, extracted, **kwargs): # pylint: disable=unused-argumen
return

for group in extracted:
self.groups.add(group) # pylint: disable=no-member
self.groups.add(group)


def name_to_key(name):
Expand Down
1 change: 1 addition & 0 deletions registrar/apps/core/tests/test_auth_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ def setUp(self):
},
)
@ddt.unpack
# pylint: disable=too-many-positional-arguments
def test_get_programs_by_api_permission(
self,
group_names,
Expand Down
1 change: 1 addition & 0 deletions registrar/apps/core/tests/test_filestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def tearDown(self):
)
)
@ddt.unpack
# pylint: disable=too-many-positional-arguments
def test_s3_filestore(self, bucket, location, prefix, path, contents):
filestore = get_filestore(bucket, prefix)
with mock.patch.object(filestore.backend, 'location', new=location):
Expand Down
4 changes: 3 additions & 1 deletion registrar/apps/enrollments/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def generate_name(cls, arguments_dict):
)


# pylint: disable=unused-argument
# pylint: disable=unused-argument, too-many-positional-arguments
@shared_task(base=EnrollmentReadTask, bind=True)
def list_program_enrollments(self, job_id, user_id, file_format, program_key, include_username_email=False):
"""
Expand Down Expand Up @@ -86,6 +86,7 @@ def list_program_enrollments(self, job_id, user_id, file_format, program_key, in


@shared_task(base=EnrollmentReadTask, bind=True)
# pylint: disable=too-many-positional-arguments
def list_course_run_enrollments(
self,
job_id,
Expand Down Expand Up @@ -135,6 +136,7 @@ def list_course_run_enrollments(


@shared_task(base=EnrollmentReadTask, bind=True)
# pylint: disable=too-many-positional-arguments
def list_all_course_run_enrollments(
self,
job_id,
Expand Down
2 changes: 1 addition & 1 deletion registrar/apps/grades/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


@shared_task(base=UserTask, bind=True)
# pylint: disable=unused-argument
# pylint: disable=unused-argument, too-many-positional-arguments
def get_course_run_grades(self, job_id, user_id, file_format, program_key, internal_course_key):
"""
A user task that reads course run grade data from the LMS, and writes it to
Expand Down
64 changes: 33 additions & 31 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ asgiref==3.8.1
# django-cors-headers
backoff==1.10.0
# via analytics-python
billiard==4.2.0
billiard==4.2.1
# via celery
celery==5.4.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# django-user-tasks
certifi==2024.7.4
certifi==2024.8.30
# via requests
cffi==1.17.0
cffi==1.17.1
# via
# cryptography
# pynacl
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via requests
click==8.1.7
# via
Expand All @@ -42,15 +42,15 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
cryptography==43.0.0
cryptography==43.0.3
# via
# pyjwt
# social-auth-core
defusedxml==0.8.0rc2
# via
# python3-openid
# social-auth-core
django==4.2.15
django==4.2.16
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
Expand All @@ -73,7 +73,7 @@ django==4.2.15
# edx-django-utils
# edx-drf-extensions
# social-auth-app-django
django-cors-headers==4.4.0
django-cors-headers==4.5.0
# via -r requirements/base.in
django-crum==0.7.9
# via edx-django-utils
Expand All @@ -83,7 +83,7 @@ django-extensions==3.1.5
# -r requirements/base.in
django-guardian==2.4.0
# via -r requirements/base.in
django-model-utils==4.5.1
django-model-utils==5.0.0
# via
# -r requirements/base.in
# django-user-tasks
Expand All @@ -110,35 +110,35 @@ djangorestframework==3.15.2
# drf-yasg
# edx-api-doc-tools
# edx-drf-extensions
dnspython==2.6.1
dnspython==2.7.0
# via pymongo
drf-jwt==1.19.2
# via edx-drf-extensions
drf-yasg==1.21.7
drf-yasg==1.21.8
# via
# django-user-tasks
# edx-api-doc-tools
edx-api-doc-tools==1.8.0
edx-api-doc-tools==2.0.0
# via -r requirements/base.in
edx-auth-backends==4.3.0
edx-auth-backends==4.4.0
# via -r requirements/base.in
edx-django-release-util==1.4.0
# via -r requirements/base.in
edx-django-utils==5.15.0
edx-django-utils==7.0.0
# via
# edx-drf-extensions
# edx-rest-api-client
edx-drf-extensions==10.3.0
edx-drf-extensions==10.4.0
# via -r requirements/base.in
edx-opaque-keys==2.10.0
edx-opaque-keys==2.11.0
# via edx-drf-extensions
edx-rest-api-client==5.7.1
edx-rest-api-client==6.0.0
# via -r requirements/base.in
idna==3.7
idna==3.10
# via requests
inflection==0.5.1
# via drf-yasg
kombu==5.4.0
kombu==5.4.2
# via celery
monotonic==1.6
# via analytics-python
Expand All @@ -152,11 +152,11 @@ oauthlib==3.2.2
# social-auth-core
packaging==24.1
# via drf-yasg
pbr==6.0.0
pbr==6.1.0
# via stevedore
prompt-toolkit==3.0.47
prompt-toolkit==3.0.48
# via click-repl
psutil==6.0.0
psutil==6.1.0
# via edx-django-utils
pycparser==2.22
# via cffi
Expand All @@ -167,7 +167,7 @@ pyjwt[crypto]==2.9.0
# edx-drf-extensions
# edx-rest-api-client
# social-auth-core
pymongo==4.8.0
pymongo==4.10.1
# via edx-opaque-keys
pynacl==1.5.0
# via edx-django-utils
Expand All @@ -181,23 +181,22 @@ python-slugify==4.0.1
# -r requirements/base.in
python3-openid==3.2.0
# via social-auth-core
pytz==2024.1
pytz==2024.2
# via
# -r requirements/base.in
# drf-yasg
pyyaml==6.0.2
# via
# drf-yasg
# edx-django-release-util
redis==5.0.8
redis==5.1.1
# via -r requirements/base.in
requests==2.32.3
# via
# analytics-python
# edx-drf-extensions
# edx-rest-api-client
# requests-oauthlib
# slumber
# social-auth-core
requests-oauthlib==2.0.0
# via social-auth-core
Expand All @@ -209,8 +208,6 @@ six==1.16.0
# edx-auth-backends
# edx-django-release-util
# python-dateutil
slumber==0.7.1
# via edx-rest-api-client
social-auth-app-django==5.4.2
# via
# -r requirements/base.in
Expand All @@ -221,19 +218,21 @@ social-auth-core==4.5.4
# social-auth-app-django
sqlparse==0.5.1
# via django
stevedore==5.2.0
stevedore==5.3.0
# via
# edx-django-utils
# edx-opaque-keys
text-unidecode==1.3
# via python-slugify
typing-extensions==4.12.2
# via edx-opaque-keys
tzdata==2024.1
# via celery
tzdata==2024.2
# via
# celery
# kombu
uritemplate==4.1.1
# via drf-yasg
urllib3==1.26.19
urllib3==1.26.20
# via
# -c requirements/constraints.txt
# requests
Expand All @@ -244,3 +243,6 @@ vine==5.1.0
# kombu
wcwidth==0.2.13
# via prompt-toolkit

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading
Loading