Skip to content

Conversation

@amenezes
Copy link

  • Fix deprecated matplotlib function
test/test_wordcloud.py: 46 warnings
  wordcloud/wordcloud.py:106: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap(obj)`` instead.
    self.colormap = plt.cm.get_cmap(colormap)
  • Added metadata classifiers
  • Improve regex performance using re.compile

else 0)
pattern = r"\w[\w']*" if self.min_word_length <= 1 else r"\w[\w']+"
regexp = self.regexp if self.regexp is not None else pattern
if self.regexp is not None:
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for the PR!
This call to compile actually doesn't change anything, as the object is only used once, right?

Copy link
Author

Choose a reason for hiding this comment

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

@amueller,

Really sorry for the long delay. Yes there's no change on the workflow. The ideia is to simplify.

All the tests have passed locally, do you think it's useful to include any more?

Copy link
Owner

Choose a reason for hiding this comment

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

No worries, I'm only very sporadically on this project these days. How does this change about the re simplify, the code gets longer, right?

@QuLogic
Copy link

QuLogic commented Apr 24, 2024

Just a friendly ping here; Matplotlib 3.9 will be out soon and this deprecation will be a hard error.

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.

3 participants