Skip to content

Commit

Permalink
Update requirements and pre-commit; fix tests (hasgeek#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
jace authored Mar 1, 2022
1 parent 5cf1ab7 commit 48f8c57
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 134 deletions.
28 changes: 14 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:
skip: ['pip-compile', 'no-commit-to-branch']
repos:
- repo: https://github.com/jazzband/pip-tools
rev: 6.4.0
rev: 6.5.1
hooks:
- id: pip-compile
name: pip-compile --upgrade requirements.in
Expand Down Expand Up @@ -62,7 +62,7 @@ repos:
additional_dependencies:
- toml
- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.1.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
Expand All @@ -71,35 +71,35 @@ repos:
- id: mypy
additional_dependencies:
- toml
- lxml-stubs==0.3.0
- lxml-stubs==0.3.1
- sqlalchemy-stubs==0.4
- types-certifi==2021.10.8.1
- types-click==7.1.8
- types-cryptography==3.3.12
- types-enum34==1.1.2
- types-cryptography==3.3.15
- types-enum34==1.1.8
- types-flask==1.1.6
- types-geoip2==3.0.0
- types-ipaddress==1.0.2
- types-ipaddress==1.0.8
- types-itsdangerous==1.1.6
- types-jinja2==2.11.9
- types-markupsafe==1.1.10
- types-maxminddb==1.5.0
- types-python-dateutil==2.8.6
- types-pytz==2021.3.4
- types-requests==2.27.7
- types-setuptools==57.4.7
- types-python-dateutil==2.8.9
- types-pytz==2021.3.5
- types-requests==2.27.11
- types-setuptools==57.4.9
- types-simplejson==3.17.3
- types-six==1.16.9
- types-toml==0.10.3
- types-urllib3==1.26.7
- types-six==1.16.10
- types-toml==0.10.4
- types-urllib3==1.26.9
- types-werkzeug==1.0.9
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: *flake8deps
- repo: https://github.com/PyCQA/bandit
rev: 1.7.1
rev: 1.7.2
hooks:
- id: bandit
language_version: python3
Expand Down
10 changes: 4 additions & 6 deletions funnel/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

import itsdangerous
from itsdangerous import JSONWebSignatureSerializer, URLSafeTimedSerializer

from coaster.app import KeyRotationWrapper

Expand All @@ -12,19 +12,17 @@
# Lastuser cookie serializer
def lastuser_serializer() -> KeyRotationWrapper:
return KeyRotationWrapper(
itsdangerous.JSONWebSignatureSerializer, app.config['LASTUSER_SECRET_KEYS']
JSONWebSignatureSerializer, app.config['LASTUSER_SECRET_KEYS']
)


# Future Hasjob login support
def crossapp_serializer() -> KeyRotationWrapper:
return KeyRotationWrapper(
itsdangerous.URLSafeTimedSerializer, app.config['LASTUSER_SECRET_KEYS']
URLSafeTimedSerializer, app.config['LASTUSER_SECRET_KEYS']
)


# Signed tokens in email with TTL
def token_serializer() -> KeyRotationWrapper:
return KeyRotationWrapper(
itsdangerous.URLSafeTimedSerializer, app.config['SECRET_KEYS']
)
return KeyRotationWrapper(URLSafeTimedSerializer, app.config['SECRET_KEYS'])
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ git+https://github.com/hasgeek/flask-babelhg.git#egg=Flask-Babelhg
html2text
icalendar
idna>=2.5
itsdangerous
itsdangerous<2.1.0 # https://github.com/pallets/itsdangerous/pull/273
js2py
jsmin>=3.0.0
Markdown
Expand Down
77 changes: 39 additions & 38 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ aiohttp==3.8.1
# via geoip2
aiosignal==1.2.0
# via aiohttp
alembic==1.7.5
alembic==1.7.6
# via
# -r requirements.in
# flask-migrate
Expand All @@ -20,7 +20,7 @@ async-timeout==4.0.2
# via aiohttp
attrs==21.4.0
# via aiohttp
awscli==1.22.37
awscli==1.22.62
# via -r requirements.in
babel==2.9.1
# via -r requirements.in
Expand All @@ -38,9 +38,9 @@ bleach==4.1.0
# via baseframe
blinker==1.4
# via -r requirements.in
boto3==1.20.37
boto3==1.21.7
# via -r requirements.in
botocore==1.23.37
botocore==1.24.7
# via
# awscli
# boto3
Expand All @@ -60,11 +60,11 @@ cffi==1.15.0
# bcrypt
# cryptography
# pynacl
charset-normalizer==2.0.10
charset-normalizer==2.0.12
# via
# aiohttp
# requests
click==8.0.3
click==8.0.4
# via
# -r requirements.in
# flask
Expand All @@ -75,7 +75,7 @@ coaster @ git+https://github.com/hasgeek/coaster.git
# baseframe
colorama==0.4.3
# via awscli
croniter==1.2.0
croniter==1.3.4
# via rq-scheduler
cryptography==36.0.1
# via
Expand All @@ -86,13 +86,13 @@ cssmin==0.2.0
# via baseframe
cssselect==1.1.0
# via premailer
cssutils==2.3.0
cssutils==2.4.0
# via premailer
dataclasses-json==0.5.6
# via -r requirements.in
deprecated==1.2.13
# via redis
dnspython==2.1.0
dnspython==2.2.0
# via
# baseframe
# mxsniff
Expand All @@ -103,9 +103,9 @@ emoji==1.6.3
# via baseframe
fabric3==1.14.post1
# via -r requirements.in
filelock==3.4.2
filelock==3.6.0
# via tldextract
flask==2.0.2
flask==2.0.3
# via
# -r requirements.in
# baseframe
Expand Down Expand Up @@ -149,7 +149,7 @@ flask-wtf==1.0.0
# via
# -r requirements.in
# baseframe
frozenlist==1.2.0
frozenlist==1.3.0
# via
# aiohttp
# aiosignal
Expand All @@ -165,7 +165,7 @@ html2text==2020.1.16
# via -r requirements.in
html5lib==1.1
# via baseframe
httplib2==0.20.2
httplib2==0.20.4
# via
# oauth2
# oauth2client
Expand All @@ -177,7 +177,7 @@ idna==3.3
# requests
# tldextract
# yarl
importlib-metadata==4.10.0
importlib-metadata==4.11.1
# via markdown
itsdangerous==2.0.1
# via
Expand All @@ -194,9 +194,9 @@ jmespath==0.10.0
# botocore
js2py==0.71
# via -r requirements.in
jsmin==3.0.0
jsmin==3.0.1
# via -r requirements.in
lxml==4.7.1
lxml==4.8.0
# via premailer
mako==1.1.6
# via alembic
Expand All @@ -205,7 +205,7 @@ markdown==3.3.6
# -r requirements.in
# flask-flatpages
# pymdown-extensions
markupsafe==2.0.1
markupsafe==2.1.0
# via
# baseframe
# jinja2
Expand All @@ -221,7 +221,7 @@ maxminddb==2.2.0
# via geoip2
mkdocs-material-extensions==1.0.3
# via flask-mailman
multidict==5.2.0
multidict==6.0.2
# via
# aiohttp
# yarl
Expand All @@ -235,8 +235,10 @@ oauth2==1.9.0.post1
# via -r requirements.in
oauth2client==4.1.3
# via -r requirements.in
oauthlib==3.1.1
# via requests-oauthlib
oauthlib==3.2.0
# via
# requests-oauthlib
# tweepy
orderedmultidict==1.0.1
# via furl
packaging==21.3
Expand All @@ -247,7 +249,7 @@ paramiko==2.9.2
# via fabric3
passlib==1.7.4
# via -r requirements.in
phonenumbers==8.12.41
phonenumbers==8.12.44
# via -r requirements.in
premailer==3.10.0
# via -r requirements.in
Expand Down Expand Up @@ -279,15 +281,15 @@ pyjsparser==2.7.1
# via js2py
pyjwt==2.3.0
# via twilio
pymdown-extensions==9.1
pymdown-extensions==9.2
# via -r requirements.in
pynacl==1.5.0
# via paramiko
pyopenssl==21.0.0
pyopenssl==22.0.0
# via
# baseframe
# ndg-httpsclient
pyparsing==3.0.6
pyparsing==3.0.7
# via
# httplib2
# packaging
Expand Down Expand Up @@ -318,7 +320,7 @@ pyyaml==5.4.1
# flask-flatpages
qrcode==7.3.1
# via -r requirements.in
redis==4.1.0
redis==4.1.4
# via
# baseframe
# flask-redis
Expand All @@ -342,7 +344,7 @@ requests-file==1.5.1
# via tldextract
requests-mock==1.9.3
# via baseframe
requests-oauthlib==1.3.0
requests-oauthlib==1.3.1
# via tweepy
rq==1.10.1
# via
Expand All @@ -356,13 +358,13 @@ rsa==4.7.2
# via
# awscli
# oauth2client
s3transfer==0.5.0
s3transfer==0.5.2
# via
# awscli
# boto3
semantic-version==2.8.5
semantic-version==2.9.0
# via baseframe
sentry-sdk==1.5.2
sentry-sdk==1.5.6
# via baseframe
six==1.16.0
# via
Expand All @@ -376,7 +378,6 @@ six==1.16.0
# mxsniff
# oauth2client
# orderedmultidict
# pyopenssl
# python-dateutil
# requests-file
# requests-mock
Expand All @@ -385,7 +386,7 @@ six==1.16.0
# url-normalize
speaklater==1.3
# via baseframe
sqlalchemy==1.4.29
sqlalchemy==1.4.31
# via
# -r requirements.in
# alembic
Expand All @@ -396,17 +397,17 @@ sqlalchemy-utils==0.38.2
# via -r requirements.in
statsd==3.3.0
# via baseframe
tinydb==4.5.2
tinydb==4.7.0
# via tuspy
tldextract==3.1.2
tldextract==3.2.0
# via mxsniff
tuspy==0.2.5
# via pyvimeo
tweepy==4.4.0
tweepy==4.6.0
# via -r requirements.in
twilio==7.5.0
twilio==7.7.0
# via -r requirements.in
typing-extensions==4.0.1
typing-extensions==4.1.1
# via
# -r requirements.in
# typing-inspect
Expand Down Expand Up @@ -434,12 +435,12 @@ webencodings==0.5.1
# via
# bleach
# html5lib
werkzeug==2.0.2
werkzeug==2.0.3
# via
# -r requirements.in
# baseframe
# flask
whitenoise==5.3.0
whitenoise==6.0.0
# via -r requirements.in
wrapt==1.13.3
# via deprecated
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
awscli # Dupe from requirements.in due to conflicting requirements for PyYAML versions
flake8
flake8-assertive
flake8-bandit
Expand Down
Loading

0 comments on commit 48f8c57

Please sign in to comment.