meerschaum 2.2.2rc4__py3-none-any.whl → 2.2.3__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.
@@ -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('mrsm'),
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
- uvicorn_flags = [
313
- '--host', host,
314
- '--port', str(port),
315
- (
316
- '--proxy-headers'
317
- if uvicorn_config.get('proxy_headers')
318
- else '--no-proxy-headers'
319
- ),
320
- (
321
- '--use-colors'
322
- if uvicorn_config.get('use_colors')
323
- else '--no-use-colors'
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
- run_python_package(
379
- 'gunicorn',
380
- gunicorn_args,
381
- env = {
382
- k: (
383
- json.dumps(v)
384
- if isinstance(v, (dict, list))
385
- else v
386
- )
387
- for k, v in env_dict.items()
388
- },
389
- venv = get_module_venv(gunicorn),
390
- debug = debug,
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()
@@ -2,4 +2,4 @@
2
2
  Specify the Meerschaum release version.
3
3
  """
4
4
 
5
- __version__ = "2.2.2rc4"
5
+ __version__ = "2.2.3"
@@ -841,7 +841,7 @@ def pip_install(
841
841
  except (ImportError, FileNotFoundError):
842
842
  uv_bin = None
843
843
  have_uv_pip = False
844
- if have_pip and not have_uv_pip and _install_uv_pip:
844
+ if have_pip and not have_uv_pip and _install_uv_pip and not is_android():
845
845
  if not pip_install(
846
846
  'uv',
847
847
  venv = None,
@@ -860,7 +860,6 @@ def pip_install(
860
860
  venv_contains_package('uv', venv=None, debug=debug)
861
861
  and uv_bin is not None
862
862
  and venv is not None
863
- and not is_android()
864
863
  )
865
864
 
866
865
  import sys
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: meerschaum
3
- Version: 2.2.2rc4
3
+ Version: 2.2.3
4
4
  Summary: Sync Time-Series Pipes with Meerschaum
5
5
  Home-page: https://meerschaum.io
6
6
  Author: Bennett Meares
@@ -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=c4Je3376Tj7Me2qldCxg_Xs2mGN-Mu1YAMIaAG6vK6w,1642
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=7OTGfcu7CmOqplYJBdk3vCIFMPE_8QkEGRS_B-Ow9V0,14031
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
@@ -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=gYnJG3bYcMuCYNVqci0er5eTN3nIjLXAyhoRFZIGnRI,74
139
+ meerschaum/config/_version.py,sha256=gP1cQDqMS3FhQGvMzz2yo7hBI_-e9-bZoGXa-wFMNBI,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
@@ -225,16 +225,16 @@ meerschaum/utils/formatting/_jobs.py,sha256=s1lVcdMkzNj5Bqw-GsUhcguUFtahi5nQ-kg1
225
225
  meerschaum/utils/formatting/_pipes.py,sha256=wy0iWJFsFl3X2VloaiA_gp9Yx9w6tD3FQZvAQAqef4A,19492
226
226
  meerschaum/utils/formatting/_pprint.py,sha256=tgrT3FyGyu5CWJYysqK3kX1xdZYorlbOk9fcU_vt9Qg,3096
227
227
  meerschaum/utils/formatting/_shell.py,sha256=ox75O7VHDAiwzSvdMSJZhXLadvAqYJVeihU6WeZ2Ogc,3677
228
- meerschaum/utils/packages/__init__.py,sha256=Lg_RavlKui150iDmqFy900coiWB4zx4KTXErq-kqs48,62636
228
+ meerschaum/utils/packages/__init__.py,sha256=6zRX0g8Kh-wHjvkbiMf_kLKM2BlR5FJUCA3JStX9YeU,62628
229
229
  meerschaum/utils/packages/_packages.py,sha256=kWoo1KWvpQgR3rY_rpHzvGIh14BBFH92Erw5UtW7yX0,7918
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.2rc4.dist-info/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
234
- meerschaum-2.2.2rc4.dist-info/METADATA,sha256=Lca_cfI6M5ToHKZKKRjh7TXCnnnnFZovIy2JFY7N-UE,23988
235
- meerschaum-2.2.2rc4.dist-info/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
236
- meerschaum-2.2.2rc4.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
237
- meerschaum-2.2.2rc4.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
238
- meerschaum-2.2.2rc4.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
239
- meerschaum-2.2.2rc4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
240
- meerschaum-2.2.2rc4.dist-info/RECORD,,
233
+ meerschaum-2.2.3.dist-info/LICENSE,sha256=jG2zQEdRNt88EgHUWPpXVWmOrOduUQRx7MnYV9YIPaw,11359
234
+ meerschaum-2.2.3.dist-info/METADATA,sha256=-k8RV4yb88KjD8OtoCcYcCcR08FzI6iw9ELFC0CpOYk,23985
235
+ meerschaum-2.2.3.dist-info/NOTICE,sha256=OTA9Fcthjf5BRvWDDIcBC_xfLpeDV-RPZh3M-HQBRtQ,114
236
+ meerschaum-2.2.3.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
237
+ meerschaum-2.2.3.dist-info/entry_points.txt,sha256=5YBVzibw-0rNA_1VjB16z5GABsOGf-CDhW4yqH8C7Gc,88
238
+ meerschaum-2.2.3.dist-info/top_level.txt,sha256=bNoSiDj0El6buocix-FRoAtJOeq1qOF5rRm2u9i7Q6A,11
239
+ meerschaum-2.2.3.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
240
+ meerschaum-2.2.3.dist-info/RECORD,,