René's URL Explorer Experiment


Title: [MNT]: Remove 3.7-deprecated API · Issue #26865 · matplotlib/matplotlib · GitHub

Open Graph Title: [MNT]: Remove 3.7-deprecated API · Issue #26865 · matplotlib/matplotlib

X Title: [MNT]: Remove 3.7-deprecated API · Issue #26865 · matplotlib/matplotlib

Description: Summary As old and unused API (classes, methods, functions) are found, they are marked deprecated with removal intended in a later release. These API are decorated or otherwise wrapped with the deprecation functions in _api (i.e., deprec...

Open Graph Description: Summary As old and unused API (classes, methods, functions) are found, they are marked deprecated with removal intended in a later release. These API are decorated or otherwise wrapped with the dep...

X Description: Summary As old and unused API (classes, methods, functions) are found, they are marked deprecated with removal intended in a later release. These API are decorated or otherwise wrapped with the dep...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/26865

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Remove 3.7-deprecated API","articleBody":"# Summary\r\n\r\nAs old and unused API (classes, methods, functions) are found, they are marked deprecated with removal intended in a later release. These API are decorated or otherwise wrapped with [the deprecation functions in `_api`](https://github.com/matplotlib/matplotlib/blob/dceb278bef361f32eb0009dec5bfda41fc27fa38/lib/matplotlib/_api/__init__.py#L19-L22) (i.e., `deprecated`, `warn_deprecated`, `rename_parameter`, `delete_parameter`, `make_keyword_only`, `deprecate_method_override`, or `deprecate_privatize_attribute`).\r\n\r\nNow that 3.8 is out and `main` targets 3.9, we can start the process of removing API that were deprecated in 3.7 (i.e., those with `since=\"3.7\"` and without `pending=True`).\r\n\r\n# Proposed fix\r\n\r\nEach part of the deprecated API should be removed:\r\n1. The deprecated code itself:\r\n    a. Items marked with `_api.warn_deprecated`, `@_api.deprecated` or `@_api.deprecate_privatize_attribute` are to be removed on expiry, i.e., any of the marked lines below:\r\n    ```diff\r\n    -@api.deprecated(\"3.7\", ...)\r\n    -def foo():\r\n    -    pass\r\n\r\n     def bar(x):\r\n         if x is None:\r\n    -        _api.warn_deprecated(\"3.7\", message=\"x=None is deprecated\")\r\n    +        raise ValueError(\"x=None is not supported\")\r\n        ...\r\n\r\n     class Baz:\r\n          ...\r\n    -     value = _api.deprecate_privatize_attribute(\"3.7\", ...)\r\n    ```\r\n    b. Items decorated with `@_api.rename_parameter` should have this decorator removed, and no other changes will be necessary (the parameter rename should already have been made when the decorator was added.), i.e.,\r\n    ```diff\r\n    -@_api.rename_parameter(\"3.7\", \"old_name\", \"new_name\")\r\n     def foo(new_name):\r\n        ...\r\n    ```\r\n    c. Items decorated with `@_api.make_keyword_only` should have the decorator removed, and the parameter named there should be made keyword-only (by adding a `*` before that point).\r\n    ```diff\r\n    -@_api.make_keyword_only(\"3.7\", \"arg3\")\r\n    -def foo(arg1, arg2, arg3, arg4):\r\n    +def foo(arg1, arg2, *, arg3, arg4):\r\n        ...\r\n    ```\r\n    d. Items decorated with `@_api.delete_parameter` will need to have the parameter deleted _and_ all following parameters made keyword-only.\r\n    ```diff\r\n    -@_api.delete_parameter(\"3.7\", \"arg3\")\r\n    -def foo(arg1, arg2, arg3, arg4):\r\n    +def foo(arg1, arg2, *, arg4):\r\n        ...\r\n    ```\r\n3. The corresponding type stub in the related `*.pyi` file.\r\n4. Any tests for _only_ deprecated behaviour.\r\n5. Any related exceptions in `ci/mypy-stubtest-allowlist.txt`, if there are any.\r\n\r\nAdditionally, the removal should be documented by placing a snippet in `doc/api/next_api_changes/removals/` (see `00001-ABC.rst` in that directory for a template). For writing these snippets, you may wish to [copy the original deprecation notice](https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.7.0.html#deprecations), modifying it slightly to state that the API has been removed instead. Please ensure that any references to deleted API include a full path (as there may be many methods with the same name, but on different classes.)\r\n\r\n**NOTE**: After removing the deprecated API, there may be some additional fallout that should be corrected. For example,\r\n1. Removed code may be aliased by importing in another location, so those imports will have to be removed.\r\n2. Documentation may link to the removed API; these should be kept in code style. For example,\r\n    ```rst\r\n    This is some text referencing :class:`.RemovedClass`.\r\n    ```\r\n    should be changed to:\r\n    ```rst\r\n    This is some text referencing ``matplotlib.submodule.RemovedClass``.\r\n    ```\r\n    (Please expand the API into the full import name.)\r\n\r\nSee also [our documentation on removing deprecated API](https://matplotlib.org/devdocs/devel/contribute.html#expiring) and #26853 for an example removing several types of deprecated API.\r\n\r\n# Task list\r\nA quick search shows the following sets of possible parts to remove (for GHC OSD, please use Slack and/or Zoom to make sure someone else hasn't started working on the same set):\r\n1. [x] `lib/matplotlib/animation.py` - 2 deprecations #26872\r\n4. [x] `lib/matplotlib/axis.py` - 1 deprecation #26871\r\n5. [x] `lib/matplotlib/backends/*.py` - 3 deprecations and `src/_backend_agg_wrapper.cpp` - 2 deprecations #26962\r\n6. [x] `lib/matplotlib/cm.py` - 2 deprecations (Note: the documentation for this removal may be a bit tricky to write.) #26965\r\n7. [x] `lib/matplotlib/contour.py` - 5 deprecations  #26907\r\n8. [x] `lib/matplotlib/collections.py` - 2 deprecations #26874\r\n9. [x] `lib/matplotlib/_fontconfig_patterns.py` - 1 deprecation #26884\r\n10. [x] `lib/matplotlib/gridspec.py` - 1 deprecation  #26885 (!)\r\n11. [x] `lib/matplotlib/lines.py` - 2 deprecations  #26902\r\n12. [x] `lib/matplotlib/offsetbox.py` - 3 deprecations  #26910 ~~#26880~~\r\n13. [x] `lib/matplotlib/patches.py` - 1 deprecation #26890 #26876 #26900 (!)\r\n14. [x] `lib/matplotlib/quiver.py` - 2 deprecations #26918 \r\n15. [x] `lib/matplotlib/tri/*.py` - 8 deprecations  #26909 \r\n16. [x] `lib/mpl_toolkits/axisartist/axislines.py` - 2 deprecations #26900\r\n\r\nThere may be some other items I've missed here, but note that we do not want to remove any with `pending=True`, or `since=\"3.8\"` or higher.","author":{"url":"https://github.com/QuLogic","@type":"Person","name":"QuLogic"},"datePublished":"2023-09-22T04:29:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/26865/matplotlib/issues/26865"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:52011a55-672a-9d4e-2db2-e04718e90dca
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8566:242722:C22369:1063803:6A531CC3
html-safe-nonce1178d918c8dca87930969787ca41e26320410af57d44a6a04b88896822d69e06
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTY2OjI0MjcyMjpDMjIzNjk6MTA2MzgwMzo2QTUzMUNDMyIsInZpc2l0b3JfaWQiOiI2OTYyNTg4NDYzMzM1MTUyODM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4433b7d0606ca23ee8326240aa20c2c99061b821f5985b700805a3f49f2a1c54
hovercard-subject-tagissue:1908162252
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/26865/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2e35088ecca14a01d02985db2c1fe1eb4d020417876046bd1d276f22940fb5e4/matplotlib/matplotlib/issues/26865
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2e35088ecca14a01d02985db2c1fe1eb4d020417876046bd1d276f22940fb5e4/matplotlib/matplotlib/issues/26865
og:image:altSummary As old and unused API (classes, methods, functions) are found, they are marked deprecated with removal intended in a later release. These API are decorated or otherwise wrapped with the dep...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameQuLogic
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/26865#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F26865
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F26865
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/26865
Reloadhttps://github.com/matplotlib/matplotlib/issues/26865
Reloadhttps://github.com/matplotlib/matplotlib/issues/26865
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/26865
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/26865
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 408 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
#26962https://github.com/matplotlib/matplotlib/pull/26962
[MNT]: Remove 3.7-deprecated APIhttps://github.com/matplotlib/matplotlib/issues/26865#top
#26962https://github.com/matplotlib/matplotlib/pull/26962
Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22Difficulty%3A%20Easy%22
Good first issueOpen a pull request against these issues if there are no active ones!https://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22Good%20first%20issue%22
Maintenancehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22Maintenance%22
mentored: hackathonhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22mentored%3A%20hackathon%22
v3.9.0https://github.com/matplotlib/matplotlib/milestone/78
https://github.com/QuLogic
QuLogichttps://github.com/QuLogic
on Sep 22, 2023https://github.com/matplotlib/matplotlib/issues/26865#issue-1908162252
the deprecation functions in _apihttps://github.com/matplotlib/matplotlib/blob/dceb278bef361f32eb0009dec5bfda41fc27fa38/lib/matplotlib/_api/__init__.py#L19-L22
copy the original deprecation noticehttps://matplotlib.org/stable/api/prev_api_changes/api_changes_3.7.0.html#deprecations
our documentation on removing deprecated APIhttps://matplotlib.org/devdocs/devel/contribute.html#expiring
#26853https://github.com/matplotlib/matplotlib/pull/26853
Deprecated code removed in animation.py #26872https://github.com/matplotlib/matplotlib/pull/26872
Removed the deprecated code from axis.py #26871https://github.com/matplotlib/matplotlib/pull/26871
Remove backend 3.7-deprecated API  #26962https://github.com/matplotlib/matplotlib/pull/26962
Removal of deprecated API cm #26965https://github.com/matplotlib/matplotlib/pull/26965
Removal of deprecations for Contour #26907https://github.com/matplotlib/matplotlib/pull/26907
Cleaned up the span_where class method from Polycollections. #26874https://github.com/matplotlib/matplotlib/pull/26874
Remove deprecated code from _fontconfig_patterns #26884https://github.com/matplotlib/matplotlib/pull/26884
Removed deprecated code from gridspec.py #26885https://github.com/matplotlib/matplotlib/pull/26885
Fixed deprecated APIs in lines.py #26902https://github.com/matplotlib/matplotlib/pull/26902
Removed the deprecated code from offsetbox.py #26910https://github.com/matplotlib/matplotlib/pull/26910
Updated offsetbox.py #26880https://github.com/matplotlib/matplotlib/pull/26880
Removing deprecated api from patches #26890https://github.com/matplotlib/matplotlib/pull/26890
issue: 26871 - Remove SimplePath class from patches.py #26876https://github.com/matplotlib/matplotlib/pull/26876
#26865 removing deprecations to axislines.py #26900https://github.com/matplotlib/matplotlib/pull/26900
26865 Removed deprecations from quiver.py #26918https://github.com/matplotlib/matplotlib/pull/26918
deprecated api tri #26909https://github.com/matplotlib/matplotlib/pull/26909
#26865 removing deprecations to axislines.py #26900https://github.com/matplotlib/matplotlib/pull/26900
Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22Difficulty%3A%20Easy%22
Good first issueOpen a pull request against these issues if there are no active ones!https://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22Good%20first%20issue%22
Maintenancehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22Maintenance%22
mentored: hackathonhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22mentored%3A%20hackathon%22
v3.9.0https://github.com/matplotlib/matplotlib/milestone/78
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.