Révision 254eb56d
[docker_] Fake functools.cached_property for Python<3.8
Fixes: #1116
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
| plugins/docker/docker_ | ||
|---|---|---|
| 77 | 77 |
import os |
| 78 | 78 |
import sys |
| 79 | 79 |
import re |
| 80 |
from functools import cached_property |
|
| 80 |
try: |
|
| 81 |
from functools import cached_property |
|
| 82 |
except ImportError: |
|
| 83 |
# If cached_property is not available, |
|
| 84 |
# just use the property decorator, without caching |
|
| 85 |
# This is for backward compatibility with Python<3.8 |
|
| 86 |
cached_property = property |
|
| 81 | 87 |
from multiprocessing import Process, Queue |
| 82 | 88 |
|
| 83 | 89 |
|
Formats disponibles : Unified diff