-
Notifications
You must be signed in to change notification settings - Fork 50
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
openedx/ecommerce and openedx/ecommerce-worker Python 3.12 upgrade #78
Comments
@Danyal-Faheem Please add a status update for this issue. Thanks |
Thank you for reminding me @DawoudSheraz. The PR for ecommerce is still in progress as I am currently facing an issue after updating the MySQL client for compatibility with python 3.11 and 3.12. It seems like an issue with the As for the ecommerce-worker PR, it is pending a review from the opened team as I have made the required changes. |
First, fork the Navigate to the [openedx/ecommerce] (https://github.com/openedx/ecommerce) repository and click the "Fork" button. Clone your forked repositories to your local machine: git clone https://github.com/<your-username>/ecommerce.git
git clone https://github.com/<your-username>/ecommerce-worker.git
Set up Python environments for both projects. You can use tools like # For ecommerce
cd ecommerce
pyenv install 3.11.0
pyenv install 3.12.0
pyenv local 3.11.0: Switch to Python 3.11
Python: -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
# For ecommerce-worker
cd ../ecommerce-worker
pyenv local 3.11.0: Switch to Python 3.11
Python: -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
Update the CI configurations to include Python 3.11 and 3.12. Typically, these configurations are in For example, in a GitHub Actions workflow: # .github/workflows/ci.yml
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.11, 3.12]
steps:
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run tests
run: |
pytest # Or the test command specific to the project
Run the tests locally for Python 3.11 and 3.12 and fix any compatibility issues. This may involve updating dependencies, modifying code to be compatible with new Python versions, or fixing deprecations. For ecommerce
cd ecommerce
pyenv local 3.11.0
source venv/bin/activate
pytest
pyenv local 3.12.0
source venv/bin/activate
pytest
For ecommerce-worker
cd ../ecommerce-worker
pyenv local 3.11.0
source venv/bin/activate
pytest
pyenv local 3.12.0
source venv/bin/activate
pytest
After ensuring that all tests pass, commit and push your changes to your forked repositories: For ecommerce
cd ecommerce
git add .
git commit -m "Add CI support for Python 3.11 and 3.12"
git push origin main
For ecommerce-worker
cd ../ecommerce-worker
git add .
git commit -m "Add CI support for Python 3.11 and 3.12"
git push origin main
Create pull requests to the original repositories:
8. Monitor and Respond to FeedbackMonitor the pull requests for any feedback from the repository maintainers and respond promptly. You may need to make additional changes based on their comments. Summary
By following these steps, you should be able to contribute to the upgrade of |
The above seems like an AI-generated comment, it is a very generic to-do list. |
@Faraz32123 Please add the updates on the issue, including the PRs. Thank you. |
Closing this issue as the upstream Issues are closed. |
As mentioned on https://discuss.openedx.org/t/these-idas-will-not-be-upgraded-to-python-3-11-by-redwood/12755, ecommerce and ecommerce-worker are not prioritized for Python 3.11/3.12 upgrades and are free for community to pick them up. Since these are important repositories and their upgrades are blocking tutor-ecommerce upgrade (#68), Edly can take a dig at upgrading them. A note that these upgrade will be backwards compatible with 3.8.
Upstream issues
The text was updated successfully, but these errors were encountered: