Merge lp:~jelmer/loggerhead/setuptools-deprecated into lp:loggerhead

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 543
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~jelmer/loggerhead/setuptools-deprecated
Merge into: lp:loggerhead
Diff against target: 15 lines (+4/-1)
1 file modified
loggerhead/__init__.py (+4/-1)
To merge this branch: bzr merge lp:~jelmer/loggerhead/setuptools-deprecated
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+436502@code.launchpad.net

Commit message

Fix a deprecation warning from setuptools

Description of the change

Fix a deprecation warning from setuptools

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loggerhead/__init__.py'
2--- loggerhead/__init__.py 2022-08-21 13:31:24 +0000
3+++ loggerhead/__init__.py 2023-01-30 00:31:45 +0000
4@@ -27,7 +27,10 @@
5 except importlib_metadata.PackageNotFoundError:
6 # Support running tests from the build tree without installation.
7 import os
8- from setuptools.config import read_configuration
9+ try:
10+ from setuptools.config.setupcfg import read_configuration
11+ except ModuleNotFoundError:
12+ from setuptools.config import read_configuration
13 cfg = read_configuration(os.path.join(os.path.dirname(__file__), '..', 'setup.cfg'))
14 __version__ = cfg['metadata']['version']
15 __revision__ = None

Subscribers

People subscribed via source and target branches