Skip to content

Commit

Permalink
Merge pull request #30 from irtazaakram/depr-pkg_resources
Browse files Browse the repository at this point in the history
Replace pkg_resources with importlib.resources
  • Loading branch information
feanil authored Jan 17, 2025
2 parents bdf4501 + 3ca904e commit a3250f3
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
matrix:
os:
- ubuntu-latest
python-version: ['3.8', '3.11']
python-version: ['3.11', '3.12']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ For more information about the Tin Can API visit:

<http://tincanapi.com/>

Requires Python 3.8 or later.
Requires Python 3.11 or later.

## Installation
TinCanPython requires [Python 3.8](https://www.python.org/downloads/) or later.
TinCanPython requires [Python 3.11](https://www.python.org/downloads/) or later.

If you are installing from the Github repo, you will need to install `aniso8601` and `pytz` (use `sudo` as necessary):

Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import sys
import os
import pkg_resources
from importlib.metadata import version as get_version

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -64,9 +64,9 @@ def setup(app):
# built documents.
#
# The short X.Y version.
version = pkg_resources.require("tincan")[0].version
version = get_version("tincan")
# The full version, including alpha/beta/rc tags.
release = pkg_resources.require("tincan")[0].version
release = get_version("tincan")

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
8 changes: 4 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
#
aniso8601==9.0.1
aniso8601==10.0.0
# via -r requirements/base.in
pytz==2020.5
pytz==2024.2
# via -r requirements/base.in
8 changes: 4 additions & 4 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
#
aniso8601==9.0.1
aniso8601==10.0.0
# via -r requirements/test.txt
pytz==2020.5
pytz==2024.2
# via -r requirements/test.txt
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
# link to other information that will help people in the future to remove the
# pin when possible. Writing an issue against the offending project and
# linking to it here is good.

# Common constraints for edx repos
-c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
1 change: 1 addition & 0 deletions requirements/pip.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-c constraints.txt
# Core dependencies for installing other packages

pip
Expand Down
16 changes: 9 additions & 7 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/pip.txt requirements/pip.in
# make upgrade
#
wheel==0.42.0
wheel==0.45.1
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
pip==24.2
# via
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/pip.in
setuptools==75.8.0
# via -r requirements/pip.in
setuptools==69.1.1
# via -r requirements/pip.in
19 changes: 15 additions & 4 deletions requirements/pip_tools.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
#
click==8.1.7
build==1.2.2.post1
# via pip-tools
pip-tools==7.4.0
click==8.1.8
# via pip-tools
packaging==24.2
# via build
pip-tools==7.4.1
# via -r requirements/pip_tools.in
pyproject-hooks==1.2.0
# via
# build
# pip-tools
wheel==0.45.1
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
8 changes: 4 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
#
aniso8601==9.0.1
aniso8601==10.0.0
# via -r requirements/base.txt
pytz==2020.5
pytz==2024.2
# via -r requirements/base.txt
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_version(*file_paths):
author_email='[email protected]',
classifiers=[
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
maintainer_email='mailto:[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion tincan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@
from .verb import Verb
from .version import Version

__version__ = '1.1.0'
__version__ = '2.0.0'

0 comments on commit a3250f3

Please sign in to comment.