Skip to content

Commit

Permalink
feat: Remove deprecated dataclass (#699)
Browse files Browse the repository at this point in the history
### Changes included in this PR

#### Breaking changes:

- Removed all the deprecated dataclasses from `call.py` and
`call_result.py` for OCPP 1.6 and OCPP 2.0.1.
- Removed logic in `charge_point.py` where the deprecated dataclasses
were being handled.

### Impact

- User's need to update the codebase and migrate from old dataclass
nomenclature to the new one:
    - The old dataclasses had `Payload` at the end of the class name.
- The new dataclasses don't have the `Payload` at the end of the class
name.

### Checklist

1. [x] Does your submission pass the existing tests?
2. [ ] Are there new tests that cover these additions/changes? 
3. [x] Have you linted your code locally before submission?
  • Loading branch information
jainmohit2001 authored Jan 1, 2025
1 parent 7e6136b commit 06e598e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 2,701 deletions.
3 changes: 0 additions & 3 deletions ocpp/charge_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,6 @@ async def call(
)

action_name = payload.__class__.__name__
# Due to deprecated call and callresults, remove in the future.
if "Payload" in payload.__class__.__name__:
action_name = payload.__class__.__name__[:-7]

call = Call(
unique_id=unique_id,
Expand Down
Loading

0 comments on commit 06e598e

Please sign in to comment.