Comments (2)
Hi Jérémie,
thank you for your appreciation and feedback.
Let me quickly explain why I did remove the __version__
field.
From my point of view, it is a important to have a single source of truth for the package
metadata, like the version. Otherwise one may end up creating a release where the version shown by the package manager (pip) differs from the version reported by the package (__version__
).
For sure there are solutions to this problem, like using pyproject.toml
as the
single source of truth and adding some automated checks/updates. Still the margin
for error and the effort of maintanance increases.
Additionaly starting with python 3.8 a new mechansim to access package metadata was introduced.
Using this new mechanism you may be able to addresses your issue (see code snippet below),
if not please let me know.
>>> from importlib import metadata
>>> metadata.version('crc')
'3.0.0'
Best
Nico
from crc.
Hello Nicola,
Thanks for your detailed answer. I understand your point concerning properly maintaining the single source for the version number. To be honest, I never even thought about it before...
I was not aware of the relatively new metadata mechanism and will try it out. It won't completely solve my portability issue in all cases, but anyway, it is more of an inconvenience than a real issue!
I will close this issue.
Jérémie
from crc.
Related Issues (20)
- mypy error: Skipping analyzing "crc": [...] missing library stubs or py.typed marker HOT 8
- Invalid checksum for HDLC Frame HOT 2
- 🐞 Invalid checksum is calculated when using `Calculator` instead of `Register` classes HOT 10
- Crc8.SAEJ1850 has wrong `init_value` and `final_xor_value` HOT 2
- 📚 Readme update HOT 2
- 🐞Predefined `Crc16.CCITT` is confusing HOT 4
- 🔧 Refactor CRC-16 Configuration Naming and Expand Variants HOT 4
- 🐞 Return of digest() is not stable HOT 2
- 🐞 My project on github uses crc. When I ran my tests I got an error relating to CCITT HOT 1
- Inconsistent CRC result for different input type HOT 9
- Add support for arbitrary input and output bit widths HOT 7
- Automate pypi deployment with GitHub action(s) HOT 1
- Automate code coverage reporting with GitHub Actions
- lookup table generation output is wrong HOT 1
- file input handling could be better HOT 1
- Create a pypi release containing the latest changes HOT 1
- Implement Reverse Input/Output Lookup Table when running table_based HOT 7
- "poly" should be "polynomial" in example HOT 1
- Add 16bit MODBUS config HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crc.