Skip to content

Commit

Permalink
Upgrade Python to v3.9 and Poetry to 1.8 (#1986)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahkagan authored Oct 14, 2024
1 parent eab7322 commit a8065f3
Show file tree
Hide file tree
Showing 129 changed files with 4,551 additions and 1,587 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: 2.1
orbs:
python: circleci/python@2.0.3
python: circleci/python@2.2.0
node: circleci/[email protected]
browser-tools: circleci/[email protected]

executors:
arlo:
docker:
- image: cimg/python:3.8.13-browsers
- image: cimg/python:3.9.20-browsers
environment:
DATABASE_URL: postgresql://root@localhost:5432/arlo-test
FLASK_ENV: test
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- node/install-packages:
pkg-manager: yarn
app-dir: client
cache-version: v2
cache-version: v3
# In order to cache the Cypress binary, we have to cache
# ~/.cache/Cypress (alongside the default caching of ~/.cache/yarn).
# So we just cache all of ~/.cache.
Expand Down
89 changes: 6 additions & 83 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,85 +60,14 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape,
# Everything above this line came disabled by default with pylint,
# below are arlo custom choices
unused-wildcard-import,
Expand All @@ -149,7 +78,6 @@ disable=print-statement,
missing-function-docstring,
missing-class-docstring,
multiple-imports,
bad-continuation,
line-too-long,
too-many-lines,
too-many-statements,
Expand All @@ -159,11 +87,13 @@ disable=print-statement,
too-many-branches,
no-else-return,
too-few-public-methods,
no-self-use,
duplicate-code,
broad-except,
no-else-raise,
logging-fstring-interpolation,
broad-exception-raised,
use-dict-literal,
use-implicit-booleaness-not-comparison



Expand Down Expand Up @@ -476,13 +406,6 @@ max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
Expand Down Expand Up @@ -622,5 +545,5 @@ preferred-modules=

# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException,
builtins.Exception
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"files.exclude": {
"client": true
},
"python.linting.pylintEnabled": true
}
}
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ PATH := $(PATH):$(HOME)/.local/bin

deps:
sudo apt update
sudo apt install -y python3.8 python3.8-venv libpython3.8-dev libpq-dev graphicsmagick
sudo apt install -y python3.9 python3.9-venv libpython3.9-dev libpq-dev graphicsmagick
# Install node: https://github.com/nodesource/distributions/blob/master/README.md#deb
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install poetry: https://python-poetry.org/docs/master/#osx--linux--bashonwindows-install-instructions
# Keep the local dev POETRY_VERSION in sync with the Heroku config var
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.1.15 python3.8 -
# Install poetry: https://python-poetry.org/docs/#installing-with-the-official-installer
curl -sSL https://install.python-poetry.org | python3.9 -
sudo npm install -g yarn
sudo apt install -y postgresql
sudo systemctl start postgresql
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"buildpacks": [
{ "url": "heroku/nodejs" },
{
"url": "https://github.com/moneymeets/python-poetry-buildpack.git#0bbaf48423f0caac527e185b1517abac1610dc46"
"url": "https://github.com/moneymeets/python-poetry-buildpack.git"
},
{ "url": "heroku/python" },
{ "url": "heroku-community/cli" }
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"jest-environment-jsdom-sixteen": "^1.0.3",
"jsdom": "^16.5.0",
"lint-staged": "^13.0.3",
"maildev": "^1.1.0",
"maildev": "^2.1.0",
"pdf-parse": "^1.1.1",
"pdf-visual-diff": "^0.5.0",
"prettier": "^1.19.1",
Expand Down
Loading

0 comments on commit a8065f3

Please sign in to comment.