Skip to content

Commit

Permalink
Merge pull request #193 from zopefoundation/drop-pkg-resources-usage
Browse files Browse the repository at this point in the history
Drop pkg_resources usage
  • Loading branch information
gforcada authored Mar 4, 2025
2 parents 89ab203 + f7bb461 commit 60cc871
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
7.1 (unreleased)
================

- Nothing changed yet.
- Replace `pkg_resources` with `importlib.metadata`


7.0 (2025-02-12)
Expand Down
5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

import os
import sys

import pkg_resources
from importlib.metadata import distribution


sys.path.append(os.path.abspath('../src'))
rqmt = pkg_resources.require('zope.testrunner')[0]
rqmt = distribution('zope.testrunner')

# 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
5 changes: 2 additions & 3 deletions src/zope/testrunner/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
import os
import re
import sys

import pkg_resources
from importlib.metadata import distribution

from zope.testrunner.formatter import ColorfulOutputFormatter
from zope.testrunner.formatter import OutputFormatter
Expand Down Expand Up @@ -611,7 +610,7 @@ def apply_auto_progress(args):
options.original_testrunner_args = args

if options.showversion:
dist = pkg_resources.require('zope.testrunner')[0]
dist = distribution('zope.testrunner')
print('zope.testrunner version %s' % dist.version)
sys.exit(0)

Expand Down

0 comments on commit 60cc871

Please sign in to comment.