DateType
A Workaround
DateType is a workaround for this
bug to demonstrate that we could
have a type-checking-time wrapper for datetime that doesn't change (or almost
doesn't change) the implementation, but fixes up two very annoying behaviors of
the stdlib datetime module:
-
a
datetimenow won't type-check as adate- it still inherits at runtime (the implementation is, after all, not changed) but it doesn't inherit at type-time. -
there are separate types for naive and aware
datetimes.
There's a very small bit of implementation glue (concrete @classmethods for
construction on the Naive and Aware types, and a few functions that do
runtime checks to convert to/from stdlib types).
Release files for datetype 2025.11.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datetype-2025.11.30.tar.gz | 17.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datetype-2025.11.30-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.1 kB
Release files / datetype-2025.11.30.tar.gz
| Download URL | datetype-2025.11.30.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96ca1e81788e2978ec17eef0bb2286ca9dd5c418091a918881c607367f364578
|
|
BLAKE2b-256 checksum How to use checksums |
72cd7a7f867807eefe1a74a39e104a379adef2f8d3a986fb84abbf0c887b08f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.9
|
Release files / datetype-2025.11.30-py3-none-any.whl
| Download URL | datetype-2025.11.30-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b88db471ad3ef19c06e5b7f411d6333b8ff6412a00a55a32d66dbccdea40c143
|
|
BLAKE2b-256 checksum How to use checksums |
24735f888710da76659c183cd16488272e747c837cbbd560f5077b78cf29b504
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.9
|