Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #22867 -- Memoized django.utils.version.get_git_changeset().

This improves pickling speed in prelease versions of Django; refs #21430.
  • Loading branch information...
commit 80f4487d17a0040e9be35e7ee6ac478bafe6504a 1 parent 9996158
@Suor Suor authored timgraham committed
Showing with 3 additions and 0 deletions.
  1. +3 −0  django/utils/version.py
View
3  django/utils/version.py
@@ -4,6 +4,8 @@
import os
import subprocess
+from django.utils.lru_cache import lru_cache
+
def get_version(version=None):
"Returns a PEP 386-compliant version number from VERSION."
@@ -50,6 +52,7 @@ def get_complete_version(version=None):
return version
+@lru_cache()
def get_git_changeset():
"""Returns a numeric identifier of the latest git changeset.
Please sign in to comment.
Something went wrong with that request. Please try again.