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

Collect deprecated functions #39

Open
CsatiZoltan opened this issue Nov 27, 2020 · 1 comment
Open

Collect deprecated functions #39

CsatiZoltan opened this issue Nov 27, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@CsatiZoltan
Copy link
Owner

Commit dc50d41 introduced a deprecation life-cycle to CristalX.
Managing deprecated functionalities, and the fact in which release it was marked as deprecated and in which future release it is planned to be removed, becomes cumbersome as CristalX grows.
Therefore, create a function in the grain package (in __init__.py) to fetch these data. I found 3 main possibilities:

  1. Analyze the source code with the inspect built-in Python module
    "Method 2" in https://stackoverflow.com/a/5910893/4892892
  2. Create an additional decorator to decorate the decorator you want to track
    "Method 3" in https://stackoverflow.com/a/5910893/4892892. In my case, I would need to decorate the deprecated decorator from the deprecation package.
  3. Analyze the AST
    Provided by https://stackoverflow.com/a/9580006/4892892, this is also a source parsing method, as the first item.
@CsatiZoltan CsatiZoltan added the enhancement New feature or request label Nov 27, 2020
@CsatiZoltan CsatiZoltan added this to the v1.1.0 milestone Nov 27, 2020
@CsatiZoltan CsatiZoltan self-assigned this Nov 27, 2020
@CsatiZoltan
Copy link
Owner Author

A deprecation table would look like this:

object deprecated in will be removed in
function1 1.1.0 1.3.0
class2.method1 1.2.0 1.3.0

@CsatiZoltan CsatiZoltan modified the milestones: v1.1.0, v1.2.0 Nov 29, 2020
@CsatiZoltan CsatiZoltan modified the milestones: v1.2.0, v1.3.0 Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant