Skip to content

Commit 1825348

Browse files
authored
Merge pull request #153 from edly-io/omer/replace_pkg_resources
xblock-image-explorer | Drop py3.8 support | replace pkg_resource with importlib.resources
2 parents 5122371 + 4cc8dc6 commit 1825348

File tree

11 files changed

+61
-98
lines changed

11 files changed

+61
-98
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: [ubuntu-latest]
22-
python-version: ['3.8', '3.11', '3.12']
22+
python-version: ['3.11', '3.12']
2323
toxenv: [django42, quality, package]
2424

2525
steps:

.github/workflows/pypi-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: setup python
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: 3.8
18+
python-version: 3.11
1919

2020
- name: Install Dependencies
2121
run: pip install -r requirements/pip.txt

image_explorer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
"""
2323
from .image_explorer import ImageExplorerBlock
2424

25-
__version__ = '2.2.1'
25+
__version__ = '3.0.0'

image_explorer/image_explorer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import textwrap
3131
from io import StringIO
3232
from urllib.parse import urljoin
33-
import pkg_resources
3433

3534
from django.conf import settings
3635
from lxml import etree, html
@@ -465,5 +464,4 @@ def workbench_scenarios():
465464

466465
def resource_string(self, path):
467466
"""Handy helper for getting resources from our kit."""
468-
data = pkg_resources.resource_string(__name__, path)
469-
return data.decode("utf8")
467+
return loader.load_unicode(path)

requirements/base.txt

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.8
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# make upgrade
@@ -8,19 +8,15 @@ appdirs==1.4.4
88
# via fs
99
asgiref==3.8.1
1010
# via django
11-
backports-zoneinfo==0.2.1 ; python_version < "3.9"
12-
# via
13-
# -c requirements/constraints.txt
14-
# django
15-
boto3==1.34.131
11+
boto3==1.35.15
1612
# via fs-s3fs
17-
botocore==1.34.131
13+
botocore==1.35.15
1814
# via
1915
# boto3
2016
# s3transfer
2117
cssselect==1.2.0
2218
# via parsel
23-
django==4.2.13
19+
django==4.2.16
2420
# via
2521
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
2622
# openedx-django-pyfs
@@ -37,7 +33,7 @@ jmespath==1.0.1
3733
# botocore
3834
lazy==1.6
3935
# via xblock
40-
lxml==5.2.2
36+
lxml==5.3.0
4137
# via
4238
# parsel
4339
# xblock
@@ -47,7 +43,7 @@ markupsafe==2.1.5
4743
# via
4844
# mako
4945
# xblock
50-
openedx-django-pyfs==3.6.0
46+
openedx-django-pyfs==3.7.0
5147
# via xblock
5248
parsel==1.6.0
5349
# via
@@ -59,31 +55,29 @@ python-dateutil==2.9.0.post0
5955
# xblock
6056
pytz==2024.1
6157
# via xblock
62-
pyyaml==6.0.1
58+
pyyaml==6.0.2
6359
# via xblock
64-
s3transfer==0.10.1
60+
s3transfer==0.10.2
6561
# via boto3
66-
simplejson==3.19.2
62+
simplejson==3.19.3
6763
# via xblock
6864
six==1.16.0
6965
# via
7066
# fs
7167
# fs-s3fs
7268
# parsel
7369
# python-dateutil
74-
sqlparse==0.5.0
70+
sqlparse==0.5.1
7571
# via django
76-
typing-extensions==4.12.2
77-
# via asgiref
78-
urllib3==1.26.19
72+
urllib3==2.2.2
7973
# via botocore
8074
w3lib==2.2.1
8175
# via parsel
8276
web-fragments==2.2.0
8377
# via xblock
84-
webob==1.8.7
78+
webob==1.8.8
8579
# via xblock
86-
xblock[django]==4.0.1
80+
xblock[django]==5.1.0
8781
# via -r requirements/base.in
8882

8983
# The following packages are considered to be unsafe in a requirements file:

requirements/ci.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.8
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# make upgrade
66
#
7-
cachetools==5.3.3
7+
cachetools==5.5.0
88
# via tox
99
chardet==5.2.0
1010
# via tox
1111
colorama==0.4.6
1212
# via tox
1313
distlib==0.3.8
1414
# via virtualenv
15-
filelock==3.15.4
15+
filelock==3.16.0
1616
# via
1717
# tox
1818
# virtualenv
1919
packaging==24.1
2020
# via
2121
# pyproject-api
2222
# tox
23-
platformdirs==4.2.2
23+
platformdirs==4.3.2
2424
# via
2525
# tox
2626
# virtualenv
2727
pluggy==1.5.0
2828
# via tox
2929
pyproject-api==1.7.1
3030
# via tox
31-
tomli==2.0.1
32-
# via
33-
# pyproject-api
34-
# tox
35-
tox==4.15.1
31+
tox==4.18.1
3632
# via -r requirements/ci.in
37-
virtualenv==20.26.3
33+
virtualenv==20.26.4
3834
# via tox

requirements/pip-tools.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.8
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# make upgrade
@@ -13,9 +13,7 @@ click==8.1.7
1313
# -r requirements/pip-tools.in
1414
# pip-tools
1515
importlib-metadata==7.0.1
16-
# via
17-
# -r requirements/pip-tools.in
18-
# build
16+
# via -r requirements/pip-tools.in
1917
packaging==23.2
2018
# via
2119
# -r requirements/pip-tools.in
@@ -27,11 +25,7 @@ pyproject-hooks==1.0.0
2725
# -r requirements/pip-tools.in
2826
# build
2927
tomli==2.0.1
30-
# via
31-
# -r requirements/pip-tools.in
32-
# build
33-
# pip-tools
34-
# pyproject-hooks
28+
# via -r requirements/pip-tools.in
3529
wheel==0.42.0
3630
# via
3731
# -r requirements/pip-tools.in

requirements/pip.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.8
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# make upgrade
66
#
7-
wheel==0.43.0
7+
wheel==0.44.0
88
# via -r requirements/pip.in
99

1010
# The following packages are considered to be unsafe in a requirements file:
11-
pip==24.1
11+
pip==24.2
1212
# via -r requirements/pip.in
13-
setuptools==70.1.0
13+
setuptools==74.1.2
1414
# via -r requirements/pip.in

0 commit comments

Comments
 (0)