We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8f28e2 commit 5ef8ddfCopy full SHA for 5ef8ddf
src/pip/_internal/models/link.py
@@ -7,6 +7,7 @@
7
import os
8
import posixpath
9
import re
10
+import sys
11
import urllib.parse
12
from collections.abc import Mapping
13
from dataclasses import dataclass
@@ -304,6 +305,10 @@ def from_json(
304
305
306
upload_time: datetime.datetime | None
307
if upload_time_data := file_data.get("upload-time"):
308
+ # Handle 'Z' suffix for UTC timezone (added in Python 3.11)
309
+ # For Python < 3.11, convert 'Z' to '+00:00' for compatibility
310
+ if sys.version_info < (3, 11) and upload_time_data.endswith("Z"):
311
+ upload_time_data = upload_time_data[:-1] + "+00:00"
312
upload_time = datetime.datetime.fromisoformat(upload_time_data)
313
else:
314
upload_time = None
0 commit comments