Skip to content

Commit 31cbfcb

Browse files
authored
Merge pull request #84 from metabrainz/version-upgrades
Upgrade to python 3, flask 2, and other dependencies
2 parents cc1e265 + bcc913c commit 31cbfcb

5 files changed

Lines changed: 27 additions & 23 deletions

File tree

brainzutils/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
# TODO: We are the backport of importlib to support python 3.7.
2-
# When we raise the minimum to python 3.8, we can remove this and use the builtin importlib module.
3-
from importlib_metadata import version, PackageNotFoundError
1+
import sys
2+
3+
if sys.version_info >= (3, 10):
4+
from importlib.metadata import version, PackageNotFoundError
5+
else:
6+
# importlib.metadata's API changed in 3.10, so use a backport for versions less than this.
7+
from importlib_metadata import version, PackageNotFoundError
48

59
try:
610
__version__ = version(__name__)
711
except PackageNotFoundError:
812
# package is not installed
9-
pass
13+
__version__ = "unknown"

requirements.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
Flask>=1.1.2
2-
Jinja2>=2.11.2
3-
werkzeug>=1.0.1
4-
Flask-DebugToolbar>=0.11.0
1+
Flask>=2.1.0
2+
Jinja2>=3.0
3+
itsdangerous>=2.0
4+
click>=8.0
5+
Werkzeug>=2.0
6+
Flask-DebugToolbar>=0.13.1
57
Flask-UUID>=0.2
6-
sentry-sdk[flask]>=0.20.2
8+
sentry-sdk[flask]>=1.5.8
79
certifi
8-
redis>=3.5,<4.0
9-
msgpack==0.5.6
10-
requests>=2.23.0
11-
SQLAlchemy>=1.3.16
10+
redis>=4.2.2
11+
msgpack-python==0.5.6
12+
requests>=2.27.1
13+
SQLAlchemy>=1.3.16,<2.0
1214
mbdata@git+https://github.com/amCap1712/mbdata.git@upstream-schema-changes
1315
sqlalchemy-dst>=1.0.1
14-
importlib-metadata>=3.10.0
15-
itsdangerous==2.0.1
16-
MarkupSafe==2.0.1
16+
importlib-metadata>=3.10.0;python_version<'3.10'

requirements_dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
psycopg2-binary==2.8.6
2-
freezegun==0.3.15
3-
pytest==4.6.9
4-
pytest-cov==2.8.1
5-
pylint==1.9.4
1+
psycopg2-binary==2.9.3
2+
freezegun==1.2.1
3+
pytest==7.1.1
4+
pytest-cov==3.0.0
5+
pylint==2.13.5

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
packages=find_packages(),
1313
use_scm_version=True,
1414
setup_requires=['setuptools_scm'],
15-
install_requires=open("requirements.txt").read().split(),
15+
install_requires=open("requirements.txt").read().splitlines(),
1616
)

test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM metabrainz/python:3.7-20210115
1+
FROM metabrainz/python:3.10-20220315
22

33
ENV DOCKERIZE_VERSION v0.6.1
44
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \

0 commit comments

Comments
 (0)