### Initial Checks - [X] I have searched Google & GitHub for similar requests and couldn't find anything - [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this feature is missing ### Description This is very similar to https://github.com/pydantic/pydantic/issues/971 except it would be a nice feature to the `ByteSize` class if it could also handle bits. Conversions between bytes to bits where 1 byte is equal to 8 bits and so forth for the range of units (e.g. kb, mb, etc.) ### Affected Components - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/) - [ ] [Data validation/parsing](https://docs.pydantic.dev/concepts/models/#basic-model-usage) - [ ] [Data serialization](https://docs.pydantic.dev/concepts/serialization/) - `.model_dump()` and `.model_dump_json()` - [ ] [JSON Schema](https://docs.pydantic.dev/concepts/json_schema/) - [ ] [Dataclasses](https://docs.pydantic.dev/concepts/dataclasses/) - [ ] [Model Config](https://docs.pydantic.dev/concepts/config/) - [X] [Field Types](https://docs.pydantic.dev/api/types/) - adding or changing a particular data type - [ ] [Function validation decorator](https://docs.pydantic.dev/concepts/validation_decorator/) - [ ] [Generic Models](https://docs.pydantic.dev/concepts/models/#generic-models) - [ ] [Other Model behaviour](https://docs.pydantic.dev/concepts/models/) - `model_construct()`, pickling, private attributes, ORM mode - [ ] [Plugins](https://docs.pydantic.dev/) and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.
Activity
sydney-runkle commentedon Jan 5, 2024
@alexyao2015,
This seems like a great feature request. PRs welcome!
luca-matei commentedon Jan 6, 2024
@sydney-runkle Hello, it's ready for review Pull Request #8507
Added bits conversion to the ByteSize class feature #8415 (#8507)
sydney-runkle commentedon Jan 8, 2024
Closed by #8507
Update dependency pydantic to v2.6.1 (#57)