Skip to content

Commit

Permalink
Upgrade Python from 3.7 to 3.9 (#1531)
Browse files Browse the repository at this point in the history
Part of tiny-pilot/tinypilot-pro#1002.

[Debian Bullseye ships with Python
3.9](https://packages.debian.org/bullseye/python3), so it’s safe for us
to upgrade our Python requirement from 3.7 to 3.9.

I’ve also fixed the URL anchor in the comment in `db/store.py`, which
was outdated.
<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1531"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>
  • Loading branch information
jotaen4tinypilot authored Jul 27, 2023
1 parent e845e11 commit 3bc5477
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
command: ./dev-scripts/check-bash
lint_sql:
docker:
- image: cimg/python:3.7.4
- image: cimg/python:3.9.17
steps:
- checkout
- run:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
command: ./dev-scripts/decode-edid
build_python:
docker:
- image: cimg/python:3.7.4
- image: cimg/python:3.9.17
steps:
- checkout
- run:
Expand Down Expand Up @@ -96,12 +96,12 @@ jobs:
docker:
# To run tests against the dev server, Playwright needs a CircleCI image
# with Python, Node, and a browser. While the build_python and
# build_javascript steps use python-3.7.4 and node-18.16.1 respectively,
# build_javascript steps use python-3.9.17 and node-18.16.1 respectively,
# the CircleCI image with *both* python and node in the closest versions
# is python:3.7.17-browsers. It has python-3.7.17 and node-18.16.0.
# is python:3.9.17-browsers. It has python-3.9.17 and node-18.16.0.
#
# See: https://circleci.com/developer/images/image/cimg/python#tagging-scheme
- image: cimg/python:3.7.17-browsers
- image: cimg/python:3.9.17-browsers
environment:
NODE_ENV: development
steps:
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
molecule test
build_bundle:
docker:
- image: cimg/python:3.7.4
- image: cimg/python:3.9.17
steps:
- checkout
- attach_workspace:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The steps below show you how to quickly set up a development environment for Tin

### Requirements

- Python 3.7 or higher
- Python 3.9 or higher
- Node.js 18.16.1 or higher
- [shellcheck](https://github.com/koalaman/shellcheck#installing)
- Docker 20.10.x or higher
Expand Down
2 changes: 1 addition & 1 deletion app/db/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def create_or_open(db_path):
with connection as transaction:
# Without an explicit `BEGIN`, the sqlite3 library would autocommit
# structural modifications immediately. See:
# https://docs.python.org/3.7/library/sqlite3.html#transaction-control
# https://docs.python.org/3.9/library/sqlite3.html#controlling-transactions
# Note that the `BEGIN` cannot be executed in a separate, preceding
# `transaction.execute('BEGIN')` command, because
# `transaction.executescript` automatically issues a `COMMIT` before
Expand Down
4 changes: 2 additions & 2 deletions app/hid/write_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# This was observed on a 2021 Macbook Pro M1 Max running OSX Ventura 13.2.1.
#
# [1] https://github.com/python/cpython/commit/17a5588740b3d126d546ad1a13bdac4e028e6d50
# [2] https://docs.python.org/3.11/library/multiprocessing.html#the-spawn-and-forkserver-start-methods
# [3] https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled:~:text=(using%20def%2C%20not%20lambda)
# [2] https://docs.python.org/3.9/library/multiprocessing.html#the-spawn-and-forkserver-start-methods
# [3] https://docs.python.org/3.9/library/pickle.html#what-can-be-pickled-and-unpickled:~:text=(using%20def%2C%20not%20lambda)


def do_nothing():
Expand Down

0 comments on commit 3bc5477

Please sign in to comment.