arelle-release 2.36.36__py3-none-any.whl → 2.36.37__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arelle-release might be problematic. Click here for more details.
- arelle/Locale.py +4 -15
- arelle/PythonUtil.py +22 -2
- arelle/Version.py +3 -6
- arelle/_version.py +2 -2
- {arelle_release-2.36.36.dist-info → arelle_release-2.36.37.dist-info}/METADATA +1 -1
- {arelle_release-2.36.36.dist-info → arelle_release-2.36.37.dist-info}/RECORD +10 -10
- {arelle_release-2.36.36.dist-info → arelle_release-2.36.37.dist-info}/WHEEL +0 -0
- {arelle_release-2.36.36.dist-info → arelle_release-2.36.37.dist-info}/entry_points.txt +0 -0
- {arelle_release-2.36.36.dist-info → arelle_release-2.36.37.dist-info}/licenses/LICENSE.md +0 -0
- {arelle_release-2.36.36.dist-info → arelle_release-2.36.37.dist-info}/top_level.txt +0 -0
arelle/Locale.py
CHANGED
|
@@ -9,7 +9,6 @@ See COPYRIGHT.md for copyright information.
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
11
11
|
import locale
|
|
12
|
-
import subprocess
|
|
13
12
|
import sys
|
|
14
13
|
import unicodedata
|
|
15
14
|
from collections.abc import Callable, Generator, Mapping
|
|
@@ -19,6 +18,7 @@ from typing import Any, cast
|
|
|
19
18
|
|
|
20
19
|
import regex as re
|
|
21
20
|
|
|
21
|
+
from arelle.PythonUtil import tryRunCommand
|
|
22
22
|
from arelle.typing import LocaleDict, TypeGetText
|
|
23
23
|
|
|
24
24
|
_: TypeGetText
|
|
@@ -233,9 +233,9 @@ def getLocale() -> str | None:
|
|
|
233
233
|
# Try getting locale language code from system on macOS and Windows before resorting to the less reliable locale.getlocale.
|
|
234
234
|
systemLocale = None
|
|
235
235
|
if sys.platform == MACOS_PLATFORM:
|
|
236
|
-
systemLocale =
|
|
236
|
+
systemLocale = tryRunCommand("defaults", "read", "-g", "AppleLocale")
|
|
237
237
|
elif sys.platform == WINDOWS_PLATFORM:
|
|
238
|
-
systemLocale =
|
|
238
|
+
systemLocale = tryRunCommand("pwsh", "-Command", "Get-Culture | Select -ExpandProperty IetfLanguageTag")
|
|
239
239
|
if pythonCompatibleLocale := findCompatibleLocale(systemLocale):
|
|
240
240
|
_locale = pythonCompatibleLocale
|
|
241
241
|
elif sys.version_info < (3, 12):
|
|
@@ -247,17 +247,6 @@ def getLocale() -> str | None:
|
|
|
247
247
|
return _locale
|
|
248
248
|
|
|
249
249
|
|
|
250
|
-
def _tryRunShellCommand(*args: str) -> str | None:
|
|
251
|
-
"""
|
|
252
|
-
Tries to return the results of the provided shell command.
|
|
253
|
-
Returns stdout or None if the command exists with a non-zero code.
|
|
254
|
-
"""
|
|
255
|
-
try:
|
|
256
|
-
return subprocess.run(args, capture_output=True, check=True, shell=True, text=True).stdout.strip()
|
|
257
|
-
except subprocess.SubprocessError:
|
|
258
|
-
return None
|
|
259
|
-
|
|
260
|
-
|
|
261
250
|
iso3region = {
|
|
262
251
|
"AU": "aus",
|
|
263
252
|
"AT": "aut",
|
|
@@ -306,7 +295,7 @@ def getLocaleList() -> list[str]:
|
|
|
306
295
|
global _systemLocales
|
|
307
296
|
if _systemLocales is not None:
|
|
308
297
|
return _systemLocales
|
|
309
|
-
if sys.platform != WINDOWS_PLATFORM and (locales :=
|
|
298
|
+
if sys.platform != WINDOWS_PLATFORM and (locales := tryRunCommand("locale", "-a")):
|
|
310
299
|
_systemLocales = locales.splitlines()
|
|
311
300
|
else:
|
|
312
301
|
_systemLocales = []
|
arelle/PythonUtil.py
CHANGED
|
@@ -5,11 +5,13 @@ Python version specific utilities
|
|
|
5
5
|
do not convert 3 to 2
|
|
6
6
|
'''
|
|
7
7
|
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import subprocess
|
|
8
10
|
import sys
|
|
9
|
-
from decimal import Decimal
|
|
10
|
-
from fractions import Fraction
|
|
11
11
|
from collections import OrderedDict
|
|
12
12
|
from collections.abc import MappingView, MutableSet
|
|
13
|
+
from decimal import Decimal
|
|
14
|
+
from fractions import Fraction
|
|
13
15
|
from typing import Any
|
|
14
16
|
|
|
15
17
|
from arelle.typing import OptionalString
|
|
@@ -249,3 +251,21 @@ def pyObjectSize(obj, seen=None):
|
|
|
249
251
|
elif hasattr(obj, '__iter__') and not isinstance(obj, (str, bytes, bytearray)):
|
|
250
252
|
size += sum([pyObjectSize(i, seen) for i in obj])
|
|
251
253
|
return size
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def tryRunCommand(*args: str) -> str | None:
|
|
257
|
+
"""
|
|
258
|
+
Tries to return the results of the provided command.
|
|
259
|
+
Returns stdout or None if the command exists with a non-zero code.
|
|
260
|
+
"""
|
|
261
|
+
try:
|
|
262
|
+
return subprocess.run(
|
|
263
|
+
args,
|
|
264
|
+
capture_output=True,
|
|
265
|
+
check=True,
|
|
266
|
+
text=True,
|
|
267
|
+
# A call to get std handle throws an OSError if stdin is not specified when run on Windows as a service.
|
|
268
|
+
stdin=subprocess.PIPE,
|
|
269
|
+
).stdout.strip()
|
|
270
|
+
except (OSError, subprocess.SubprocessError):
|
|
271
|
+
return None
|
arelle/Version.py
CHANGED
|
@@ -6,6 +6,8 @@ See COPYRIGHT.md for copyright information.
|
|
|
6
6
|
"""
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
+
from arelle.PythonUtil import tryRunCommand
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
def getBuildVersion() -> str | None:
|
|
11
13
|
try:
|
|
@@ -16,12 +18,7 @@ def getBuildVersion() -> str | None:
|
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
def getGitHash() -> str | None:
|
|
19
|
-
|
|
20
|
-
try:
|
|
21
|
-
return subprocess.run(['git', 'rev-parse', 'HEAD'], capture_output=True, check=True, text=True).stdout.strip()
|
|
22
|
-
except (FileNotFoundError, subprocess.SubprocessError):
|
|
23
|
-
return None
|
|
24
|
-
|
|
21
|
+
return tryRunCommand('git', 'rev-parse', 'HEAD')
|
|
25
22
|
|
|
26
23
|
def getDefaultVersion() -> str:
|
|
27
24
|
return '0.0.0'
|
arelle/_version.py
CHANGED
|
@@ -33,7 +33,7 @@ arelle/HtmlUtil.py,sha256=eXa6yF5xBCOODCuBMY7g8ePZHPOSu6X0gDsW3z9N50A,761
|
|
|
33
33
|
arelle/InstanceAspectsEvaluator.py,sha256=TePNIs_m0vCIbN5N4PXEyJm529T2WBFi2zmv-72r3Zk,1805
|
|
34
34
|
arelle/LeiUtil.py,sha256=tSPrbQrXEeH5pXgGA_6MAdgMZp20NaW5izJglIXyEQk,5095
|
|
35
35
|
arelle/LocalViewer.py,sha256=26Y9T0H9vgqDBDNF7sIHTeFN1QgDbZwc4fcFPFn8a5A,3084
|
|
36
|
-
arelle/Locale.py,sha256=
|
|
36
|
+
arelle/Locale.py,sha256=aKC1Uaen_dbPGb92kZa_yUoo7On_QtWlvr5H_F9BNXg,33008
|
|
37
37
|
arelle/ModelDocument.py,sha256=bP8WbSmBlk3ZxgrQxIfXMfU3Xjo7kgTtWZzxnCZvI88,129211
|
|
38
38
|
arelle/ModelDtsObject.py,sha256=JXPRiFOsbB5tZjEDc6rECuUtXMbF4oxfnwrQvKo-i5U,88656
|
|
39
39
|
arelle/ModelFormulaObject.py,sha256=beUSxEFm7aoa9iimmvXLYCHdizAtOmhDqk6wmvbc9Zg,122537
|
|
@@ -55,7 +55,7 @@ arelle/PluginManager.py,sha256=jpeRH-Co5NA8tVXQeIDgibOWN7aB8wprMNvjSYh_K6I,41947
|
|
|
55
55
|
arelle/PluginUtils.py,sha256=0vFQ29wVVpU0cTY3YOBL6FhNQhhCTwShBH4qTJGLnvc,2426
|
|
56
56
|
arelle/PrototypeDtsObject.py,sha256=0lf60VcXR_isx57hBPrc7vEMkFpYkVuK4JVBSmopzkQ,7989
|
|
57
57
|
arelle/PrototypeInstanceObject.py,sha256=CXUoDllhDqpMvSQjqIYi1Ywp-J8fLhQRV9wVD2YXgVo,13204
|
|
58
|
-
arelle/PythonUtil.py,sha256=
|
|
58
|
+
arelle/PythonUtil.py,sha256=KQme02AJ6eJuVkZRx8YvluzXarnLJHVsApM3J_L5m84,8542
|
|
59
59
|
arelle/RuntimeOptions.py,sha256=89pSw3zFhjHzn75RaHAl4-iPXL8awTZny-frozn9EHQ,8718
|
|
60
60
|
arelle/SocketUtils.py,sha256=1wa2sA_QhM8F1klHFq90V1AgO1-hY9pJm0554FiF7Lc,677
|
|
61
61
|
arelle/SystemInfo.py,sha256=6330pNedRkAPlEKl-ZdaZHiGuucEGZMI-Jrdy7B1rrU,2454
|
|
@@ -75,7 +75,7 @@ arelle/ValidateXbrl.py,sha256=kBiY_q9QmORwC8VxGpRq9mfufknt08nEAeSgNh1ov-M,78005
|
|
|
75
75
|
arelle/ValidateXbrlCalcs.py,sha256=vx1LYbu2l6wY88O9vyaThK5gOG59R9ggHX3FapbN3XA,44308
|
|
76
76
|
arelle/ValidateXbrlDTS.py,sha256=yxvpTpImEbrQuLJ2aJf38FjA-OEznpWWdsDK0GtLXIU,104003
|
|
77
77
|
arelle/ValidateXbrlDimensions.py,sha256=Qv7_CI65SiUcpgsnEc86XuMjKz81-170wE5dmZqnvHc,38373
|
|
78
|
-
arelle/Version.py,sha256=
|
|
78
|
+
arelle/Version.py,sha256=RjbPSSiH57VzZFhhUmEmvLsL8uSb5VwEIj2zq-krhsY,934
|
|
79
79
|
arelle/ViewFile.py,sha256=Bvh50RAHDEauAmF0KPHWAZocMyA0UCduJ46e0wbSnPE,19286
|
|
80
80
|
arelle/ViewFileConcepts.py,sha256=ecIGNPhFelkpHSPzbV19w7ts8RZZsD657oYLQHtAzhk,4370
|
|
81
81
|
arelle/ViewFileDTS.py,sha256=IlbBTKFT8grC4N4cWdam8UsUaVFeiy7MfL5PdyEefvA,2029
|
|
@@ -123,7 +123,7 @@ arelle/XmlValidateConst.py,sha256=U_wN0Q-nWKwf6dKJtcu_83FXPn9c6P8JjzGA5b0w7P0,33
|
|
|
123
123
|
arelle/XmlValidateParticles.py,sha256=Mn6vhFl0ZKC_vag1mBwn1rH_x2jmlusJYqOOuxFPO2k,9231
|
|
124
124
|
arelle/XmlValidateSchema.py,sha256=6frtZOc1Yrx_5yYF6V6oHbScnglWrVbWr6xW4EHtLQI,7428
|
|
125
125
|
arelle/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
126
|
-
arelle/_version.py,sha256=
|
|
126
|
+
arelle/_version.py,sha256=5LSmSgWRRZykPQAlxX3yg4mSBU2cR_rLM7u3_PwsoaU,515
|
|
127
127
|
arelle/typing.py,sha256=Ct5lrNKRow_o9CraMEXNza8nFsJ_iGIKoUeGfPs2dxI,1084
|
|
128
128
|
arelle/api/Session.py,sha256=Vd09RAutWX7mxHSsrW7Bl8CsE1UzXpQpAJsZb55mqng,6188
|
|
129
129
|
arelle/archive/CustomLogger.py,sha256=v_JXOCQLDZcfaFWzxC9FRcEf9tQi4rCI4Sx7jCuAVQI,1231
|
|
@@ -706,7 +706,7 @@ arelle/utils/validate/ValidationPlugin.py,sha256=_WeRPXZUTCcSN3FLbFwiAe_2pAUTxZZ
|
|
|
706
706
|
arelle/utils/validate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
707
707
|
arelle/webserver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
708
708
|
arelle/webserver/bottle.py,sha256=676nP8SOB42QscV0WIbXoSV9MwdgvbrzeIApxr6mlUI,171255
|
|
709
|
-
arelle_release-2.36.
|
|
709
|
+
arelle_release-2.36.37.dist-info/licenses/LICENSE.md,sha256=rMbWwFLGzPgLoEjEu8LCmkpWDTqsvfOI-wzLSfeJsis,4107
|
|
710
710
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
711
711
|
tests/integration_tests/download_cache.py,sha256=jVMIVICsZjcVc9DCPPu3fCjF9_cWSS3tqSynhFs3oAM,4097
|
|
712
712
|
tests/integration_tests/integration_test_util.py,sha256=H7mncbv0T9ZeVyrtk9Hohe3k6jgcYykHkt-LGE-Q9aQ,10270
|
|
@@ -1554,8 +1554,8 @@ tests/unit_tests/arelle/oim/test_load.py,sha256=NxiUauQwJVfWAHbbpsMHGSU2d3Br8Pki
|
|
|
1554
1554
|
tests/unit_tests/arelle/plugin/test_plugin_imports.py,sha256=bdhIs9frAnFsdGU113yBk09_jis-z43dwUItMFYuSYM,1064
|
|
1555
1555
|
tests/unit_tests/arelle/plugin/validate/ESEF/ESEF_Current/test_validate_css_url.py,sha256=XHABmejQt7RlZ0udh7v42f2Xb2STGk_fSaIaJ9i2xo0,878
|
|
1556
1556
|
tests/unit_tests/arelle/utils/validate/test_decorator.py,sha256=ZS8FqIY1g-2FCbjF4UYm609dwViax6qBMRJSi0vfuhY,2482
|
|
1557
|
-
arelle_release-2.36.
|
|
1558
|
-
arelle_release-2.36.
|
|
1559
|
-
arelle_release-2.36.
|
|
1560
|
-
arelle_release-2.36.
|
|
1561
|
-
arelle_release-2.36.
|
|
1557
|
+
arelle_release-2.36.37.dist-info/METADATA,sha256=i0hQ9WSC7GP9vrnQbQ3kiMMUeQCeMDjt6rC8oon6e2U,9032
|
|
1558
|
+
arelle_release-2.36.37.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
1559
|
+
arelle_release-2.36.37.dist-info/entry_points.txt,sha256=Uj5niwfwVsx3vaQ3fYj8hrZ1xpfCJyTUA09tYKWbzpo,111
|
|
1560
|
+
arelle_release-2.36.37.dist-info/top_level.txt,sha256=ZYmYGmhW5Jvo3vJ4iXBZPUI29LvYhntom04w90esJvU,13
|
|
1561
|
+
arelle_release-2.36.37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|