aws / aws-lambda-python-runtime-interface-client

Apache License 2.0
258 stars 73 forks source link

Remove the importlib-metadata dependency #83

Closed DavidCain closed 2 years ago

DavidCain commented 2 years ago

This should complete a previous attempt to remove dependency on the package, unblocking use of awslambdaric in projects that use a newer version of importlib-metadata. Version 2 of importlib-metadata is reasonably old - version 4.4 is present in Python 3.10 for instance.

Motivation for the change

I think issue #61 covers it well, but essentially it becomes difficult to use awslambdaric in a virtualenv with other dependencies that expect a newer version of importlib-metadata:

awslambdaric isn't supposed to need importlib-metadata anyway

Previous work (in August of 2021, with version 1.2.2) removed all dependency on the importlib-metadata package, but accidentally left importlib-metadata as a full dependency of this package:

Most recent version still has importlib-metadata dependency

$ pip show awslambdaric
Name: awslambdaric
Version: 2.0.4
...
Requires: importlib-metadata, simplejson

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

I've read CONTRIBUTING.md and believe this should be all that's needed for a PR, but please let me know if I'm missing anything!

DavidCain commented 2 years ago

I do recognize that this PR should likely increment __version__ and add some release notes, but that's presuming that you choose to accept the change and release it with 2.0.5 (or 2.1.0, or whatever the next release is).

DavidCain commented 2 years ago

Maintainers - is there any chance this (one-line) PR can get some eyes? It should be exceedingly safe, and for many people will fix the ability to use awslambdaric on Python 3.7.

DavidCain commented 2 years ago

@carlzogh @smirnoal and/or @SukanyaHanumanthu - sorry to ping, but is there any chance you could take a look?

tylertrussell commented 1 year ago

@keshayad - sorry to ping you, but can we get this released into PyPi sometime soon? it's preventing us from updating some important dependencies.

ssiano commented 1 year ago

@keshayad, I also have the same request as @tylertrussell. Could you please release this to PyPI?

The pinning of importlib-metadata~=2.0 is also preventing us from updating some important dependencies.