-
-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate Python 2.7 and Python 3.5 (#877)
* Begin new branch for py27/35 changes. Drop 27/35 from CI. * Run pre-commit hooks * Deprecate timestamp property and fix tests * More removals for 36+ * More timestamp updates and cleaned up Makefile
- Loading branch information
Showing
27 changed files
with
155 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
# -*- coding: utf-8 -*- | ||
import os | ||
from datetime import datetime | ||
|
||
# Output of time.mktime(datetime.max.timetuple()) on macOS | ||
# This value must be hardcoded for compatibility with Windows | ||
# Platform-independent max timestamps are hard to form | ||
# https://stackoverflow.com/q/46133223 | ||
MAX_TIMESTAMP = 253402318799.0 | ||
# datetime.max.timestamp() errors on Windows, so we must hardcode | ||
# the highest possible datetime value that can output a timestamp. | ||
# tl;dr platform-independent max timestamps are hard to form | ||
# See: https://stackoverflow.com/q/46133223 | ||
MAX_TIMESTAMP = ( | ||
datetime(3001, 1, 18, 23, 59, 59, 999999) if os.name == "nt" else datetime.max | ||
).timestamp() | ||
MAX_TIMESTAMP_MS = MAX_TIMESTAMP * 1000 | ||
MAX_TIMESTAMP_US = MAX_TIMESTAMP * 1000000 |
Oops, something went wrong.