carpedm20 / emoji

emoji terminal output for Python
Other
1.9k stars 279 forks source link

Latest emoji package release resolves dependencies incorrectly #297

Closed mateuszsokola closed 6 months ago

mateuszsokola commented 6 months ago

A new version of the emoji package was released 30 minutes ago, causing installation issues with the new-relic-cli tool. It seems like dependencies aren't imported correctly in your package.

NewRelic Issue: https://github.com/newrelic/newrelic-lambda-cli/issues/281

Logs:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.5/x64/bin/newrelic-lambda", line 5, in <module>
    from newrelic_lambda_cli.cli import main
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/newrelic_lambda_cli/cli/__init__.py", line 5, in <module>
    from newrelic_lambda_cli.cli import functions, integrations, layers, subscriptions
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/newrelic_lambda_cli/cli/integrations.py", line 6, in <module>
    from newrelic_lambda_cli import api, integrations, permissions
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/newrelic_lambda_cli/api.py", line 19, in <module>
    from newrelic_lambda_cli.cliutils import failure, success
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/newrelic_lambda_cli/cliutils.py", line 4, in <module>
    import emoji
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/emoji/__init__.py", line 47, in <module>
    from emoji.core import *
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/emoji/core.py", line 12, in <module>
    from typing_extensions import Literal, Match, TypedDict
ImportError: cannot import name 'Match' from 'typing_extensions' (/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/typing_extensions.py)
cvzi commented 6 months ago

It seems like this 'typing_extensions' version, that is installed here, is too old. So I think we need to specify a supported version for 'typing_extensions' in the pyproject.toml

cvzi commented 6 months ago

Minimal version that we need is typing-extensions >= 4.7.0