Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.7.0 with deprecation warnings #203

Merged
merged 7 commits into from
Mar 7, 2022

Conversation

cvzi
Copy link
Contributor

@cvzi cvzi commented Feb 19, 2022

Changes:

  • create function emoji_list()
  • create function distinct_emoji_list()
  • Deprecation warnings for:
    • the old dicts EMOJI_UNICODE_*, UNICODE_EMOJI_*, ...
    • language parameters, that don't have an effect
    • emoji.get_emoji_regexp() method: suggestion in the warning is to use replace_emoji() instead
    • use_alias parameter: suggestion in the warning is to use language='alias'
    • emoji.distinct_emoji_lis(): suggestion is to use distinct_emoji_list()
    • emoji.emoji_lis(): suggestion is to use emoji_list().

The warnings look like this:

file.py:28: DeprecationWarning: 'emoji.get_emoji_regexp()' is deprecated and will be removed in version 2.0.0. If you want to remove emoji from a string, consider the method emoji.replace_emoji(str, replace='').
To hide this warning, pin/downgrade the package to 'emoji~=1.6.3'

In Python 3.7, 3.8, 3.9, 3.10 the deprecation warnings are shown by default if one of the functions/variables is used.
In Python 2.7, 3.4, 3.5, 3.6 the deprecation warnings are not shown by default, you would need to enable all warnings with python -W all file.py to see them.
Also in these older version the warning for module variables e.g. emoji.EMOJI_UNICODE_* don't work.
I don't think that is problem, someone who is still using an old Python version is probably not going to just update this package without testing it.

cvzi added 7 commits February 16, 2022 17:51
*  Create function `distinct_emoji_list()`
*  Deprecation warnings for:
   *  the old dicts `EMOJI_UNICODE_*, UNICODE_EMOJI_*`
   *  some `language` parameters, that don't have an effect
   *  `emoji.get_emoji_regexp` method: suggestions is to use `replace_emoji()` instead
   *  `use_alias` parameter: suggestion is to use `language='alias'`
   *  `emoji.emoji_lis()`: suggestion is to use `emoji_list()`
   *  `emoji.distinct_emoji_lis()`: suggestion is to use `distinct_emoji_list()`
@TahirJalilov
Copy link
Collaborator

@cvzi Thank you for your PR. Sorry for the merge delay (((

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.

2 participants