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

Ticket migrating to xblock.utils from xblockutils after deprecation of repo #915

Closed
1 task done
farhan opened this issue Oct 5, 2023 · 4 comments
Closed
1 task done
Assignees

Comments

@farhan
Copy link

farhan commented Oct 5, 2023

Predecessor ticket: openedx/XBlock#675

The xblock-utils repo has been deprecated and in this story, we have to list down all the repositories that are using the xblock-utils package and switch the usage/import from xblock-utils to xblock.utils

Tasks:

  • Go through all the repositories that install xblock-utils. For each repo that installs xblock-utils, open an issue for removing xblock-utils, like this one

Acceptance Criteria:

  1. All repos that use xblock-utils have an issue indicating that they need to upgrade and migrate.
@farhan farhan converted this from a draft issue Oct 5, 2023
@farhan farhan changed the title Migrate to xblock.utils from xblockutils after deprecation of repo Migrate to xblock.utils from xblockutils after deprecation of repo Oct 5, 2023
@farhan farhan moved this from 🆕 New to 🏗 In progress in Aximprovements Team Oct 9, 2023
@farhan farhan self-assigned this Oct 9, 2023
@farhan farhan moved this from 🏗 In progress to ✅ Done in Aximprovements Team Oct 12, 2023
@feanil feanil closed this as completed Oct 16, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Axim Engineering Tasks Oct 16, 2023
@feanil feanil changed the title Migrate to xblock.utils from xblockutils after deprecation of repo Ticket migrating to xblock.utils from xblockutils after deprecation of repo Oct 16, 2023
@Agrendalath
Copy link
Member

@farhan, it would be great to keep the old imports as a fallback instead of breaking the backward compatibility of these 17 repos with all releases older than Quince (not released yet).

cc: @feanil

@feanil
Copy link
Contributor

feanil commented Oct 23, 2023

So add a try-except clause for the new imports and then try the old imports if we don't find the new ones?

@Agrendalath
Copy link
Member

Agrendalath commented Oct 23, 2023

@feanil, exactly; something like this:

try:
    from xblock.utils.resources import ResourceLoader
    from xblock.utils.settings import ThemableXBlockMixin, XBlockWithSettingsMixin
except ModuleNotFoundError:  # For backward compatibility with releases older than Quince.
    from xblockutils.resources import ResourceLoader
    from xblockutils.settings import ThemableXBlockMixin, XBlockWithSettingsMixin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Archived in project
Development

No branches or pull requests

3 participants