Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

added deprecation management tooling#2435

Open
glk0 wants to merge 12 commits intodevelopfrom
glk0-reportgen
Open

added deprecation management tooling#2435
glk0 wants to merge 12 commits intodevelopfrom
glk0-reportgen

Conversation

@glk0
Copy link
Contributor

@glk0 glk0 commented Sep 22, 2025

This PR adds the tooling to manage deprecations. It inclue utility functions that allow to locate all the deprecated classes and functions in the codebase, parse the relevant informations and output it as JSON, etc. It relies on the @deprecated decorator from PEP 702 and @deprecation_deadline decorator from GangaCore.Utility.Deprecation introduced in #2422 .

@egede
Copy link
Member

egede commented Sep 22, 2025

@alexanderrichards Do you have any idea why the GangaDirac Unit test is failing here. It looks to me like the proxy is OK but it then fails with some SSL stuff during setup?

@glk0 glk0 requested a review from Copilot September 22, 2025 07:08

This comment was marked as resolved.

Copy link
Member

@egede egede left a comment

Choose a reason for hiding this comment

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

  • Can you provide an example of how the json output looks like.
  • There should be some test cases that shows that it is working (i.e the deprecation_report should be tested.
  • The use of deprecation_report should be integrated into the testing framework. So a test should be written that fails if there is code around which is past its expiry date.

@glk0 glk0 force-pushed the glk0-reportgen branch 2 times, most recently from 01a15a3 to e2a7683 Compare September 22, 2025 07:21
@glk0
Copy link
Contributor Author

glk0 commented Sep 22, 2025

Can you provide an example of how the json output looks like.

Here's a prettified output:

[
  {
    "name": "list_plugins",
    "type": "function",
    "file_path": "GangaCore/Runtime/GPIFunctions.py",
    "lineno": 86,
    "reason": "use plugins ('category')",
    "deadline": "2025-12-31",
    "last_version": "8.4.4"
  },
  {
    "name": "applications",
    "type": "function",
    "file_path": "GangaCore/Runtime/GPIFunctions.py",
    "lineno": 92,
    "reason": "use plugins ('applications')",
    "deadline": null,
    "last_version": null
  },
  {
    "name": "backends",
    "type": "function",
    "file_path": "GangaCore/Runtime/GPIFunctions.py",
    "lineno": 97,
    "reason": "use plugins ('backend')",
    "deadline": null,
    "last_version": null
  }
]

Shows the functions to which we have applied the @deprecated decorator in GPIFunctions.py. Those were already marked for removal, so I figure I might try the new method there.

@glk0 glk0 changed the title added deprecation report generation added deprecation management tooling Sep 28, 2025
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