diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f5eb2ef8..c3fb64352 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8'] - toxenv: [quality, django32, django42] + python-version: ['3.8', '3.12'] + toxenv: [quality, django42] steps: - uses: actions/checkout@v3 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 3bb18ffde..4cba57814 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -14,3 +14,4 @@ # diff-cover latest requires (pluggy>=0.13.1,<0.14.0) which conflicts with pytest which requires(pluggy>=0.12,<2.0.0) # Using the same version of diff-cover which is being used currently in edx-platform to avoid this conflict. diff-cover==4.0.0 +lxml<5.0.0 diff --git a/setup.py b/setup.py index c8a230682..4707b21ff 100755 --- a/setup.py +++ b/setup.py @@ -68,12 +68,12 @@ def get_version(*file_paths): classifiers=[ 'Development Status :: 5 - Production/Stable', 'Framework :: Django', - 'Framework :: Django :: 3.2', 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.12", ] ) diff --git a/tox.ini b/tox.ini index 34cb20dfc..d16e25e37 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,42}, quality, docs +envlist = py{38,312}-django{42}, quality, docs [pytest] DJANGO_SETTINGS_MODULE = xblock.test.settings @@ -8,9 +8,8 @@ filterwarnings = always norecursedirs = .* docs requirements [testenv] -deps = - django32: Django>=3.2,<4.0 - django42: Django>=4.2,<5.0 +deps = + django42: Django>=4.2,<4.3 -r requirements/test.txt changedir = {envsitepackagesdir} commands = @@ -32,8 +31,8 @@ commands = make html [testenv:quality] -deps = - django32: Django>=3.2,<4.0 +deps = + django42: Django>=4.2,<4.3 -r requirements/test.txt changedir = {toxinidir} commands = diff --git a/xblock/test/test_core.py b/xblock/test/test_core.py index 7f7cd4700..ea35a6d9f 100644 --- a/xblock/test/test_core.py +++ b/xblock/test/test_core.py @@ -835,7 +835,7 @@ class HasParent(XBlock): block.parent = "some_parent_id" parent = block.get_parent() assert parent is not None - assert runtime.get_block.called_with("some_parent_id") + assert runtime.get_block.called # Get the parent again. It will be the same parent, and we didn't call the # runtime. diff --git a/xblock/test/test_user_service.py b/xblock/test/test_user_service.py index 7c1104d6e..5c2b1c30e 100644 --- a/xblock/test/test_user_service.py +++ b/xblock/test/test_user_service.py @@ -29,10 +29,10 @@ def test_dummy_user_service_current_user(): assert current_user == user assert current_user.full_name == "tester" # assert that emails is an Iterable but not a string - assert isinstance(current_user.emails, collections.Iterable) + assert isinstance(current_user.emails, collections.abc.Iterable) assert not isinstance(current_user.emails, (str, bytes)) # assert that opt_attrs is a Mapping - assert isinstance(current_user.opt_attrs, collections.Mapping) + assert isinstance(current_user.opt_attrs, collections.abc.Mapping) def test_dummy_user_service_exception():