meerschaum 2.2.2rc5__py3-none-any.whl → 2.2.4__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.
- meerschaum/_internal/term/__init__.py +1 -1
- meerschaum/actions/api.py +31 -65
- meerschaum/actions/python.py +3 -14
- meerschaum/config/_version.py +1 -1
- meerschaum/utils/packages/_packages.py +1 -0
- {meerschaum-2.2.2rc5.dist-info → meerschaum-2.2.4.dist-info}/METADATA +2 -1
- {meerschaum-2.2.2rc5.dist-info → meerschaum-2.2.4.dist-info}/RECORD +13 -13
- {meerschaum-2.2.2rc5.dist-info → meerschaum-2.2.4.dist-info}/LICENSE +0 -0
- {meerschaum-2.2.2rc5.dist-info → meerschaum-2.2.4.dist-info}/NOTICE +0 -0
- {meerschaum-2.2.2rc5.dist-info → meerschaum-2.2.4.dist-info}/WHEEL +0 -0
- {meerschaum-2.2.2rc5.dist-info → meerschaum-2.2.4.dist-info}/entry_points.txt +0 -0
- {meerschaum-2.2.2rc5.dist-info → meerschaum-2.2.4.dist-info}/top_level.txt +0 -0
- {meerschaum-2.2.2rc5.dist-info → meerschaum-2.2.4.dist-info}/zip-safe +0 -0
@@ -32,7 +32,7 @@ def get_webterm_app_and_manager() -> Tuple[
|
|
32
32
|
A tuple of the Tornado web application and term manager.
|
33
33
|
"""
|
34
34
|
commands = [
|
35
|
-
venv_executable(
|
35
|
+
venv_executable(None),
|
36
36
|
'-c',
|
37
37
|
"import os; _ = os.environ.pop('COLUMNS', None); _ = os.environ.pop('LINES', None); "
|
38
38
|
"from meerschaum._internal.entry import get_shell; "
|
meerschaum/actions/api.py
CHANGED
@@ -156,7 +156,6 @@ def _api_start(
|
|
156
156
|
from meerschaum.config.static import STATIC_CONFIG, SERVER_ID
|
157
157
|
from meerschaum.connectors.parse import parse_instance_keys
|
158
158
|
from meerschaum.utils.pool import get_pool
|
159
|
-
from meerschaum.utils.venv import get_module_venv
|
160
159
|
import shutil
|
161
160
|
from copy import deepcopy
|
162
161
|
|
@@ -170,10 +169,7 @@ def _api_start(
|
|
170
169
|
### `check_update` must be False, because otherwise Uvicorn's hidden imports will break things.
|
171
170
|
dotenv = attempt_import('dotenv', lazy=False)
|
172
171
|
uvicorn, gunicorn = attempt_import(
|
173
|
-
'uvicorn', 'gunicorn',
|
174
|
-
lazy = False,
|
175
|
-
check_update = False,
|
176
|
-
venv = 'mrsm',
|
172
|
+
'uvicorn', 'gunicorn', venv=None, lazy=False, check_update=False,
|
177
173
|
)
|
178
174
|
|
179
175
|
uvicorn_config_path = API_UVICORN_RESOURCES_PATH / SERVER_ID / 'config.json'
|
@@ -309,51 +305,19 @@ def _api_start(
|
|
309
305
|
### remove custom keys before calling uvicorn
|
310
306
|
|
311
307
|
def _run_uvicorn():
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
'--env-file', uvicorn_config['env_file'],
|
326
|
-
]
|
327
|
-
if uvicorn_reload := uvicorn_config.get('reload'):
|
328
|
-
uvicorn_flags.append('--reload')
|
329
|
-
if (
|
330
|
-
uvicorn_reload
|
331
|
-
and (reload_dirs := uvicorn_config.get('reload_dirs'))
|
332
|
-
):
|
333
|
-
if not isinstance(reload_dirs, list):
|
334
|
-
reload_dirs = [reload_dirs]
|
335
|
-
for reload_dir in reload_dirs:
|
336
|
-
uvicorn_flags += ['--reload-dir', reload_dir]
|
337
|
-
if (
|
338
|
-
uvicorn_reload
|
339
|
-
and (reload_excludes := uvicorn_config.get('reload_excludes'))
|
340
|
-
):
|
341
|
-
if not isinstance(reload_excludes, list):
|
342
|
-
reload_excludes = [reload_excludes]
|
343
|
-
for reload_exclude in reload_excludes:
|
344
|
-
uvicorn_flags += ['--reload-exclude', reload_exclude]
|
345
|
-
if (uvicorn_workers := uvicorn_config.get('workers')) is not None:
|
346
|
-
uvicorn_flags += ['--workers', str(uvicorn_workers)]
|
347
|
-
|
348
|
-
uvicorn_args = uvicorn_flags + ['meerschaum.api:app']
|
349
|
-
run_python_package(
|
350
|
-
'uvicorn',
|
351
|
-
uvicorn_args,
|
352
|
-
venv = get_module_venv(uvicorn),
|
353
|
-
as_proc = False,
|
354
|
-
foreground = True,
|
355
|
-
debug = debug,
|
356
|
-
)
|
308
|
+
try:
|
309
|
+
uvicorn.run(
|
310
|
+
**filter_keywords(
|
311
|
+
uvicorn.run,
|
312
|
+
**{
|
313
|
+
k: v
|
314
|
+
for k, v in uvicorn_config.items()
|
315
|
+
if k not in custom_keys
|
316
|
+
}
|
317
|
+
)
|
318
|
+
)
|
319
|
+
except KeyboardInterrupt:
|
320
|
+
pass
|
357
321
|
|
358
322
|
def _run_gunicorn():
|
359
323
|
gunicorn_args = [
|
@@ -374,21 +338,23 @@ def _api_start(
|
|
374
338
|
]
|
375
339
|
if debug:
|
376
340
|
gunicorn_args += ['--log-level=debug', '--enable-stdio-inheritance', '--reload']
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
341
|
+
try:
|
342
|
+
run_python_package(
|
343
|
+
'gunicorn',
|
344
|
+
gunicorn_args,
|
345
|
+
env = {
|
346
|
+
k: (
|
347
|
+
json.dumps(v)
|
348
|
+
if isinstance(v, (dict, list))
|
349
|
+
else v
|
350
|
+
)
|
351
|
+
for k, v in env_dict.items()
|
352
|
+
},
|
353
|
+
venv = None,
|
354
|
+
debug = debug,
|
355
|
+
)
|
356
|
+
except KeyboardInterrupt:
|
357
|
+
pass
|
392
358
|
|
393
359
|
|
394
360
|
_run_uvicorn() if not production else _run_gunicorn()
|
meerschaum/actions/python.py
CHANGED
@@ -10,7 +10,6 @@ from meerschaum.utils.typing import SuccessTuple, Any, List, Optional
|
|
10
10
|
|
11
11
|
def python(
|
12
12
|
action: Optional[List[str]] = None,
|
13
|
-
venv: Optional[str] = 'mrsm',
|
14
13
|
sub_args: Optional[List[str]] = None,
|
15
14
|
debug: bool = False,
|
16
15
|
**kw: Any
|
@@ -24,8 +23,7 @@ def python(
|
|
24
23
|
|
25
24
|
Examples:
|
26
25
|
mrsm python
|
27
|
-
mrsm python
|
28
|
-
mrsm python [-i] [-c 'print("hi")']
|
26
|
+
mrsm python [-m pip -V]
|
29
27
|
"""
|
30
28
|
import sys, subprocess, os
|
31
29
|
from meerschaum.utils.debug import dprint
|
@@ -39,9 +37,6 @@ def python(
|
|
39
37
|
if action is None:
|
40
38
|
action = []
|
41
39
|
|
42
|
-
if venv == 'None':
|
43
|
-
venv = None
|
44
|
-
|
45
40
|
joined_actions = ["import meerschaum as mrsm"]
|
46
41
|
line = ""
|
47
42
|
for i, a in enumerate(action):
|
@@ -88,19 +83,13 @@ def python(
|
|
88
83
|
with open(init_script_path, 'w', encoding='utf-8') as f:
|
89
84
|
f.write(command)
|
90
85
|
|
91
|
-
env_dict = os.environ.copy()
|
92
|
-
venv_path = (VIRTENV_RESOURCES_PATH / venv) if venv is not None else None
|
93
|
-
if venv_path is not None:
|
94
|
-
env_dict.update({'VIRTUAL_ENV': venv_path.as_posix()})
|
95
|
-
|
96
86
|
try:
|
97
|
-
ptpython = attempt_import('ptpython', venv=
|
87
|
+
ptpython = attempt_import('ptpython', venv=None)
|
98
88
|
return_code = run_python_package(
|
99
89
|
'ptpython',
|
100
90
|
sub_args or ['--dark-bg', '-i', init_script_path.as_posix()],
|
101
|
-
venv = venv,
|
102
91
|
foreground = True,
|
103
|
-
|
92
|
+
venv = None,
|
104
93
|
)
|
105
94
|
except KeyboardInterrupt:
|
106
95
|
return_code = 1
|
meerschaum/config/_version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: meerschaum
|
3
|
-
Version: 2.2.
|
3
|
+
Version: 2.2.4
|
4
4
|
Summary: Sync Time-Series Pipes with Meerschaum
|
5
5
|
Home-page: https://meerschaum.io
|
6
6
|
Author: Bennett Meares
|
@@ -105,6 +105,7 @@ Requires-Dist: mycli >=1.23.2 ; extra == 'cli'
|
|
105
105
|
Requires-Dist: litecli >=1.5.0 ; extra == 'cli'
|
106
106
|
Requires-Dist: mssql-cli >=1.0.0 ; extra == 'cli'
|
107
107
|
Requires-Dist: gadwall >=0.2.0 ; extra == 'cli'
|
108
|
+
Requires-Dist: ptpython >=3.0.27 ; extra == 'cli'
|
108
109
|
Provides-Extra: core
|
109
110
|
Requires-Dist: wheel >=0.34.2 ; extra == 'core'
|
110
111
|
Requires-Dist: setuptools >=63.3.0 ; extra == 'core'
|
@@ -18,10 +18,10 @@ meerschaum/_internal/shell/ValidAutoSuggest.py,sha256=bARjOWMidz0dvMelLUe6yRPto5
|
|
18
18
|
meerschaum/_internal/shell/__init__.py,sha256=vXQoQPEVlYiUYai1b5AwQAlTnja6A2cSABnqXhzlS7I,281
|
19
19
|
meerschaum/_internal/shell/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
meerschaum/_internal/term/TermPageHandler.py,sha256=Rt5S47Pr_3HLJc8xIXpZUczYE_Dw2qT8qwf1jZFtUHQ,520
|
21
|
-
meerschaum/_internal/term/__init__.py,sha256=
|
21
|
+
meerschaum/_internal/term/__init__.py,sha256=LqTySBfHYnOtHGYCWfovcxV4FnZdON2BPYp0UbgI1QI,1640
|
22
22
|
meerschaum/_internal/term/tools.py,sha256=dXVAimKD-Yv2fg2WOTr0YGBY7XDKjQqw-RizcS65YVI,727
|
23
23
|
meerschaum/actions/__init__.py,sha256=7CNoKEqkqqafqMcChspJX9cR9OdgEWk9ggj0000Jl98,11360
|
24
|
-
meerschaum/actions/api.py,sha256=
|
24
|
+
meerschaum/actions/api.py,sha256=mWhv4bn3Ap17_Gqf2Cx9bAsHKG-Zhy072pBbNzHLEJc,12756
|
25
25
|
meerschaum/actions/bootstrap.py,sha256=JnIyJ4odw6cA4e0Cw7J8THkLavMcj68nRyGsQDAT8nc,13396
|
26
26
|
meerschaum/actions/clear.py,sha256=OoFZE0bK5m8s3GLNZcixuVT0DMj1izXVxGCATcmUGbI,4851
|
27
27
|
meerschaum/actions/copy.py,sha256=8g3ANXfVdvuyaoXcZjgTg3BxHTOhHGrzVDOOsTBrpSU,6213
|
@@ -33,7 +33,7 @@ meerschaum/actions/install.py,sha256=akzzgsvy5yqUFuUqzSMG4eBKARY2iSnL3n_BiaNcM58
|
|
33
33
|
meerschaum/actions/login.py,sha256=fNgsgkrFCn9wBQJY50SQhz2PwsN_TvEYYHnXK3JG4ig,4206
|
34
34
|
meerschaum/actions/os.py,sha256=dtoppoBhLzW3rLNF0SFovEfNxA4WJWt_9WrOGlS5KbA,2251
|
35
35
|
meerschaum/actions/pause.py,sha256=kDK0UMm90TuohFEG5Gugl3PEbuqGua-ghidqvgYShoc,3909
|
36
|
-
meerschaum/actions/python.py,sha256=
|
36
|
+
meerschaum/actions/python.py,sha256=Ogqm9NFFq3E710mRWAAU7F8JiEHrxYcGKj5H3ZDsP-s,3295
|
37
37
|
meerschaum/actions/register.py,sha256=l_21LWZCzKwJVex_xAXECC5WVW1VEuIX9HSp7CuyCwA,11326
|
38
38
|
meerschaum/actions/reload.py,sha256=gMXeFBGVfyQ7uhKhYf6bLaDMD0fLPcA9BrLBSiuvWIc,508
|
39
39
|
meerschaum/actions/setup.py,sha256=KkAGWcgwzl_L6A19fTmTX1KtBjW2FwD8QenLjPy0mQQ,3205
|
@@ -136,7 +136,7 @@ meerschaum/config/_preprocess.py,sha256=-AEA8m_--KivZwTQ1sWN6LTn5sio_fUr2XZ51BO6
|
|
136
136
|
meerschaum/config/_read_config.py,sha256=WFZKIXZMDe_ca0ES7ivgM_mnwShvFxLdoeisT_X5-h0,14720
|
137
137
|
meerschaum/config/_shell.py,sha256=s74cmJl8NrhM_Y1cB_P41_JDUYXV0g4WXnKFZWMtnrY,3551
|
138
138
|
meerschaum/config/_sync.py,sha256=oK2ZujO2T1he08BXCFyiniBUevNGWSQKXLcS_jRv_7Y,4155
|
139
|
-
meerschaum/config/_version.py,sha256=
|
139
|
+
meerschaum/config/_version.py,sha256=tzwD6PP0EAlINX0JJN0MPxAdg_vH8JKm0JxuSFEgJ_A,71
|
140
140
|
meerschaum/config/paths.py,sha256=Z7vaOunaEJbVFXiSSz4IthhNOQDI-dhtpi5TpSyrcXg,206
|
141
141
|
meerschaum/config/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
142
142
|
meerschaum/config/stack/__init__.py,sha256=c_WdTSejVdj8lqSE_pK5MhIBkHoftiZWDuEuB9dmk2I,9007
|
@@ -226,15 +226,15 @@ meerschaum/utils/formatting/_pipes.py,sha256=wy0iWJFsFl3X2VloaiA_gp9Yx9w6tD3FQZv
|
|
226
226
|
meerschaum/utils/formatting/_pprint.py,sha256=tgrT3FyGyu5CWJYysqK3kX1xdZYorlbOk9fcU_vt9Qg,3096
|
227
227
|
meerschaum/utils/formatting/_shell.py,sha256=ox75O7VHDAiwzSvdMSJZhXLadvAqYJVeihU6WeZ2Ogc,3677
|
228
228
|
meerschaum/utils/packages/__init__.py,sha256=6zRX0g8Kh-wHjvkbiMf_kLKM2BlR5FJUCA3JStX9YeU,62628
|
229
|
-
meerschaum/utils/packages/_packages.py,sha256=
|
229
|
+
meerschaum/utils/packages/_packages.py,sha256=yU8bD4fYs4cv1gOtEp3QrnejyvPi0K2W9TYaP_cd59w,7977
|
230
230
|
meerschaum/utils/packages/lazy_loader.py,sha256=VHnph3VozH29R4JnSSBfwtA5WKZYZQFT_GeQSShCnuc,2540
|
231
231
|
meerschaum/utils/venv/_Venv.py,sha256=sBnlmxHdAh2bx8btfVoD79-H9-cYsv5lP02IIXkyECs,3553
|
232
232
|
meerschaum/utils/venv/__init__.py,sha256=4vFAu85lQ5GYEVhc6e_KhFmrks4t_Ma6ysmtraccYbs,24187
|
233
|
-
meerschaum-2.2.
|
234
|
-
meerschaum-2.2.
|
235
|
-
meerschaum-2.2.
|
236
|
-
meerschaum-2.2.
|
237
|
-
meerschaum-2.2.
|
238
|
-
meerschaum-2.2.
|
239
|
-
meerschaum-2.2.
|
240
|
-
meerschaum-2.2.
|
233
|
+
meerschaum-2.2.4.dist-info/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
|
234
|
+
meerschaum-2.2.4.dist-info/METADATA,sha256=qA6ciSqJ8o1Cfsl2Al74zn3a7NS1wzsteaim54kRDIQ,24035
|
235
|
+
meerschaum-2.2.4.dist-info/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
|
236
|
+
meerschaum-2.2.4.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
237
|
+
meerschaum-2.2.4.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
|
238
|
+
meerschaum-2.2.4.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
|
239
|
+
meerschaum-2.2.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
240
|
+
meerschaum-2.2.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|