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: remove warnings from defusedxml package #32616

Conversation

diegovr
Copy link
Contributor

@diegovr diegovr commented Jun 30, 2023

Description

Issue: openedx/public-engineering#146

  • Refactor the deprecated defusedxml package which will no longer be supported.
    • The current python version used(python3.8) supports the xml.etree.ElementTree package which replace the old package (defusedxml).
  • Fixed the Deprecation Warnings by making this change.

Supporting information

The best references to why it was deprecated I could find are here:

Testing instructions

To check and find from where I get the same warning, I run the unit tests inside the lms container (by running make dev.shell.lms) and I could found that the tests which use the deprecated package are from openedx/core/lib/tests/ path so I used pytest to confirm that.

Then after the changes I re-run the tests and the warning no longer appeared.

Other information

  • This change can also be the first step to deprecate/remove the defusedxml package since is used only in this section.

bradenmacdonald and others added 30 commits May 23, 2023 18:15
In a refactor, this call to runtime.publish didn't
actually match the API properly, causing runtime errors
on LMS.
…ods (openedx#32210)

* fix: return 403 on course access error rather than redirect
* fix: fixing test.
* fix: updating exceptions.
This makes a couple of changes to the xblock handler in the CMS. These changes 
add a handful of utility functions and modify the existing ones to make reuse 
of existing blocks easier. With these changes, it is possible to copy an 
entire section from one course to another, and then later refresh that section, 
and all of its children, without destroying the blocks next to it.

The existing _duplicate_block function was modified to have a shallow keyword 
to avoid copying children, and the update_from_source function was added to 
make it easy to copy attributes over from one block to another. These functions 
can be used alongside copy_from_template in the modulestore to copy over blocks 
and their children without requiring them to be within any particular container 
(other than a library or course root)-- thus allowing library-like inclusion 
without the library content block. This is especially useful for cases like 
copying sections rather than unit content.
…enedx#32286)

For the XBlocks types that use legacy XModule-style assets (specifically, those that
inherit from `HTMLSnippet`), this is small refactor that brings them a bit closer to being like
standard XBlocks.

Given these class attributes:

    class SomeXModuleLikeBlock(..., HTMLSnippet, ...):
        ...
        studio_view_css = { ... }
        preview_view_css = { ... }
        studio_view_js = { ... }
        preview_view_js = { ... }
        ...

we make it so their values are *paths to the resources*
rather than *the actual content of the resources*.
This is a no-op change, but it'll enable future XModule
asset refactorings which require us to operate on asset
paths rather than contents.

Part of: openedx#32292
…terprise-version-3.65.0

chore: bumping enterprise package version to 3.65.1
Adds a filter to modify course_home_url

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

feat: Upgrade Python dependency openedx-filters
openedx#32305)

* feat: allow course entitlements REST API to be filtered on course_uuid

* feat: add field to filter out entitlements with null expired_at values

* chore: update tests
…terprise-version-3.65.2

chore: bumping enterprise package version to 3.65.2
-> bind_for_student() and friends change the user_id
-> DraftVersioningModuleStore.update_item() mutates .location which mutates scope_ids.def_id and scope_ids.usage_id in a way that seems totally wrong
…urses

chore: linting

chore: update requested change
pshiu and others added 25 commits June 25, 2023 22:11
We are lacking information in Flower about our Celery tasks that are
marked as successful but are actually failing.

Attempt to remove ignore_result=True to see if this is suppressing
valuable debugging information.
…ate_entitlements_command

temp: save results & add tests/fixes for expire_and_create_entitlements
…d-logging

temp: added standard logging and removed celery logging
…terprise-version-3.67.5

chore: bumping enterprise package version to 3.67.5
…edx#32346)

* refactor: improve typing of StaticFile named tuple
* feat: copy static asset files into the clipboard
* feat: paste static assets
* feat: show notification in studio about pasted assets
* fix: HTML XBlocks would lose the editor="raw" setting when copy-pasted.
* feat: copy python_lib.zip to the clipboard when it seems to be in use
* point to upstream repos, not eduNEXT forks
* link to guides, not just source repos
* fix spelling of Open edX
…2593)

* fix: field adjustments to product recommendations endpoint

* chore: formatting for files

* chore: indenting fix

* chore: removed f-strings
…terprise-version-3.67.6

chore: bumping enterprise package version to 3.67.6
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 30, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @diegovr! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

@diegovr diegovr closed this Jun 30, 2023
@openedx-webhooks
Copy link

@diegovr Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

@eLRuLL eLRuLL deleted the diegovr/RemoveDeprecatedWarnings branch June 30, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.