Skip to content

Conversation

@deborahgu
Copy link
Member

  • Upgrade Python requirements. This brings in the security patch for django.
  • letting the breaking changes on black reformat: black 26.0.1 contains breaking changes, including enforcing the number of lines after the imports. Rather than reconfiguring black this is a one time reformat to make these files compliant with the out-of-the-box standard.
  • updating isort config: Making the configuration for isort match the new configuration for black

Run JavaScript tests locally with Karma

There is work being done on a fix to get Karma to run in CI. Until then, however, contributors are required to run these tests locally.

  • Make sure you are inside the devstack container
  • Run make test-karma
  • All tests pass

* chore: Upgrade Python requirements

* chore: letting the breaking changes on black reformat

[black  26.0.1](https://github.com/psf/black/blob/main/CHANGES.md#2610)
contains breaking changes, including enforcing the number of lines after
the imports. Rather than reconfiguring black this is a one time reformat
to make these files compliant with the out-of-the-box standard.

* chore: updating requirements

ran make upgrade to deal with the conflict, which incidentally will also bring in the security patch for django

* chore: updating isort config

Making the configuration for isort match the new configuration for black

---------

Co-authored-by: Deborah Kaplan <[email protected]>
Copilot AI review requested due to automatic review settings February 3, 2026 20:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades Python dependencies (most notably Django) to pick up security fixes, aligns code formatting with the latest Black/isort behavior, and refreshes some metadata like translation copyright years.

Changes:

  • Bumps Django to 5.2.11 and upgrades a broad set of runtime, dev, test, docs, and tooling dependencies across all requirements files, adding a shared Django<6.0 and pip<26.0 constraint.
  • Updates Black and isort configuration (removing lines_after_imports) and reformats many modules to satisfy the new import/blank-line rules.
  • Updates translation .po file headers to the 2026 copyright year.

Reviewed changes

Copilot reviewed 124 out of 124 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
requirements/translations.txt Updates Django/asgiref/sqlparse versions used for i18n tooling and ties Django to the shared constraints file.
requirements/test.txt Refreshes testing and toolchain dependencies (e.g., pytest, black, isort, Google Cloud stack, redis) to newer versions; note duplicate package lines introduced.
requirements/production.txt Upgrades production dependency pins (Django stack, Google Cloud, boto3/botocore, gunicorn, redis, etc.); note duplicate package lines introduced.
requirements/pip_tools.txt Bumps build, click, packaging, pip-tools, and wheel used for requirement compilation; introduces a duplicate click line.
requirements/pip.txt Updates packaging, wheel, pip, and setuptools and annotates pip as coming via common_constraints.txt.
requirements/docs.txt Updates Sphinx and related doc build dependencies; introduces a duplicate beautifulsoup4 entry.
requirements/django.txt Pins Django to 5.2.11 for convenience.
requirements/dev.txt Refreshes dev-time requirements (e.g., black/isort, mypy, redis, Google Cloud libs) and inherits the new Django version; introduces several duplicate requirement lines.
requirements/common_constraints.txt Adds shared Django<6.0 LTS constraint and pip<26.0 constraint with rationale; currently duplicates the Django<6.0 line.
requirements/base.txt Updates core runtime dependency pins (Django, Google Cloud suite, redis, cryptography, etc.) and references the shared Django constraint; introduces duplicate entries for several packages.
requirements/all.txt Recompiles the aggregate requirements to reflect all other requirement updates; contains multiple pairs of duplicate package lines.
pyproject.toml Removes lines_after_imports from the isort config to align with Black’s new import-spacing behavior.
credentials/wsgi.py Removes an extra blank line after imports per updated formatting rules.
credentials/urls.py Removes an extra blank line between imports and admin setup to satisfy new Black style.
credentials/settings/base.py Normalizes spacing between imports and configuration constants.
credentials/docker_gunicorn_configuration.py Removes superfluous blank line before Gunicorn config variables.
credentials/conf/locale/rtl/LC_MESSAGES/djangojs.po Updates translation header year from 2025 to 2026.
credentials/conf/locale/rtl/LC_MESSAGES/django.po Updates translation header year from 2025 to 2026.
credentials/conf/locale/eo/LC_MESSAGES/djangojs.po Updates translation header year from 2025 to 2026.
credentials/conf/locale/eo/LC_MESSAGES/django.po Updates translation header year from 2025 to 2026.
credentials/conf/locale/en/LC_MESSAGES/djangojs.po Updates translation header year from 2025 to 2026.
credentials/conf/locale/en/LC_MESSAGES/django.po Updates translation header year from 2025 to 2026.
credentials/apps/verifiable_credentials/urls.py Removes redundant blank line between imports and urlpatterns.
credentials/apps/verifiable_credentials/toggles.py Removes redundant blank line before toggle documentation comments.
credentials/apps/verifiable_credentials/settings.py Normalizes spacing before logger definition.
credentials/apps/verifiable_credentials/rest_api/v1/views.py Adjusts blank lines and slightly reformats a translatable error message to keep it on a single line.
credentials/apps/verifiable_credentials/rest_api/v1/urls.py Removes extra blank line before router setup.
credentials/apps/verifiable_credentials/rest_api/v1/tests/test_views.py Removes extra blank line before JSON_CONTENT_TYPE constant.
credentials/apps/verifiable_credentials/rest_api/urls.py Normalizes spacing before urlpatterns.
credentials/apps/verifiable_credentials/permissions.py Normalizes spacing before logger setup.
credentials/apps/verifiable_credentials/management/commands/tests/test_create_default_issuer.py Removes extra blank line before logger definition.
credentials/apps/verifiable_credentials/management/commands/remove_issuance_configuration.py Removes extra blank line before logger definition.
credentials/apps/verifiable_credentials/management/commands/generate_status_list.py Removes extra blank line before logger definition.
credentials/apps/verifiable_credentials/management/commands/generate_issuer_credentials.py Removes extra blank line before logger definition.
credentials/apps/verifiable_credentials/management/commands/create_default_issuer.py Removes extra blank line before logger definition.
credentials/apps/verifiable_credentials/issuance/tests/test_status_list.py Removes extra blank line before LOGGER_NAME.
credentials/apps/verifiable_credentials/issuance/tests/test_main.py Removes extra blank line before LOGGER_NAME.
credentials/apps/verifiable_credentials/issuance/status_list.py Normalizes spacing before logger definition.
credentials/apps/verifiable_credentials/issuance/models.py Normalizes spacing before User = get_user_model().
credentials/apps/verifiable_credentials/issuance/main.py Normalizes spacing before logger definition.
credentials/apps/verifiable_credentials/conftest.py Adds a blank line after the module docstring and removes an extra blank line before TEST_ISSUER_CONFIG to satisfy formatting rules.
credentials/apps/verifiable_credentials/composition/status_list.py Removes extra blank line before STATUS_LIST_PURPOSE.
credentials/apps/records/views.py Removes extra blank line before a TYPE_CHECKING block.
credentials/apps/records/utils.py Removes extra blank line before a TYPE_CHECKING block.
credentials/apps/records/urls.py Normalizes spacing before urlpatterns.
credentials/apps/records/tests/test_views.py Removes extra blank line before JSON_CONTENT_TYPE.
credentials/apps/records/rest_api/v1/views.py Normalizes spacing before User = get_user_model().
credentials/apps/records/rest_api/v1/urls.py Normalizes spacing before DRF router setup.
credentials/apps/records/rest_api/urls.py Normalizes spacing before urlpatterns.
credentials/apps/records/management/commands/seed-records.py Normalizes spacing before logger definition.
credentials/apps/records/api.py Removes extra blank line before TYPE_CHECKING section.
credentials/apps/plugins/constants.py Removes extra blank line before PROJECT_TYPE.
credentials/apps/edx_django_extensions/views.py Normalizes spacing before logger definition.
credentials/apps/edx_django_extensions/urls.py Normalizes spacing before urlpatterns.
credentials/apps/credentials/views.py Normalizes spacing before logger definition.
credentials/apps/credentials/utils.py Removes extra blank line before TYPE_CHECKING section.
credentials/apps/credentials/urls.py Normalizes spacing before urlpatterns.
credentials/apps/credentials/tests/test_utils.py Normalizes spacing before User = get_user_model().
credentials/apps/credentials/tests/test_models.py Normalizes spacing before TEST_DATA_ROOT.
credentials/apps/credentials/tests/test_issuer.py Normalizes spacing before User and LOGGER_NAME.
credentials/apps/credentials/tests/test_apps.py Normalizes spacing before LOGGER_NAME.
credentials/apps/credentials/tests/factories.py Removes extra blank line before TYPE_CHECKING block.
credentials/apps/credentials/templatetags/i18n_assets.py Normalizes spacing before template tag registration and logger.
credentials/apps/credentials/templatetags/html.py Normalizes spacing before template tag registration.
credentials/apps/credentials/signals.py Normalizes spacing before logger definition.
credentials/apps/credentials/rest_api/v1/views.py Normalizes spacing before module log logger.
credentials/apps/credentials/rest_api/v1/urls.py Normalizes spacing before urlpatterns.
credentials/apps/credentials/rest_api/v1/tests/test_views.py Removes extra blank line before TYPE_CHECKING definitions.
credentials/apps/credentials/rest_api/urls.py Normalizes spacing before comment and urlpatterns.
credentials/apps/credentials/models.py Removes extra blank line before TYPE_CHECKING block.
credentials/apps/credentials/messages.py Normalizes spacing before logger definition.
credentials/apps/credentials/management/commands/tests/test_create_program_certificate_configuration.py Normalizes spacing before COMMAND constant.
credentials/apps/credentials/management/commands/revoke_certificates.py Removes extra blank line before TYPE_CHECKING section.
credentials/apps/credentials/management/commands/populate_missing_courserun_info.py Removes extra blank line before TYPE_CHECKING section.
credentials/apps/credentials/management/commands/create_program_certificate_configuration.py Normalizes spacing before logger definition.
credentials/apps/credentials/issuers.py Normalizes spacing before logger definition.
credentials/apps/credentials/apps.py Normalizes spacing before module-level logger.
credentials/apps/credentials/api.py Removes extra blank line before TYPE_CHECKING block.
credentials/apps/core/views.py Normalizes spacing before logger and User assignment.
credentials/apps/core/tests/test_views.py Normalizes spacing before User = get_user_model().
credentials/apps/core/tests/test_context_processors.py Normalizes spacing before LANGUAGE_CODE.
credentials/apps/core/tests/mixins.py Normalizes spacing before JSON constant.
credentials/apps/core/tests/factories.py Normalizes spacing before USER_PASSWORD constant.
credentials/apps/core/management/commands/truncate_social_auth.py Normalizes spacing before logger and User.
credentials/apps/core/management/commands/tests/test_truncate_social_auth.py Normalizes spacing before User and constants.
credentials/apps/core/management/commands/tests/test_sync_ids_from_platform.py Normalizes spacing before User and JSON.
credentials/apps/core/management/commands/tests/test_make_is_active_match_platform.py Normalizes spacing before User and JSON.
credentials/apps/core/management/commands/sync_ids_from_platform.py Normalizes spacing before logger and User.
credentials/apps/core/management/commands/make_is_active_match_platform.py Normalizes spacing before TYPE_CHECKING block.
credentials/apps/core/management/commands/create_or_update_site.py Normalizes spacing before logger definition.
credentials/apps/core/api.py Normalizes spacing before User and logger.
credentials/apps/catalog/utils.py Normalizes spacing before logger definition.
credentials/apps/catalog/tests/test_api.py Removes extra blank line before TYPE_CHECKING section.
credentials/apps/catalog/models.py Normalizes spacing before logger definition.
credentials/apps/catalog/management/commands/copy_catalog.py Normalizes spacing before logger definition.
credentials/apps/badges/urls.py Normalizes spacing before urlpatterns.
credentials/apps/badges/toggles.py Removes extra blank line before toggle documentation.
credentials/apps/badges/tests/test_utils.py Normalizes spacing before COURSE_PASSING_EVENT constant.
credentials/apps/badges/tests/test_services.py Normalizes spacing before constants block.
credentials/apps/badges/tests/test_issuers.py Normalizes spacing before User.
credentials/apps/badges/tests/test_admin_forms.py Normalizes spacing before COURSE_PASSING_EVENT.
credentials/apps/badges/signals/signals.py Normalizes spacing before logger definition.
credentials/apps/badges/signals/handlers.py Normalizes spacing before logger definition.
credentials/apps/badges/processing/regression.py Normalizes spacing before logger definition.
credentials/apps/badges/processing/progression.py Normalizes spacing before logger definition.
credentials/apps/badges/processing/generic.py Normalizes spacing before logger definition.
credentials/apps/badges/models.py Normalizes spacing before logger definition.
credentials/apps/badges/management/commands/sync_organization_badge_templates.py Normalizes spacing before logger definition.
credentials/apps/badges/issuers.py Normalizes spacing before revocation state mapping.
credentials/apps/badges/credly/webhooks.py Normalizes spacing before logger definition.
credentials/apps/badges/credly/api_client.py Normalizes spacing before logger definition.
credentials/apps/badges/base_api_client.py Normalizes spacing before logger definition.
credentials/apps/badges/admin.py Adjusts spacing and Black formatting of long translated admin descriptions while keeping content intact.
credentials/apps/badges/accredible/api_client.py Normalizes spacing before logger definition.
credentials/apps/api/v2/views.py Normalizes spacing before module logger.
credentials/apps/api/v2/urls.py Normalizes spacing before comment block.
credentials/apps/api/v2/tests/test_views.py Normalizes spacing before JSON_CONTENT_TYPE and logger name constants.
credentials/apps/api/v2/serializers.py Removes extra blank line before TYPE_CHECKING block.
credentials/apps/api/v2/decorators.py Normalizes spacing before logger definition.
credentials/apps/api/urls.py Normalizes spacing before urlpatterns.
credentials/apps/api/tests/test_accreditors.py Normalizes spacing before LOGGER_NAME.
credentials/apps/api/tests/mixins.py Normalizes spacing before JWT_AUTH.
credentials/apps/api/authentication.py Normalizes spacing before logger definition.
credentials/apps/api/accreditors.py Normalizes spacing before logger definition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 15 to 17
beautifulsoup4==4.14.3
beautifulsoup4==4.14.3
# via pydata-sphinx-theme
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautifulsoup4==4.14.3 is listed twice consecutively, which is redundant for a generated requirements file. Please deduplicate this entry (and any similar ones) so that each package is pinned only once.

Copilot uses AI. Check for mistakes.
Comment on lines 9 to 11
click==8.3.1
click==8.3.1
# via pip-tools
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

click==8.3.1 appears twice in a row, which suggests the pip-compile output was duplicated. Please update this file so each requirement is present only once to avoid confusion in dependency management tooling.

Copilot uses AI. Check for mistakes.
Comment on lines 36 to 38
bleach==6.3.0
bleach==6.3.0
# via
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several duplicate requirement lines in this section (for example, bleach==6.3.0 appears twice back-to-back). Since this file is advertised as pip-compile output, it should list each requirement only once; please regenerate or clean it up to remove redundant entries.

Copilot uses AI. Check for mistakes.
Comment on lines 20 to 21
Django<6.0
Django<6.0
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Django<6.0 is declared twice in a row, which is redundant for a global constraint file. Please keep only a single Django<6.0 line here to avoid confusion when reading or updating constraints.

Copilot uses AI. Check for mistakes.
Comment on lines 19 to 23
bleach==6.3.0
bleach==6.3.0
# via -r requirements/base.in
cachecontrol==0.14.3
cachecontrol==0.14.4
cachecontrol==0.14.4
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are duplicate requirement entries here (e.g., bleach==6.3.0 and cachecontrol==0.14.4 appear twice in a row). These files are meant to be generated by pip-compile with each package pinned once, so please deduplicate these entries (ideally by re-running make upgrade / pip-compile) to keep the lockfile clean and avoid confusion.

Copilot uses AI. Check for mistakes.
Comment on lines 31 to 36
bleach==6.3.0
bleach==6.3.0
# via -r requirements/base.txt
cachecontrol==0.14.3
cachecontrol==0.14.4
cachecontrol==0.14.4
# via
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bleach==6.3.0 (and possibly other packages) is listed twice in succession, which suggests the requirements file generation produced duplicate lines. Please regenerate or clean up the file so that each requirement appears only once to keep the lockfile consistent and easier to maintain.

Copilot uses AI. Check for mistakes.
Comment on lines 25 to 36
bleach==6.3.0
bleach==6.3.0
# via -r requirements/base.txt
boto3==1.40.55
boto3==1.42.40
# via django-ses
botocore==1.40.55
botocore==1.42.40
# via
# boto3
# s3transfer
cachecontrol==0.14.3
cachecontrol==0.14.4
cachecontrol==0.14.4
# via
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bleach==6.3.0 and cachecontrol==0.14.4 are duplicated back-to-back here, which is unexpected for a pip-compile output. Consider regenerating or editing this lockfile so each requirement is pinned only once.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

maybe the merge  introduced duplicate lines. Ran make upgrade in order to clean them up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants