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

Add support for Open edX Redwood release #44

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Conversation

mrtmm
Copy link
Collaborator

@mrtmm mrtmm commented Jul 24, 2024

Support versions before and after 2 of the XBlock API.

Distinguish using the following logic:

  • When using a Python version prior to 3.9, assume we need the pre-2
    API.
  • For later Python versions, assume the latest API.

This way, we get the correct dependencies installed for Redwood (which
uses Python 3.11) and earlier releases (which use 3.8).

@fghaas
Copy link

fghaas commented Jul 31, 2024

I think my comment from the other XBlock applies here as well. :)

hastexo/hastexo-xblock#289 (comment)

@mrtmm mrtmm changed the title Update the import statement for xblock-utils Add support for Open edX Redwood release Aug 2, 2024
@mrtmm mrtmm marked this pull request as draft August 2, 2024 06:10
@mrtmm mrtmm force-pushed the redwood branch 3 times, most recently from c0f01ff to 141f9a4 Compare August 2, 2024 08:35
@mrtmm mrtmm marked this pull request as ready for review August 2, 2024 08:38
@mrtmm
Copy link
Collaborator Author

mrtmm commented Aug 2, 2024

@fghaas with the upgrade to XBlock 2 and the linked dependencies, I don't see a way to make this XBlock installable between the Redwood and older releases without something breaking. Let me know what you think, maybe I am missing something.

@mrtmm mrtmm requested a review from fghaas August 2, 2024 08:42
setup.py Outdated
@@ -41,7 +41,7 @@ def package_data(pkg, roots):
'markdown_xblock',
],
install_requires=[
'XBlock<=1.9',
'XBlock>=2.0',
Copy link

@fghaas fghaas Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still wrapping my head around this, so apologies if these questions are misguided or irrelevant:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point. Yes the install_requires should be XBlock<5, and the commit message should say add support for XBlock 2 and higher. The breaking changes (deprecation of id_generator) were introduced in 2.0 that's why that upgrade is more significant to mention. Quince was running with XBlock<2 https://github.com/openedx/edx-platform/blob/open-release/quince.master/requirements/edx/base.txt#L1212

@fghaas
Copy link

fghaas commented Aug 2, 2024

@fghaas with the upgrade to XBlock 2 and the linked dependencies, I don't see a way to make this XBlock installable between the Redwood and older releases without something breaking. Let me know what you think, maybe I am missing something.

I think there's a way to do that. Please see mrtmm#1.

Maari Tamm and others added 3 commits August 2, 2024 15:36
Support versions before and after 2 of the XBlock API.

Distinguish using the following logic:

* When using a Python version prior to 3.9, assume we need the pre-2
  API.
* For later Python versions, assume the latest API.

This way, we get the correct dependencies installed for Redwood (which
uses Python 3.11) and earlier releases (which use 3.8).
Having pipdeptree in the test environment is very helpful in
determining what versions of dependencies actually get installed,
particularly in a CI pipeline.

Add the pipdeptree and pipdeptree-requirements testenvs, and invoke
them from the GitHub Actions workflow.
We need to test this XBlock on Python 3.8 (for Open edX releases prior
to Redwood), 3.11 (for Redwood), and 3.12 (which is the current latest
Python release).

There is no real good reason to test on 3.10, so we might as well drop
it.
Copy link

@fghaas fghaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me now.

@mrtmm mrtmm merged commit b79e6d8 into citynetwork:master Aug 2, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants