File: importlib-metadata.patch

package info (click to toggle)
coreapi 2.3.3-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 244 kB
  • sloc: python: 1,562; makefile: 3
file content (33 lines) | stat: -rw-r--r-- 1,002 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Colin Watson <cjwatson@debian.org>
Date: Mon, 26 Jan 2026 13:27:18 +0000
Subject: Port to importlib.metadata

Bug-Debian: https://bugs.debian.org/1125834
Last-Update: 2026-01-26
---
 coreapi/utils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/coreapi/utils.py b/coreapi/utils.py
index fb7ade4..b650c86 100644
--- a/coreapi/utils.py
+++ b/coreapi/utils.py
@@ -1,8 +1,8 @@
 from coreapi import exceptions
 from coreapi.compat import string_types, text_type, urlparse, _TemporaryFileWrapper
 from collections import namedtuple
+from importlib.metadata import entry_points
 import os
-import pkg_resources
 import tempfile
 
 
@@ -23,7 +23,7 @@ def domain_matches(request, domain):
 def get_installed_codecs():
     packages = [
         (package, package.load()) for package in
-        pkg_resources.iter_entry_points(group='coreapi.codecs')
+        entry_points(group='coreapi.codecs')
     ]
     return {
         package.name: cls() for (package, cls) in packages