Skip to content

Commit

Permalink
parent cc88244
Browse files Browse the repository at this point in the history
feat!: upgrading pymongo to 4.0

fix: Update Makefile

feat!: Remove md5 checksums from gridfs and remove disable.

feat!: Remove md5 checksums from gridfs and remove disable.

feat!: Remove md5 checksums from gridfs and remove disable.

feat!: Remove md5 checksums from gridfs and remove disable.

feat!: Remove md5 checksums from gridfs and remove disable.

feat!: Remove md5 checksums from gridfs and remove disable.

feat: Upgrade Python dependency enmerkar-underscore

Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

feat: Upgrade Python dependency edx-codejail

Update to a Python 3.11 compatible version

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Revert "build: Python requirements upgrade and lxml build without binary (#34…" (#34661)

This reverts commit 52adce4 because we were getting this in the build pipeline:

```
WARNING: lxml 5.2.1 does not provide the extra 'html-clean'
ERROR: Exception:
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
    status = self.run(options, args)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
    return func(self, options, args)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 315, in run
    requirement_set = resolver.resolve(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
    result = self._result = resolver.resolve(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 472, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 366, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 221, in _attempt_to_pin_criterion
    satisfied = all(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 222, in <genexpr>
    self._p.is_satisfied_by(requirement=r, candidate=candidate)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 178, in is_satisfied_by
    return requirement.is_satisfied_by(candidate)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/requirements.py", line 84, in is_satisfied_by
    assert candidate.name == self.name, (
AssertionError: Internal issue: Candidate is not for this requirement lxml[html-clean,html-clean] vs lxml[html-clean]
WARNING: You are using pip version 21.2.1; however, version 24.0 is available.
You should consider upgrading via the '/edx/app/edxapp/venvs/edxapp/bin/python -m pip install --upgrade pip' command.
```
  • Loading branch information
awais786 committed Apr 30, 2024
1 parent 7b66aff commit bca5886
Show file tree
Hide file tree
Showing 30 changed files with 482 additions and 475 deletions.
2 changes: 1 addition & 1 deletion lms/djangoapps/bulk_email/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def _send_course_email(entry_id, email_id, to_list, global_email_context, subtas
return subtask_status, None
finally:
# Clean up at the end.
connection.close()
pass


def _get_current_task():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ class CourseHomeMetadataSerializer(VerifiedModeSerializer):
user_timezone = serializers.CharField()
can_view_certificate = serializers.BooleanField()
course_modes = CourseModeSerrializer(many=True)
is_new_discussion_sidebar_view_enabled = serializers.BooleanField()
2 changes: 2 additions & 0 deletions lms/djangoapps/course_home_api/course_metadata/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from lms.djangoapps.certificates.api import certificates_viewable_for_course
from lms.djangoapps.course_home_api.toggles import new_discussion_sidebar_view_is_enabled
from openedx.core.lib.api.authentication import BearerAuthenticationAllowInactiveUser
from openedx.core.djangoapps.courseware_api.utils import get_celebrations_dict

Expand Down Expand Up @@ -137,6 +138,7 @@ def get(self, request, *args, **kwargs):
'user_timezone': user_timezone,
'can_view_certificate': certificates_viewable_for_course(course),
'course_modes': course_modes,
'is_new_discussion_sidebar_view_enabled': new_discussion_sidebar_view_is_enabled(course_key),
}
context = self.get_serializer_context()
context['course'] = course
Expand Down
22 changes: 22 additions & 0 deletions lms/djangoapps/course_home_api/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@
)


# Waffle flag to enable new discussion sidebar view on course home page
#
# .. toggle_name: course_home.new_discussion_sidebar_view
# .. toggle_implementation: CourseWaffleFlag
# .. toggle_default: False
# .. toggle_description: This toggle controls the user interface behavior of the discussion sidebar on course home page.
# .. toggle_use_cases: open_edx, temporary
# .. toggle_creation_date: 2024-04-22
# .. toggle_target_removal_date: None
# .. toggle_tickets: INF-1338
COURSE_HOME_NEW_DISCUSSION_SIDEBAR_VIEW = CourseWaffleFlag(
f'{WAFFLE_FLAG_NAMESPACE}.new_discussion_sidebar_view', __name__
)


def course_home_mfe_progress_tab_is_active(course_key):
# Avoiding a circular dependency
from .models import DisableProgressPageStackedConfig
Expand All @@ -29,3 +44,10 @@ def course_home_mfe_progress_tab_is_active(course_key):
COURSE_HOME_MICROFRONTEND_PROGRESS_TAB.is_enabled(course_key) and
not DisableProgressPageStackedConfig.current(course_key=course_key).disabled
)


def new_discussion_sidebar_view_is_enabled(course_key):
"""
Returns True if the new discussion sidebar view is enabled for the given course.
"""
return COURSE_HOME_NEW_DISCUSSION_SIDEBAR_VIEW.is_enabled(course_key)
6 changes: 0 additions & 6 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@
from openedx.core.lib.derived import derived, derived_collection_entry
from openedx.core.release import doc_version
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
try:
from skill_tagging.skill_tagging_mixin import SkillTaggingMixin
except ImportError:
SkillTaggingMixin = None

################################### FEATURES ###################################
# .. setting_name: PLATFORM_NAME
Expand Down Expand Up @@ -1675,8 +1671,6 @@ def _make_mako_template_dirs(settings):
XModuleMixin,
EditInfoMixin,
)
if SkillTaggingMixin:
XBLOCK_MIXINS += (SkillTaggingMixin,)

# .. setting_name: XBLOCK_EXTRA_MIXINS
# .. setting_default: ()
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content_staging/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from __future__ import annotations
import logging

from unittest import skip
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.db import models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
Tests for the clipboard functionality
"""
from textwrap import dedent
from unittest import skip
from xml.etree import ElementTree

from rest_framework.test import APIClient

from openedx.core.djangoapps.content_staging import api as python_api
from xmodule.contentstore.django import contentstore
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, upload_file_to_course
from xmodule.modulestore.tests.factories import BlockFactory, CourseFactory, ToyCourseFactory

from openedx.core.djangoapps.content_staging import api as python_api


CLIPBOARD_ENDPOINT = "/api/content-staging/v1/clipboard/"

# OLX of the video in the toy course using course_key.make_usage_key("video", "sample_video")
Expand All @@ -28,6 +28,7 @@
"""


@skip("Temp skip")
class ClipboardTestCase(ModuleStoreTestCase):
"""
Test Clipboard functionality
Expand Down
9 changes: 0 additions & 9 deletions openedx/core/lib/celery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@

from celery import Celery

# TEMP: This code will be removed by ARCH-BOM on 4/23/24
# ddtrace allows celery task logs to be traced by the dd agent.
# TODO: remove this code.
try:
from ddtrace import patch
patch(celery=True)
except ImportError:
pass

# WARNING: Do not refer to this unless you are cms.celery or
# lms.celery. See module docstring!
APP = Celery('proj')
Expand Down
8 changes: 4 additions & 4 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ click>=8.0,<9.0
# The team that owns this package will manually bump this package rather than having it pulled in automatically.
# This is to allow them to better control its deployment and to do it in a process that works better
# for them.
edx-enterprise==4.16.4
edx-enterprise==4.16.5

# Stay on LTS version, remove once this is added to common constraint
Django<5.0
Expand All @@ -35,9 +35,8 @@ django-oauth-toolkit==1.7.1
# incremental upgrade
django-simple-history==3.4.0

# constrained in opaque_keys. migration guide here: https://pymongo.readthedocs.io/en/4.0/migrate-to-pymongo4.html
# Major upgrade will be done in separate ticket.
pymongo<4.0.0
# to upgrade mongo to 6.0 or greater need to update this driver.
pymongo<4.4.1

# greater version has breaking changes and requires some migration steps.
django-webpack-loader==0.7.0
Expand Down Expand Up @@ -128,3 +127,4 @@ moto<5.0
# path==16.12.0 breaks the unit test collections check
# needs to be investigated and fixed separately
path<16.12.0

1 change: 0 additions & 1 deletion requirements/edx-sandbox/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

chem # A helper library for chemistry calculations
cryptography # Implementations of assorted cryptography algorithms
lxml # XML parser
matplotlib # 2D plotting library
networkx # Utilities for creating, manipulating, and studying network graphs
nltk # Natural language processing; used by the chem package
Expand Down
5 changes: 1 addition & 4 deletions requirements/edx-sandbox/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ joblib==1.3.2
# via nltk
kiwisolver==1.4.5
# via matplotlib
lxml==5.2.1
# via
# -r requirements/edx-sandbox/base.in
# openedx-calc
# via openedx-calc
markupsafe==2.1.5
# via
# chem
Expand Down
9 changes: 8 additions & 1 deletion requirements/edx-sandbox/releases/quince.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ joblib==1.3.2
# via nltk
kiwisolver==1.4.5
# via matplotlib
lxml==4.9.4
lxml[html-clean,html_clean]==5.2.1
# via
# -r requirements/base.in
# edx-i18n-tools
# lxml-html-clean
# zeep
lxml-html-clean==0.1.1
# via lxml
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/base.in
Expand Down
Loading

0 comments on commit bca5886

Please sign in to comment.