Skip to content

Commit 67ec3a4

Browse files
committed
Don't cache the functions in pytestskipmarkers.utils.platform
Fixes #21 Signed-off-by: Pedro Algarvio <[email protected]>
1 parent 866a034 commit 67ec3a4

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

changelog/21.improvement.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Don't cache the functions in `pytestskipmarkers.utils.platform`

src/pytestskipmarkers/utils/platform.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@
1414
import shutil
1515
import subprocess
1616
import sys
17-
from functools import lru_cache
1817
from typing import cast
1918

2019
import distro
2120

2221

23-
@lru_cache(maxsize=None)
2422
def is_windows() -> bool:
2523
"""
2624
Simple function to return if a host is Windows or not.
@@ -30,7 +28,6 @@ def is_windows() -> bool:
3028
return sys.platform.startswith("win")
3129

3230

33-
@lru_cache(maxsize=None)
3431
def is_linux() -> bool:
3532
"""
3633
Simple function to return if a host is Linux or not.
@@ -41,7 +38,6 @@ def is_linux() -> bool:
4138
return sys.platform.startswith("linux")
4239

4340

44-
@lru_cache(maxsize=None)
4541
def is_darwin() -> bool:
4642
"""
4743
Simple function to return if a host is Darwin (macOS) or not.
@@ -51,7 +47,6 @@ def is_darwin() -> bool:
5147
return sys.platform.startswith("darwin")
5248

5349

54-
@lru_cache(maxsize=None)
5550
def is_sunos() -> bool:
5651
"""
5752
Simple function to return if host is SunOS or not.
@@ -61,7 +56,6 @@ def is_sunos() -> bool:
6156
return sys.platform.startswith("sunos")
6257

6358

64-
@lru_cache(maxsize=None)
6559
def is_smartos() -> bool:
6660
"""
6761
Simple function to return if host is SmartOS (Illumos) or not.
@@ -73,7 +67,6 @@ def is_smartos() -> bool:
7367
return False
7468

7569

76-
@lru_cache(maxsize=None)
7770
def is_freebsd() -> bool:
7871
"""
7972
Simple function to return if host is FreeBSD or not.
@@ -83,7 +76,6 @@ def is_freebsd() -> bool:
8376
return sys.platform.startswith("freebsd")
8477

8578

86-
@lru_cache(maxsize=None)
8779
def is_netbsd() -> bool:
8880
"""
8981
Simple function to return if host is NetBSD or not.
@@ -93,7 +85,6 @@ def is_netbsd() -> bool:
9385
return sys.platform.startswith("netbsd")
9486

9587

96-
@lru_cache(maxsize=None)
9788
def is_openbsd() -> bool:
9889
"""
9990
Simple function to return if host is OpenBSD or not.
@@ -103,7 +94,6 @@ def is_openbsd() -> bool:
10394
return sys.platform.startswith("openbsd")
10495

10596

106-
@lru_cache(maxsize=None)
10797
def is_aix() -> bool:
10898
"""
10999
Simple function to return if host is AIX or not.
@@ -113,15 +103,13 @@ def is_aix() -> bool:
113103
return sys.platform.startswith("aix")
114104

115105

116-
@lru_cache(maxsize=None)
117106
def is_aarch64() -> bool:
118107
"""
119108
Simple function to return if host is AArch64 or not.
120109
"""
121110
return platform.machine().startswith("aarch64")
122111

123112

124-
@lru_cache(maxsize=None)
125113
def is_photonos() -> bool:
126114
"""
127115
Simple function to return if host is Photon OS or not.

0 commit comments

Comments
 (0)