mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
Fixed #22867 -- Memoized django.utils.version.get_git_changeset().
This improves pickling speed in prelease versions of Django; refs #21430.
This commit is contained in:
parent
9996158db4
commit
80f4487d17
@ -4,6 +4,8 @@ import datetime
|
||||
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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user