Skip to content

Commit 0c33919

Browse files
committed
fix(tests): version;
- Added support for old types of python namespace packaging.
1 parent 4c88768 commit 0c33919

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

changes/0011.canada.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added suppot for old types of Python namespace packaging.

ckan/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# encoding: utf-8
22

3+
# (canada fork only): old namespace package
4+
# TODO: remove after python dependency upgrades...
5+
try:
6+
import pkg_resources
7+
# type_ignore_reason: reportAttributeAccessIssue
8+
pkg_resources.declare_namespace(__name__)
9+
except ImportError:
10+
import pkgutil
11+
__path__ = pkgutil.extend_path(__path__, __name__)
12+
313
__version__ = "2.10.8"
414

515
# The packaging system relies on this import, please do not remove it

0 commit comments

Comments
 (0)