Skip to content

Conversation

@tvuotila
Copy link

@tvuotila tvuotila commented Sep 29, 2023

Fixes #90

Use importlib.resources.files (usage copied from documentation) instead of deprecated pkg_resources.resource_string (function documentation).

Install importlib-resources backport package on Python versions less than 3.9 (documentation on how to do that).

importlib.resources.files was introduced in Python 3.9 (function documentation). Use minimum version of 1.3 for importlib-resources package as that matches the Python 3.9 (compatibility table) I was importing the importlib-resources package wrong. I instead bumped the required Python version to 3.9.

@tvuotila
Copy link
Author

Is there anything I can do to get this merged?

@yobuntu
Copy link

yobuntu commented May 3, 2024

As python 3.12 is now the new stable python version and raise a deprecated warning on using pkg_resources api, this merge is really needed

@lafrech
Copy link

lafrech commented May 24, 2024

Was about to look into fixing this. Thanks @tvuotila for taking care of it.

@awtimmering
Copy link

Hoping to see this merged soon ...

@skupriienko
Copy link

skupriienko commented Aug 1, 2024

I'm joining to the crowd waiting this PR merged soon...

@theodore86
Copy link

Bump

@rburhum
Copy link

rburhum commented Dec 29, 2024

Throw us a Christmas gift @lukasgraf Pretty please :-)

@hoetaek
Copy link

hoetaek commented Jun 10, 2025

Hoping to see this merged too...

2 similar comments
@aurelien-slodzian
Copy link

Hoping to see this merged too...

@Kolger
Copy link

Kolger commented Jun 20, 2025

Hoping to see this merged too...

@mredaelli
Copy link

Same. Maybe @buchi can help?

@daldbv314
Copy link

+1

@Va1a
Copy link

Va1a commented Jul 8, 2025

@buchi Save us please, deprecation warnings are ugly.

@rostisluvvv
Copy link

can you tell me if this update will be included in the master branch?

@saadshaikh3
Copy link

Hoping to see this merged too...

@francisco-ramirez-neostella

bump

@jeff-2025-jp
Copy link

Can this fix be merged and released soon?

@acanalis
Copy link

acanalis commented Sep 9, 2025

@lukasgraf is this on your radar? Dependants on docxtpl are currently getting this warning:

...\docxcompose\properties.py:18:` UserWarning: pkg_resources is deprecated as an API. 
See https://setuptools.pypa.io/en/latest/pkg_resources.html. 
The pkg_resources package is slated for removal as early as 2025-11-30. 
Refrain from using this package or pin to Setuptools<81.

Any help with this issue will be much appreciated by many! Best to you 😎

@lukasgraf
Copy link
Contributor

Hey @acanalis and everyone else,
I do not work for 4teamwork any more. So unfortunately I cannot help with a merge or release here, sorry! 😢

@barbich
Copy link

barbich commented Sep 17, 2025

hi
is anyone operating a clean and reliable fork of the project which to switch to ?

@lafrech
Copy link

lafrech commented Sep 17, 2025 via email

@jdamian1310
Copy link

hi is anyone operating a clean and reliable fork of the project which to switch to ?

from july 2025
https://github.com/darkvisiontech/docxcompose

@jcardali
Copy link

@lukasgraf Who does still work for 4teamwork that you recommend reaching out to? Thanks!

@etienned
Copy link

etienned commented Oct 8, 2025

@jcardali, maybe @buchi. Looks like is the only one who touch the project after @lukasgraf quit.

@jcardali
Copy link

jcardali commented Oct 8, 2025

@etienned I tagged him in #105 (comment), but no response yet 🤞

@zlonghofer
Copy link

@lukasgraf even if you're no longer with 4teamwork, perhaps you can point us to a reliable contact at the organization who could approve this PR and get eyes on making sure external contributors could approve a PR and publish a new version to PyPI? @buchi doesn't appear to be responsive.

It looks like we're only a few weeks out from possible package removal on the 30th of this month; perhaps darkvision's repo or another fork will be the best alternative, but it'd be a shame to need to publish a new package to PyPI instead of a new version!

@kairkhan713
Copy link

is there any forked and fixed repository? I want to add to my pyproject directly from github

setup.py Outdated
include_package_data=True,
zip_safe=True,
install_requires=[
'importlib-resources >= 1.3;python_version<"3.9"',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This backport needs to be imported differently: the module name is importlib_resources, not importlib.resources.

However, given that Python 3.8 EOL date was in October 2024, I think you can remove this backport completely and bump required Python to 3.9.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are completely right!

I will bump the required Python to 3.9.

Fixes 4teamwork#90
Require Python 3.9+, because importlib.resources.files is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: stop using pkg_resources