Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xblock-image-explorer | Drop py3.8 support | replace pkg_resource with importlib.resources #153

Merged
merged 7 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.11', '3.12']
python-version: ['3.11', '3.12']
toxenv: [django42, quality, package]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.11

- name: Install Dependencies
run: pip install -r requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion image_explorer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"""
from .image_explorer import ImageExplorerBlock

__version__ = '2.2.1'
__version__ = '3.0.0'
4 changes: 1 addition & 3 deletions image_explorer/image_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import textwrap
from io import StringIO
from urllib.parse import urljoin
import pkg_resources

from django.conf import settings
from lxml import etree, html
Expand Down Expand Up @@ -465,5 +464,4 @@ def workbench_scenarios():

def resource_string(self, path):
"""Handy helper for getting resources from our kit."""
data = pkg_resources.resource_string(__name__, path)
return data.decode("utf8")
return loader.load_unicode(path)
32 changes: 13 additions & 19 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
Expand All @@ -8,19 +8,15 @@ appdirs==1.4.4
# via fs
asgiref==3.8.1
# via django
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
boto3==1.34.131
boto3==1.35.15
# via fs-s3fs
botocore==1.34.131
botocore==1.35.15
# via
# boto3
# s3transfer
cssselect==1.2.0
# via parsel
django==4.2.13
django==4.2.16
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# openedx-django-pyfs
Expand All @@ -37,7 +33,7 @@ jmespath==1.0.1
# botocore
lazy==1.6
# via xblock
lxml==5.2.2
lxml==5.3.0
# via
# parsel
# xblock
Expand All @@ -47,7 +43,7 @@ markupsafe==2.1.5
# via
# mako
# xblock
openedx-django-pyfs==3.6.0
openedx-django-pyfs==3.7.0
# via xblock
parsel==1.6.0
# via
Expand All @@ -59,31 +55,29 @@ python-dateutil==2.9.0.post0
# xblock
pytz==2024.1
# via xblock
pyyaml==6.0.1
pyyaml==6.0.2
# via xblock
s3transfer==0.10.1
s3transfer==0.10.2
# via boto3
simplejson==3.19.2
simplejson==3.19.3
# via xblock
six==1.16.0
# via
# fs
# fs-s3fs
# parsel
# python-dateutil
sqlparse==0.5.0
sqlparse==0.5.1
# via django
typing-extensions==4.12.2
# via asgiref
urllib3==1.26.19
urllib3==2.2.2
# via botocore
w3lib==2.2.1
# via parsel
web-fragments==2.2.0
# via xblock
webob==1.8.7
webob==1.8.8
# via xblock
xblock[django]==4.0.1
xblock[django]==5.1.0
# via -r requirements/base.in

# The following packages are considered to be unsafe in a requirements file:
Expand Down
16 changes: 6 additions & 10 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
#
cachetools==5.3.3
cachetools==5.5.0
# via tox
chardet==5.2.0
# via tox
colorama==0.4.6
# via tox
distlib==0.3.8
# via virtualenv
filelock==3.15.4
filelock==3.16.0
# via
# tox
# virtualenv
packaging==24.1
# via
# pyproject-api
# tox
platformdirs==4.2.2
platformdirs==4.3.2
# via
# tox
# virtualenv
pluggy==1.5.0
# via tox
pyproject-api==1.7.1
# via tox
tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.15.1
tox==4.18.1
# via -r requirements/ci.in
virtualenv==20.26.3
virtualenv==20.26.4
# via tox
12 changes: 3 additions & 9 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
Expand All @@ -13,9 +13,7 @@ click==8.1.7
# -r requirements/pip-tools.in
# pip-tools
importlib-metadata==7.0.1
# via
# -r requirements/pip-tools.in
# build
# via -r requirements/pip-tools.in
packaging==23.2
# via
# -r requirements/pip-tools.in
Expand All @@ -27,11 +25,7 @@ pyproject-hooks==1.0.0
# -r requirements/pip-tools.in
# build
tomli==2.0.1
# via
# -r requirements/pip-tools.in
# build
# pip-tools
# pyproject-hooks
# via -r requirements/pip-tools.in
wheel==0.42.0
# via
# -r requirements/pip-tools.in
Expand Down
8 changes: 4 additions & 4 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
#
wheel==0.43.0
wheel==0.44.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.1
pip==24.2
# via -r requirements/pip.in
setuptools==70.1.0
setuptools==74.1.2
# via -r requirements/pip.in
Loading