Nicoretti / crc

Pure Python CRC library
https://nicoretti.github.io/crc/
BSD 2-Clause "Simplified" License
53 stars 13 forks source link

🐞 My project on github uses crc. When I ran my tests I got an error relating to CCITT #159

Closed jwinslow-novamera closed 7 months ago

jwinslow-novamera commented 7 months ago

Summary

My pytest tests that used to work 3 days ago failed today on github. While it is possible it is my bug, it seems to be related to crc CCITT.

Reproducing the Issue

Reproducibility: always

  1. Run pytest on a project with pip requirment crc
  2. Have github install crc 7.0.0
  3. Code using Crc16.CCITT cause error

Expected Behaviour

it is able to run tests

Actual Behaviour

it is not able to run tests, but it was 3 days ago

Root Cause (optional)

I can run tests ok locally on windows when I install crc==4.2.0

Context

Error

<string>:13: in __init__
    ???
src/ncu_backend/ncu_model/data_layer/nbit_status.py:73: in __post_init__
    self.update_crc()
src/ncu_backend/ncu_model/data_layer/nbit_status.py:213: in update_crc
    self._crc = self._calc_crc()
src/ncu_backend/ncu_model/data_layer/nbit_status.py:226: in _calc_crc
    Crc16.CCITT
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/enum.py:437: in __getattr__
    raise AttributeError(name) from None
E   AttributeError: CCITT

System

Github running pytest on python 3.10

Desktop:

jwinslow-novamera commented 7 months ago

Just found this on release page

7.0.0 - 2024-04-19 🚨 Breaking Changes Update of crc configurations Rename: The Crc16.CCITT configuration to Crc16.XMODEM. New Addition: Introduced Crc16.KERMIT, which matches the official configuration for Crc16.CCITT.

Guess I should have checked that before making report. Nevermind, it is a known feature not a bug :)

Please close