Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docxcompose/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from lxml.etree import QName
from six import binary_type
from six import text_type
import pkg_resources
import importlib.resources as importlib_resources
import re


Expand Down Expand Up @@ -108,8 +108,8 @@ def __init__(self, doc):
self._element = parse_xml(part.blob)

def _part_template(self):
return pkg_resources.resource_string(
'docxcompose', 'templates/custom.xml')
ref = importlib_resources.files('docxcompose').joinpath('templates/custom.xml')
return ref.read_bytes()

def _update_part(self):
if self.part is None:
Expand Down