Skip to content

Updates Python 3.9 & 3.8 to 3.10 #456

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mypy_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: '3.8'
python-version: '3.10'
- run: pip install mypy
- name: Run mypy check on all files
run: mypy --strict .
2 changes: 1 addition & 1 deletion Google-Summer-of-Code-2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ A: Oppia Android won't be able to participate in GSoC this year. Note that this

**Q: What technical skills do I need to work on Oppia?**

A: For Oppia Web, Angular 2+, Python 3.9 and Google App Engine are useful and recommended for most Oppia work; in addition, UI design skills are useful for frontend, user-facing work. Please see the individual project ideas to determine whether these skills are recommended for the project in question. Note that, although GSoC is aimed at beginner contributors to open source and at students, "beginner to open source" is not the same as "beginner to coding" -- the projects assume some proficiency with coding. This [[page of learning resources|Learning-Resources]] might be helpful for learning the technologies needed to contribute to Oppia.
A: For Oppia Web, Angular 2+, Python 3.10 and Google App Engine are useful and recommended for most Oppia work; in addition, UI design skills are useful for frontend, user-facing work. Please see the individual project ideas to determine whether these skills are recommended for the project in question. Note that, although GSoC is aimed at beginner contributors to open source and at students, "beginner to open source" is not the same as "beginner to coding" -- the projects assume some proficiency with coding. This [[page of learning resources|Learning-Resources]] might be helpful for learning the technologies needed to contribute to Oppia.

**Q: How can I increase my chances of getting selected?**

Expand Down
2 changes: 1 addition & 1 deletion Google-Summer-of-Code-2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Welcome! If you're interested in applying to work with Oppia for GSoC, please fo

**Q: What technical skills do I need to work on Oppia?**

A: For Oppia Web, Angular 2+, Python 3.9, Google App Engine and Apache Beam are useful and recommended for most Oppia work; in addition, UI design skills are helpful for frontend user-facing work, and experience with Docker and GitHub Actions is useful for developer workflow projects. Also, it is important to be able to write tests for the code you submit (using Karma, Webdriverio and unittest). Please see the individual project ideas to determine which skills are recommended for the project in question. Note that, although GSoC is aimed at beginner contributors to open source and at students, "beginner to open source" is **not** the same as "beginner to coding" -- the projects assume that you have proficiency with coding. For Oppia Web, you might find this [[page of learning resources|Learning-Resources]] helpful, as well as other pages on our [wiki](https://github.com/oppia/oppia/wiki) that provide guidance on Apache Beam, testing frameworks, etc.
A: For Oppia Web, Angular 2+, Python 3.10, Google App Engine and Apache Beam are useful and recommended for most Oppia work; in addition, UI design skills are helpful for frontend user-facing work, and experience with Docker and GitHub Actions is useful for developer workflow projects. Also, it is important to be able to write tests for the code you submit (using Karma, Webdriverio and unittest). Please see the individual project ideas to determine which skills are recommended for the project in question. Note that, although GSoC is aimed at beginner contributors to open source and at students, "beginner to open source" is **not** the same as "beginner to coding" -- the projects assume that you have proficiency with coding. For Oppia Web, you might find this [[page of learning resources|Learning-Resources]] helpful, as well as other pages on our [wiki](https://github.com/oppia/oppia/wiki) that provide guidance on Apache Beam, testing frameworks, etc.

**Q: How can I increase my chances of getting selected?**

Expand Down
2 changes: 1 addition & 1 deletion Google-Summer-of-Code-2025.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Good luck!

A: Please see the individual project ideas to determine which skills are recommended for the project in question. Also, in general:

- For Oppia Web, Angular 2+, Python 3.9, Google App Engine and Apache Beam are useful and recommended, and experience with Docker and GitHub Actions is useful for developer workflow projects. Also, it is important to be able to write tests for the code you submit (using Karma, Webdriverio and unittest). You might also find this [[page of learning resources|Learning-Resources]] helpful, as well as other pages on our [wiki](https://github.com/oppia/oppia/wiki) that provide guidance on Apache Beam, testing frameworks, etc.
- For Oppia Web, Angular 2+, Python 3.10, Google App Engine and Apache Beam are useful and recommended, and experience with Docker and GitHub Actions is useful for developer workflow projects. Also, it is important to be able to write tests for the code you submit (using Karma, Webdriverio and unittest). You might also find this [[page of learning resources|Learning-Resources]] helpful, as well as other pages on our [wiki](https://github.com/oppia/oppia/wiki) that provide guidance on Apache Beam, testing frameworks, etc.

- For Oppia Android, you will need to know how to program in Kotlin, and have experience with Android development. Knowledge of Bazel may also be helpful for some projects.

Expand Down
24 changes: 12 additions & 12 deletions Installing-Oppia-(Linux;-Python-3).md
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ For your virtual environment, we recommend you use [pyenv](https://github.com/py
```bash
exec "$SHELL"
```
4. Now you can install Python 3.9.20 and the associated pip like this:
4. Now you can install Python 3.10.16 and the associated pip like this:

```console
$ pyenv install 3.9.20
installing python-3.9.20...
installed python-3.9.20 to /home/user/.pyenv/versions/3.9.20
$ pyenv install 3.10.16
installing python-3.10.16...
installed python-3.10.16 to /home/user/.pyenv/versions/3.10.16
```

5. Install direnv
Expand All @@ -151,7 +151,7 @@ exec "$SHELL"
sudo apt install direnv
```

6. Setup direnv into your shell.
6. Setup direnv into your shell.
If you are using bash:

```bash
Expand All @@ -161,7 +161,7 @@ exec "$SHELL"

```bash
eval "$(direnv hook zsh)" >> ~/.zshrc
```
```
> [!WARNING]
> Be careful with using graphical editors like Notepad in Windows. These can add carriage returns (`\r`) that confuse our Linux-based development tools. Instead, we recommend using editors designed for programming or command-line text editors.

Expand All @@ -186,7 +186,7 @@ exec "$SHELL"
with this content:

```console
use python 3.9.20
use python 3.10.16
```

Then run this command in the same folder:
Expand Down Expand Up @@ -406,21 +406,21 @@ On Arch Linux, you should follow these instructions to set up your virtual envir

3. Reload your shell or open a new terminal window to load your updated `.bashrc`, `.zshrc`, or `config.fish`

4. Now you can install Python 3.9.20 and the associated pip like this:
4. Now you can install Python 3.10.16 and the associated pip like this:

```console
$ pyenv install 3.9.20
installing python-3.9.20...
$ pyenv install 3.10.16
installing python-3.10.16...
patching file misc/news.d/next/build/2021-10-11-16-27-38.bpo-45405.isfdw5.rst
patching file configure
patching file configure.ac
installed python-3.9.20 to /home/user/.pyenv/versions/3.8.1
installed python-3.10.16 to /home/user/.pyenv/versions/3.10.16
```

5. Create a virtual environment for oppia:

```console
$ pyenv virtualenv 3.9.20 oppia
$ pyenv virtualenv 3.10.16 oppia
...
$ pyenv versions
...
Expand Down
28 changes: 14 additions & 14 deletions Installing-Oppia-(Mac-OS;-Python-3).md
Original file line number Diff line number Diff line change
Expand Up @@ -177,45 +177,45 @@ For your vitual environment, we recommend you use [pyenv](https://github.com/pye

2. Reload your shell or open a new terminal window to load your updated `~/.bash_profile` or `~/.zshrc`.

3. Install Python 3.9.20:
3. Install Python 3.10.16:

```console
$ pyenv install 3.9.20
$ pyenv install 3.10.16
Installing openssl-1.1.1k..
Installed openssl-1.1.1k to /Users/user/.pyenv/versions/3.9.20
Installed openssl-1.1.1k to /Users/user/.pyenv/versions/3.10.16

Installing readline-8.1...
Installed readline-8.1 to /Users/user/.pyenv/versions/3.9.20
Installed readline-8.1 to /Users/user/.pyenv/versions/3.10.16

Downloading Python-3.9.20.tar.xz...
-> https://www.python.org/ftp/python/3.9.20/Python-3.9.20.tar.xz
Installing Python-3.9.20...
Downloading Python-3.10.16.tar.xz...
-> https://www.python.org/ftp/python/3.10.16/Python-3.10.16.tar.xz
Installing Python-3.10.16...
patching file Misc/NEWS.d/next/Build/2021-10-11-16-27–38.bpo-45405.iSfdw5.rst
patching file configure
patching file configure.ac
python-build: use zlib from xcode sdk
Installed Python-3.9.20 to /Users/user/.pyenv/versions/3.9.20
Installed Python-3.10.16 to /Users/user/.pyenv/versions/3.10.16
```

4. Make Python 3 available globally on your system:

```console
pyenv global 3.9.20
pyenv global 3.10.16
```

Note that you can use a different version of Python 3 if you prefer--we'll specify Python 3.9.20 as our version for Oppia development later.
Note that you can use a different version of Python 3 if you prefer--we'll specify Python 3.10.16 as our version for Oppia development later.

5. Create a virtual environment for oppia by making a file `.envrc` in the `opensource/` directory with the following contents:

```text
use python 3.9.20
use python 3.10.16
```

Then run `direnv allow` in the `opensource/` directory to allow `direnv` to run there. Whenever you are within the `opensource/` directory (or any of its subdirectories, or any of their subdirectories, etc.) the virtual environment will be active. You can confirm this by running:

```console
$ which python
.../opensource/.direnv/python-3.9.20/bin/python
.../opensource/.direnv/python-3.10.16/bin/python
```

## Running Oppia on a development server
Expand Down Expand Up @@ -297,9 +297,9 @@ For your vitual environment, we recommend you use [pyenv](https://github.com/pye


Traceback (most recent call last):
File "/Users/user/.pyenv/versions/3.9.20/lib/python3.8/runpy.py", line 174, in _run_module_as_main
File "/Users/user/.pyenv/versions/3.10.16/lib/python3.10/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/user/.pyenv/versions/3.9.20/lib/python3.8/runpy.py", line 72, in _run_code
File "/Users/user/.pyenv/versions/3.10.16/lib/python3.10/runpy.py", line 72, in _run_code
exec code in run_globals
File "/opensource/oppia/scripts/start.py", line 205, in <module>
main()
Expand Down
2 changes: 1 addition & 1 deletion Third-party-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ At Oppia we have a lot of dependencies, and we have many different ways of manag

Oppia has some development dependencies that the user has to manage themselves. These are:

* Python 3.9
* Python 3.10
* Google Chrome
* git
* Tools commonly found on Linux and MacOS systems like bash
Expand Down
Loading