Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MNT: Deprecate cbook.maxdict#22299

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
greglucas wants to merge1 commit intomatplotlib:mainfromgreglucas:rm-max-dict

Conversation

greglucas
Copy link
Contributor

PR Summary

It was used in one place in the library and there is now a standard library lru_cache that we can take advantage of instead. This adds a new private method that is called after the key is created.

Closes#22278

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

It was used in one place in the library and there is nowa standard library lru_cache that we can take advantage of instead.
Comment on lines +299 to +300
@functools.lru_cache(maxsize=50)
def _get_layout_cache(self, key, renderer):
Copy link
Member

Choose a reason for hiding this comment

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

This is broken from what@anntzer mentioned, because it's caching onself.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

🐑 Doh! Should have read that closer. I'll move to draft for now and wait until#22271 goes in to have another look at this.

Copy link
Member

Choose a reason for hiding this comment

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

FYI#22271 is in.

@greglucasgreglucas marked this pull request as draftJanuary 25, 2022 15:11
@greglucas
Copy link
ContributorAuthor

Closing in favor of#22323

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@timhoffmtimhoffmtimhoffm left review comments

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Deprecate/remove maxdict
3 participants
@greglucas@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp