PolicyEngine / PolicyEngine/policyengine-core

Fix newly added enum.py statement to eliminate FutureWarning of deprecation

Open
#238 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
22
Forks
30
Avg merge
14h 33m
Merged PRs (30d)
7

Description

@nikhilwoodruff, a few days ago in commit https://github.com/PolicyEngine/policyengine-core/pull/231/commits/7598d96af1c27855d594ed5575e4979eaf944539 you added this statement:

https://github.com/PolicyEngine/policyengine-core/blob/92e3bb68bcd65c9819c02c89dcd9562f0ca9cc9d/policyengine_core/enums/enum.py#L56-L57

This statement generates a dozen FutureWarnings of a deprecation as described here:

Screenshot 2024-08-07 at 3 22 27 PM

It would be good to fix this before it becomes an error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting policyengine_core/enums/enum.py around lines 56–57 and reproduce the FutureWarnings caused by the statement added in commit 7598d96af1c27855d594ed5575e4979eaf944539. Update that statement so the deprecation warning no longer occurs, then verify the warnings are eliminated before the deprecation becomes an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.