Skip to main content

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:

  1. a datetime now won't type-check as a date - it still inherits at runtime (the implementation is, after all, not changed) but it doesn't inherit at type-time.

  2. 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)

Source distribution for datetype 2025.11.30
File Size Uploaded
datetype-2025.11.30.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datetype 2025.11.30
File Interpreter ABI Platform
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
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page