* feat: use new version of openedx-core
* feat: Use openedx_catalog app, backfill it with all known courses
* feat: properly set "created" timestamp on course runs during backfill
* fix: better normalization of language codes
* feat: keep courses in sync with CourseRun/CatalogCourse
* feat: delete CourseRun/CatalogCourse when deleting a course
* refactor: course_id -> course_key, run -> run_code, display_name -> title
* fix: don't use SplitModulestoreCourseIndex for getting list of all courses
fix: lms config 400 errors when editing SAP etc
Commit generated by workflow `openedx/openedx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
* feat: add ruff and configure it to match current pycodestyle rules
Adds ruff to testing requirements and configures it in pyproject.toml
to enforce the same E/W rules that pycodestyle 2.8.x was enforcing.
Two additional rules (E714, E721) that pycodestyle 2.8.x did not enforce
are explicitly ignored for now and can be cleaned up in a follow-up.
Part of the migration from pycodestyle → ruff.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add ruff Makefile target
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add ruff to quality CI workflow alongside pycodestyle
Runs ruff alongside pycodestyle so we can validate parity before
removing pycodestyle in the next commit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: remove pycodestyle, replaced by ruff
- Remove pycodestyle from requirements
- Remove pycodestyle version constraint (pinned to <2.9.0 due to a
false positive E275 bug that is no longer relevant)
- Remove [pycodestyle] config from setup.cfg (config now lives in
pyproject.toml under [tool.ruff])
- Remove pycodestyle Makefile target
- Remove make pycodestyle from quality CI workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style: Apply suggestions from code review
Remove unnecessary ignores.
Co-authored-by: Braden MacDonald <braden@opencraft.com>
* style: Fix a style isusue and remove ignores.
Most of these ignores are unnecessary as we're passing them now and we
want to check them in the future. E714 only had one fixable violation so
we just fixed it.
* style: Update ruff config and workflows
* Update the call to `ruff` so that it outputs in a github friendly
manner.
* Remove ruff exclusions that are already covered by .gitignore which
ruff respects.
* chore: Recompile requirements.
Update the requirements to drop pycodestyle and add ruff.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Braden MacDonald <braden@opencraft.com>
Update documentation, comments, and docstrings throughout the codebase
to reflect the migration from setup.py to pyproject.toml:
- Transformer class docstrings: changed to reference "entry point name
in the package configuration" for better future-proofing
- Block structure module docs: updated to reference pyproject.toml
- Test file comments: updated entry point references
- Config files (tox.ini, pytest.ini): updated references
- Documentation (extension_points.rst, course apps ADRs): updated to
reference pyproject.toml with inclusive language for external packages
- Requirements documentation (github.in): updated with inclusive language
- edxmako README: modernized install command to use pip install
Historical ADRs and references to external packages that may still use
setup.py were intentionally left unchanged or updated with inclusive
language acknowledging both pyproject.toml and setup.py.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
djangorestframework-stubs==3.16.8 dropped types-requests as a
transitive dependency. Since edx-platform uses the requests library
directly, we need to pin types-requests explicitly so that mypy can
type-check our code correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The latest version of pylint pins back astroid to an older version. This
hold back is not caught in the docs requirements file and since both the
docs and testing file are required in the development.in file, we fail
to compile development.txt because of conflicting dependencies.
Holding astroid back until pylint releases a new version that works with
the latest version of astroid.
Created https://github.com/openedx/openedx-platform/issues/38066 to undo
this.
BREAKING CHANGE: The `pdf` XBlock is now built into the platform core and
installed by default. If you previously installed a third-party pdf
implementation such as https://github.com/open-craft/xblock-pdf, then the
built-in implementation will likely work as a drop-in replacement, so you can
uninstall the third-party implementation. However, if you’d rather continue
using a third-party pdf implementation, then use the `xblock.v1.overrides`
entrypoint. In either case, the third-party implementation must be removed from
the `xblock.v1` entrypoint, otherwise you will see an AmbiguousPluginError.
Co-Authored-By: Kyle McCormick <kyle@axim.org>
refactor: remove some 'max_length=255' to be more DRY
feat: example of making an OpaqueKeyField case_sensitive (modulestore_migrator)
test: update test now that we're using case-insensitive collation on SQLite
Update our calls to the openedx_content API to reflect 0.35.0's shift
in terminology from "contents" to "media".
---------
Co-authored-by: Kyle McCormick <kyle@axim.org>
build!: Switch to openedx-core (renamed from openedx-learning)
Instead of installing openedx-learning==0.32.0, we install openedx-core==0.34.1.
We update various class names, function names, docstrings, and comments to
represent the rename:
* We say "openedx-core" when referring to the whole repo or PyPI project
* or occasionally "Open edX Core" if we want it to look nice in the docs.
* We say "openedx_content" to refer to the Content API within openedx-core,
which is actually the thing we have been calling "Learning Core" all along.
* In snake-case code, it's `*_openedx_content_*`.
* In camel-case code, it's `*OpenedXContent*`
For consistency's sake we avoid anything else like oex_core, OeXCore,
OpenEdXCore, OexContent, openedx-content, OpenEdxContent, etc.
There should be no more references to learning_core, learning-core, Learning Core,
Learning-Core, LC, openedx-learning, openedx_learning, etc.
BREAKING CHANGE: for openedx-learning/openedx-core developers:
You may need to uninstall openedx-learning and re-install openedx-core
from your venv. If running tutor, you may need to un-mount openedx-learning,
rename the directory to openedx-core, re-mount it, and re-build.
The code APIs themselves are fully backwards-compatible.
Part of: https://github.com/openedx/openedx-core/issues/470
This commit introduces several improvements to database migration
scripts to enhance compatibility between MySQL and PostgreSQL, ensure
case-sensitive behavior where needed, and improve migration safety and
correctness. The changes include dynamic SQL generation based on the
database engine, improved transaction handling, and adjustments to
field types and adapters for better cross-database support.
Database compatibility and case sensitivity improvements:
- Migration scripts in split_modulestore_django and learning_sequences
now dynamically generate SQL statements for altering column case
sensitivity and uniqueness based on whether the database is MySQL or
PostgreSQL, ensuring correct behavior across both backends.
- common/djangoapps/split_modulestore_django/migrations/0001_initial.py
- openedx/core/djangoapps/content/learning_sequences/migrations/0001_initial.py
- The courseware.fields module now checks for "postgresql" in the
database engine string instead of a specific backend name, improving
compatibility with different PostgreSQL drivers.
- lms/djangoapps/courseware/fields.py
- The 0011_csm_id_bigint migration in courseware now supports both MySQL
and PostgreSQL for altering column types, with specific SQL for each
backend.
- lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py
- The 0009_readd_facebook_url migration in course_overviews now
introspects the table structure using backend-specific SQL for MySQL
and PostgreSQL, ensuring correct detection of existing fields.
- openedx/core/djangoapps/content/course_overviews/migrations/0009_readd_facebook_url.py
Migration safety and correctness:
- Service user creation and deletion in the commerce app is now wrapped
in atomic transactions to ensure database consistency.
- lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py
- The move_overrides_to_edx_when migration in courseware now specifies
a no-op reverse migration, preventing accidental data loss on migration
rollback.
- lms/djangoapps/courseware/migrations/0008_move_idde_to_edx_when.py
Adapter registration and code cleanup:
- The common_initialization app now registers custom adapters for
CourseLocator and related classes in psycopg2 when using PostgreSQL,
ensuring proper serialization of these types.
- openedx/core/djangoapps/common_initialization/apps.py
- Minor code cleanup and formatting improvements in migration files,
including import order and field formatting for readability.
- lms/djangoapps/grades/migrations/0015_historicalpersistentsubsectiongradeoverride.py
The openedx-learning repo was recently refactored to consolidate its
authoring apps into a single openedx_content app:
https://github.com/openedx/openedx-platform/pull/37924
This commit makes the following changes to accommodate this:
- Bumps the openedx-learning version to 0.31.0 to get the changes.
- Creates new migrations in content_libraries, contentstore, and
modulestore_migrator to foreign key references to authoring apps
to point to the new openedx_content app. This is done without
actually making database changes, since the openedx_content app
models are taking over the existing tables that the authoring apps
once pointed to.
- Creates new squashed migrations in these apps that create these
foreign keys to reference openedx_content app models from the start.
The full rationale for how and why this was done is in the following
openedx-learning ADR:
https://github.com/openedx/openedx-learning/blob/main/docs/decisions/0020-merge-authoring-apps-into-openedx-content.rst
These migrations should run fine from either a from-scratch scenario
(i.e. a new install or CI), or when upgrading from an Ulmo-or-later
database state. If you have a database state that comes from the middle
of the Ulmo development cycle (e.g. October 2025), you may encounter
migration errors in content_libraries, contentstore, or
modulestore_migrator, with an error message complaining about missing
tables. If you receive this message, run the following command:
python manage.py lms migrate openedx_content 0001
Then try to run the migrations for the app that failed. Repeat if
necessary for multiple apps.
Required upgrade of Django.
Commit generated by workflow `openedx/openedx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
Add a new endpoint to get the unit extensions for a course. Update edx-when from 3.0.0 to 3.1.0 in order to get data necessary for response.
---------
Co-authored-by: Daniel Wong <danieleduardo.wongfa@wgu.edu>
There was a bug in celery 5.6.1 that caused having eta/countdown
parameters being stuck in received and never executing until we
downgraded to 5.6.0. This issue appears to be been fixed in 5.6.2.
For some reason sphinx is being listed as a thing that requires
`roman-numerals` during the upgrade call but not during
`compile-requirements`. This just commits the expectations from
compile-requirements for now so we can land the package update.